12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127(*****************************************************************************)(* *)(* Open Source License *)(* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)(* Copyright (c) 2020 Nomadic Labs. <contact@nomadic-labs.com> *)(* Copyright (c) 2020 Metastate AG <hello@metastate.dev> *)(* *)(* Permission is hereby granted, free of charge, to any person obtaining a *)(* copy of this software and associated documentation files (the "Software"),*)(* to deal in the Software without restriction, including without limitation *)(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *)(* and/or sell copies of the Software, and to permit persons to whom the *)(* Software is furnished to do so, subject to the following conditions: *)(* *)(* The above copyright notice and this permission notice shall be included *)(* in all copies or substantial portions of the Software. *)(* *)(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*)(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *)(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *)(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*)(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *)(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *)(* DEALINGS IN THE SOFTWARE. *)(* *)(*****************************************************************************)openEnvironment_contextopenEnvironment_protocol_TmoduletypeT=sigincludeTezos_protocol_environment_sigs.V2.TwithtypeFormat.formatter=Format.formatterandtype'aData_encoding.t='aData_encoding.tandtype'aData_encoding.lazy_t='aData_encoding.lazy_tandtype'aLwt.t='aLwt.tandtype('a,'b)Pervasives.result=('a,'b)resultandtypeChain_id.t=Tezos_crypto.Hashed.Chain_id.tandtypeBlock_hash.t=Tezos_crypto.Hashed.Block_hash.tandtypeOperation_hash.t=Tezos_crypto.Hashed.Operation_hash.tandtypeOperation_list_hash.t=Tezos_crypto.Hashed.Operation_list_hash.tandtypeOperation_list_list_hash.t=Tezos_crypto.Hashed.Operation_list_list_hash.tandtypeContext.t=Context.tandtypeContext_hash.t=Tezos_crypto.Hashed.Context_hash.tandtypeProtocol_hash.t=Tezos_crypto.Hashed.Protocol_hash.tandtypeTime.t=Time.Protocol.tandtypeOperation.shell_header=Operation.shell_headerandtypeOperation.t=Operation.tandtypeBlock_header.shell_header=Block_header.shell_headerandtypeBlock_header.t=Block_header.tandtype'aRPC_directory.t='aTezos_rpc.Directory.tandtypeEd25519.Public_key_hash.t=Signature.Ed25519.Public_key_hash.tandtypeEd25519.Public_key.t=Signature.Ed25519.Public_key.tandtypeEd25519.t=Signature.Ed25519.tandtypeSecp256k1.Public_key_hash.t=Signature.Secp256k1.Public_key_hash.tandtypeSecp256k1.Public_key.t=Signature.Secp256k1.Public_key.tandtypeSecp256k1.t=Signature.Secp256k1.tandtypeP256.Public_key_hash.t=Signature.P256.Public_key_hash.tandtypeP256.Public_key.t=Signature.P256.Public_key.tandtypeP256.t=Signature.P256.tandtypeSignature.public_key_hash=Signature.V0.public_key_hashandtypeSignature.public_key=Signature.V0.public_keyandtypeSignature.t=Signature.V0.tandtypeSignature.watermark=Signature.V0.watermarkandtype'aMicheline.canonical='aMicheline.canonicalandtypeZ.t=Z.tandtype('a,'b)Micheline.node=('a,'b)Micheline.nodeandtypeData_encoding.json_schema=Data_encoding.json_schemaandtype('a,'b)RPC_path.t=('a,'b)Tezos_rpc.Path.tandtypeRPC_service.meth=Tezos_rpc.Service.methandtype(+'m,'pr,'p,'q,'i,'o)RPC_service.t=('m,'pr,'p,'q,'i,'o)Tezos_rpc.Service.tandtypeError_monad.shell_tztrace=Error_monad.tztraceandtype'aError_monad.shell_tzresult=('a,Error_monad.tztrace)resultandmoduleSapling=Tezos_sapling.Core.Validator_legacytypeerror+=Ecoproto_errorofError_monad.errorvalwrap_tzerror:Error_monad.error->errorvalwrap_tztrace:Error_monad.errorError_monad.trace->errortracevalwrap_tzresult:'aError_monad.tzresult->'atzresultmoduleLift(P:Updater.PROTOCOL):PROTOCOLwithtypeblock_header_data=P.block_header_dataandtypeblock_header_metadata=P.block_header_metadataandtypeblock_header=P.block_headerandtypeoperation_data=P.operation_dataandtypeoperation_receipt=P.operation_receiptandtypeoperation=P.operationandtypevalidation_state=P.validation_stateclass['chain,'block]proto_rpc_context:Tezos_rpc.Context.t->(unit,(unit*'chain)*'block)RPC_path.t->['chain*'block]RPC_context.simpleclass['block]proto_rpc_context_of_directory:('block->RPC_context.t)->RPC_context.tRPC_directory.t->['block]RPC_context.simpleendmoduleMake(Param:sigvalname:stringend)()=structmoduleCamlinternalFormatBasics=CamlinternalFormatBasicsincludeStdlib(* The modules provided in the [_struct.V2.M] pack are meant specifically to
shadow modules from [Stdlib]/[Base]/etc. with backwards compatible
versions. Thus we open the module, hiding the incompatible, newer modules.
*)openTezos_protocol_environment_structs.V2modulePervasives=StdlibmoduleCompare=ComparemoduleList=ListmoduleChar=CharmoduleBytes=BytesmoduleHex=HexmoduleString=StringmoduleBits=BitsmoduleTzEndian=TzEndianmoduleSet=Stdlib.SetmoduleMap=Stdlib.MapmoduleInt32=Int32moduleInt64=Int64moduleFormat=FormatmoduleOption=Tezos_error_monad.TzLwtreslib.OptionmoduleRaw_hashes=structletsha256=Tezos_crypto.Hacl.Hash.SHA256.digestletsha512=Tezos_crypto.Hacl.Hash.SHA512.digestletblake2bmsg=Tezos_crypto.Blake2B.to_bytes(Tezos_crypto.Blake2B.hash_bytes[msg])letkeccak256msg=Tezos_crypto.Hacl.Hash.Keccak_256.digestmsgletsha3_256msg=Tezos_crypto.Hacl.Hash.SHA3_256.digestmsgletsha3_512msg=Tezos_crypto.Hacl.Hash.SHA3_512.digestmsgendmoduleZ=ZmoduleLwt=LwtmoduleLwt_list=Lwt_listmoduleData_encoding=structincludeData_encodingtypetag_size=[`Uint8|`Uint16]letdefname?title?descriptionencoding=def(Param.name^"."^name)?title?descriptionencodingendmoduleTime=Time.ProtocolmoduleBls12_381=Bls12_381moduleEd25519=Ed25519moduleSecp256k1=Secp256k1moduleP256=P256moduleSignature=SignaturemoduleS=structmoduletypeT=Tezos_base.S.TmoduletypeHASHABLE=Tezos_base.S.HASHABLEmoduletypeMINIMAL_HASH=Tezos_crypto.Intfs.MINIMAL_HASHmoduletypeB58_DATA=sigtypetvalto_b58check:t->stringvalto_short_b58check:t->stringvalof_b58check_exn:string->tvalof_b58check_opt:string->toptiontypeTezos_crypto.Base58.data+=Dataoftvalb58check_encoding:tTezos_crypto.Base58.encodingendmoduletypeRAW_DATA=sigtypetvalsize:int(* in bytes *)valto_bytes:t->Bytes.tvalof_bytes_opt:Bytes.t->toptionvalof_bytes_exn:Bytes.t->tendmoduletypeENCODER=sigtypetvalencoding:tData_encoding.tvalrpc_arg:tTezos_rpc.Arg.tendmoduletypeSET=S.SETmoduletypeMAP=S.MAPmoduletypeINDEXES_SET=sigincludeSETvalencoding:tData_encoding.tendmoduletypeINDEXES_MAP=sigincludeMAPvalencoding:'aData_encoding.t->'atData_encoding.tendmoduletypeINDEXES=sigtypetvalto_path:t->stringlist->stringlistvalof_path:stringlist->toptionvalof_path_exn:stringlist->tvalprefix_path:string->stringlistvalpath_length:intmoduleSet:INDEXES_SETwithtypeelt=tmoduleMap:INDEXES_MAPwithtypekey=tendmoduletypeHASH=sigincludeMINIMAL_HASHincludeRAW_DATAwithtypet:=tincludeB58_DATAwithtypet:=tincludeENCODERwithtypet:=tincludeINDEXESwithtypet:=tendmoduletypeMERKLE_TREE=sigtypeeltincludeHASHvalcompute:eltlist->tvalempty:ttypepath=Leftofpath*t|Rightoft*path|Opvalcompute_path:eltlist->int->pathvalcheck_path:path->elt->t*intvalpath_encoding:pathData_encoding.tendmoduletypeSIGNATURE_PUBLIC_KEY_HASH=sigtypetvalpp:Format.formatter->t->unitvalpp_short:Format.formatter->t->unitincludeCompare.Swithtypet:=tincludeRAW_DATAwithtypet:=tincludeB58_DATAwithtypet:=tincludeENCODERwithtypet:=tincludeINDEXESwithtypet:=tvalzero:tendmoduletypeSIGNATURE_PUBLIC_KEY=sigtypetvalpp:Format.formatter->t->unitincludeCompare.Swithtypet:=tincludeB58_DATAwithtypet:=tincludeENCODERwithtypet:=ttypepublic_key_hash_tvalhash:t->public_key_hash_tvalsize:t->int(* in bytes *)valof_bytes_without_validation:bytes->toptionendmoduletypeSIGNATURE=sigmodulePublic_key_hash:SIGNATURE_PUBLIC_KEY_HASHmodulePublic_key:SIGNATURE_PUBLIC_KEYwithtypepublic_key_hash_t:=Public_key_hash.ttypetvalpp:Format.formatter->t->unitincludeRAW_DATAwithtypet:=tincludeCompare.Swithtypet:=tincludeB58_DATAwithtypet:=tincludeENCODERwithtypet:=tvalzero:ttypewatermark(** Check a signature *)valcheck:?watermark:watermark->Public_key.t->t->Bytes.t->boolendmoduletypeFIELD=sigtypet(** The order of the finite field *)valorder:Z.t(** minimal number of bytes required to encode a value of the field. *)valsize_in_bytes:int(** [check_bytes bs] returns [true] if [bs] is a correct byte
representation of a field element *)valcheck_bytes:Bytes.t->bool(** The neutral element for the addition *)valzero:t(** The neutral element for the multiplication *)valone:t(** [add a b] returns [a + b mod order] *)valadd:t->t->t(** [mul a b] returns [a * b mod order] *)valmul:t->t->t(** [eq a b] returns [true] if [a = b mod order], else [false] *)valeq:t->t->bool(** [negate x] returns [-x mod order]. Equivalently, [negate x] returns the
unique [y] such that [x + y mod order = 0]
*)valnegate:t->t(** [inverse_opt x] returns [x^-1] if [x] is not [0] as an option, else [None] *)valinverse_opt:t->toption(** [pow x n] returns [x^n] *)valpow:t->Z.t->t(** From a predefined bytes representation, construct a value t. It is not
required that to_bytes [(Option.get (of_bytes_opt t)) = t]. By default, little endian encoding
is used and the given element is modulo the prime order *)valof_bytes_opt:Bytes.t->toption(** Convert the value t to a bytes representation which can be used for
hashing for instance. It is not required that [Option.get (to_bytes
(of_bytes_opt t)) = t]. By default, little endian encoding is used, and
length of the resulting bytes may vary depending on the order.
*)valto_bytes:t->Bytes.tend(** Module type for the prime fields GF(p) *)moduletypePRIME_FIELD=sigincludeFIELD(** [of_z x] builds an element t from the Zarith element [x]. [mod order] is
applied if [x >= order] or [x < 0]. *)valof_z:Z.t->t(** [to_z x] builds a Zarith element, using the decimal representation.
Arithmetic on the result can be done using the modular functions on
integers *)valto_z:t->Z.tendmoduletypeCURVE=sig(** The type of the element in the elliptic curve *)typet(** The size of a point representation, in bytes *)valsize_in_bytes:intmoduleScalar:FIELD(** Check if a point, represented as a byte array, is on the curve **)valcheck_bytes:Bytes.t->bool(** Attempt to construct a point from a byte array *)valof_bytes_opt:Bytes.t->toption(** Return a representation in bytes *)valto_bytes:t->Bytes.t(** Zero of the elliptic curve *)valzero:t(** A fixed generator of the elliptic curve *)valone:t(** Return the addition of two element *)valadd:t->t->t(** Double the element *)valdouble:t->t(** Return the opposite of the element *)valnegate:t->t(** Return [true] if the two elements are algebraically the same *)valeq:t->t->bool(** Multiply an element by a scalar *)valmul:t->Scalar.t->tendmoduletypePAIRING=sigmoduleGt:FIELDmoduleG1:CURVEmoduleG2:CURVEvalmiller_loop:(G1.t*G2.t)list->Gt.tvalfinal_exponentiation_opt:Gt.t->Gt.toptionvalpairing:G1.t->G2.t->Gt.tendendmoduleError_core=structincludeTezos_error_monad.Core_maker.Make(structletid=Format.asprintf"proto.%s."Param.nameend)(Tezos_protocol_environment_structs.V2.Error_monad_trace_eval)leterror_encoding=Data_encoding.dynamic_sizeerror_encodingendtypeerror_category=Error_core.error_categorytypeerror+=Ecoproto_errorofError_core.errormoduleWrapped_error_monad=structtypeunwrapped=Error_core.error=..include(Error_core:sigincludeTezos_error_monad.Sig.COREwithtypeerror:=unwrappedandtypeerror_category=error_categoryend)letunwrap=functionEcoproto_errorecoerror->Someecoerror|_->Noneletwrapecoerror=Ecoproto_errorecoerrorendmoduleError_monad=structtypeshell_tztrace=Error_monad.tztracetype'ashell_tzresult=('a,Error_monad.tztrace)resultincludeError_coreincludeTezos_error_monad.TzLwtreslib.MonadincludeTezos_error_monad.Monad_maker.Make(Error_core)(TzTrace)(Tezos_error_monad.TzLwtreslib.Monad)(* Backwards compatibility additions (traversors, dont_wait, trace helpers) *)includeError_monad_infix_globalsincludeError_monad_traversorsincludeError_monad_preallocated_valuesincludeError_monad_trace_evalletfaile=Lwt.return_error(TzTrace.makee)leterrore=Error(TzTrace.makee)letdont_waitexerf=dont_waitferexletmake_trace_encodinge=TzTrace.encodingeletpp_trace=pp_print_tracetype'errtrace='errTzTrace.trace(* Shouldn't be used, only to keep the same environment interface *)letclassify_errorerror=(find_info_of_errorerror).categoryletboth_e=Tezos_error_monad.TzLwtreslib.Monad.Traced_result_syntax.bothletjoin_e=Tezos_error_monad.TzLwtreslib.Monad.Traced_result_syntax.joinletall_e=Tezos_error_monad.TzLwtreslib.Monad.Traced_result_syntax.allendlet()=letid=Format.asprintf"proto.%s.wrapper"Param.nameinregister_wrapped_error_kind(moduleWrapped_error_monad)~id~title:("Error returned by protocol "^Param.name)~description:("Wrapped error for economic protocol "^Param.name^".")letwrap_tzerrorerror=Ecoproto_errorerrorletwrap_tztracet=List.mapwrap_tzerrortletwrap_tzresultr=Result.map_errorwrap_tztracermoduleChain_id=Chain_idmoduleBlock_hash=Block_hashmoduleOperation_hash=Operation_hashmoduleOperation_list_hash=Operation_list_hashmoduleOperation_list_list_hash=Operation_list_list_hashmoduleContext_hash=Context_hashmoduleProtocol_hash=Protocol_hashmoduleBlake2B=Blake2BmoduleFitness=FitnessmoduleOperation=OperationmoduleBlock_header=Block_headermoduleProtocol=ProtocolmoduleRPC_arg=Tezos_rpc.ArgmoduleRPC_path=Tezos_rpc.PathmoduleRPC_query=Tezos_rpc.QuerymoduleRPC_service=Tezos_rpc.ServicemoduleRPC_answer=structtype'ot=[`Okof'o(* 200 *)|`OkStreamof'ostream(* 200 *)|`Createdofstringoption(* 201 *)|`No_content(* 204 *)|`UnauthorizedofError_monad.errorlistoption(* 401 *)|`ForbiddenofError_monad.errorlistoption(* 403 *)|`Not_foundofError_monad.errorlistoption(* 404 *)|`ConflictofError_monad.errorlistoption(* 409 *)|`ErrorofError_monad.errorlistoption(* 500 *)]and'astream='aResto_directory.Answer.stream={next:unit->'aoptionLwt.t;shutdown:unit->unit;}letreturnx=Lwt.return(`Okx)letreturn_chunkedx=Lwt.return(`OkChunkx)letreturn_streamx=Lwt.return(`OkStreamx)letnot_found=Lwt.return(`Not_foundNone)letfailerr=Lwt.return(`Error(Someerr))endmoduleRPC_directory=structincludeTezos_protocol_environment_structs.V2.RPC_directoryletgen_registerdirservicehandler=letopenLwt_syntaxingen_registerdirservice(funpqi->let*r=handlerpqiinmatchrwith|`Oko->RPC_answer.return_chunkedo|`OkStreams->RPC_answer.return_streams|`Createds->Lwt.return(`Createds)|`No_content->Lwt.return`No_content|`Unauthorizede->lete=Option.map(List.map(fune->Ecoproto_errore))einLwt.return(`Unauthorizede)|`Forbiddene->lete=Option.map(List.map(fune->Ecoproto_errore))einLwt.return(`Forbiddene)|`Not_founde->lete=Option.map(List.map(fune->Ecoproto_errore))einLwt.return(`Not_founde)|`Conflicte->lete=Option.map(List.map(fune->Ecoproto_errore))einLwt.return(`Conflicte)|`Errore->lete=Option.map(List.map(fune->Ecoproto_errore))einLwt.return(`Errore))letregisterdirservicehandler=letopenLwt_syntaxingen_registerdirservice(funpqi->let*r=handlerpqiinmatchrwith|Oko->RPC_answer.returno|Errore->RPC_answer.faile)letopt_registerdirservicehandler=letopenLwt_syntaxingen_registerdirservice(funpqi->let*r=handlerpqiinmatchrwith|Ok(Someo)->RPC_answer.returno|OkNone->RPC_answer.not_found|Errore->RPC_answer.faile)letlwt_registerdirservicehandler=letopenLwt_syntaxingen_registerdirservice(funpqi->let*o=handlerpqiinRPC_answer.returno)openCurryletregister0rootsf=registerroots(curryZf)letregister1rootsf=registerroots(curry(SZ)f)letregister2rootsf=registerroots(curry(S(SZ))f)letregister3rootsf=registerroots(curry(S(S(SZ)))f)letregister4rootsf=registerroots(curry(S(S(S(SZ))))f)letregister5rootsf=registerroots(curry(S(S(S(S(SZ)))))f)letopt_register0rootsf=opt_registerroots(curryZf)letopt_register1rootsf=opt_registerroots(curry(SZ)f)letopt_register2rootsf=opt_registerroots(curry(S(SZ))f)letopt_register3rootsf=opt_registerroots(curry(S(S(SZ)))f)letopt_register4rootsf=opt_registerroots(curry(S(S(S(SZ))))f)letopt_register5rootsf=opt_registerroots(curry(S(S(S(S(SZ)))))f)letgen_register0rootsf=gen_registerroots(curryZf)letgen_register1rootsf=gen_registerroots(curry(SZ)f)letgen_register2rootsf=gen_registerroots(curry(S(SZ))f)letgen_register3rootsf=gen_registerroots(curry(S(S(SZ)))f)letgen_register4rootsf=gen_registerroots(curry(S(S(S(SZ))))f)letgen_register5rootsf=gen_registerroots(curry(S(S(S(S(SZ)))))f)letlwt_register0rootsf=lwt_registerroots(curryZf)letlwt_register1rootsf=lwt_registerroots(curry(SZ)f)letlwt_register2rootsf=lwt_registerroots(curry(S(SZ))f)letlwt_register3rootsf=lwt_registerroots(curry(S(S(SZ)))f)letlwt_register4rootsf=lwt_registerroots(curry(S(S(S(SZ))))f)letlwt_register5rootsf=lwt_registerroots(curry(S(S(S(S(SZ)))))f)endmoduleRPC_context=structtypet=rpc_contextclasstype['pr]simple=objectmethodcall_proto_service0:'m'q'i'o.(([<RPC_service.meth]as'm),t,t,'q,'i,'o)RPC_service.t->'pr->'q->'i->'oError_monad.shell_tzresultLwt.tmethodcall_proto_service1:'m'a'q'i'o.(([<RPC_service.meth]as'm),t,t*'a,'q,'i,'o)RPC_service.t->'pr->'a->'q->'i->'oError_monad.shell_tzresultLwt.tmethodcall_proto_service2:'m'a'b'q'i'o.(([<RPC_service.meth]as'm),t,(t*'a)*'b,'q,'i,'o)RPC_service.t->'pr->'a->'b->'q->'i->'oError_monad.shell_tzresultLwt.tmethodcall_proto_service3:'m'a'b'c'q'i'o.(([<RPC_service.meth]as'm),t,((t*'a)*'b)*'c,'q,'i,'o)RPC_service.t->'pr->'a->'b->'c->'q->'i->'oError_monad.shell_tzresultLwt.tendletmake_call0s(ctxt:_simple)=ctxt#call_proto_service0sletmake_call0=(make_call0:_->_simple->_:>_->_#simple->_)letmake_call1s(ctxt:_simple)=ctxt#call_proto_service1sletmake_call1=(make_call1:_->_simple->_:>_->_#simple->_)letmake_call2s(ctxt:_simple)=ctxt#call_proto_service2sletmake_call2=(make_call2:_->_simple->_:>_->_#simple->_)letmake_call3s(ctxt:_simple)=ctxt#call_proto_service3sletmake_call3=(make_call3:_->_simple->_:>_->_#simple->_)letmake_opt_call0sctxtblockqi=letopenLwt_syntaxinlet*r=make_call0sctxtblockqiinmatchrwith|Error[Tezos_rpc.Context.Not_found_]->Lwt.return_okNone|Error_asv->Lwt.returnv|Okv->Lwt.return_ok(Somev)letmake_opt_call1sctxtblocka1qi=letopenLwt_syntaxinlet*r=make_call1sctxtblocka1qiinmatchrwith|Error[Tezos_rpc.Context.Not_found_]->Lwt.return_okNone|Error_asv->Lwt.returnv|Okv->Lwt.return_ok(Somev)letmake_opt_call2sctxtblocka1a2qi=letopenLwt_syntaxinlet*r=make_call2sctxtblocka1a2qiinmatchrwith|Error[Tezos_rpc.Context.Not_found_]->Lwt.return_okNone|Error_asv->Lwt.returnv|Okv->Lwt.return_ok(Somev)letmake_opt_call3sctxtblocka1a2a3qi=letopenLwt_syntaxinlet*r=make_call3sctxtblocka1a2a3qiinmatchrwith|Error[Tezos_rpc.Context.Not_found_]->Lwt.return_okNone|Error_asv->Lwt.returnv|Okv->Lwt.return_ok(Somev)endmoduleSapling=Tezos_sapling.Core.Validator_legacymoduleMicheline=structincludeMichelineincludeTezos_micheline.Micheline_encodingletcanonical_encoding_v1~variantencoding=canonical_encoding_v1~variant:(Param.name^"."^variant)encodingletcanonical_encoding~variantencoding=canonical_encoding_v0~variant:(Param.name^"."^variant)encodingendmoduleLogging=Legacy_loggingmoduleUpdater=structtypenonrecvalidation_result=validation_result={context:Context.t;fitness:Fitness.t;message:stringoption;max_operations_ttl:int;last_allowed_fork_level:Int32.t;}typenonrecquota=quota={max_size:int;max_op:intoption}typenonrecrpc_context=rpc_context={block_hash:Block_hash.t;block_header:Block_header.shell_header;context:Context.t;}letactivate=Context.set_protocolletfork_test_chain=Context.fork_test_chainmoduletypePROTOCOL=Environment_protocol_T_V0.Twithtypecontext:=Context.tandtypequota:=quotaandtypevalidation_result:=validation_resultandtyperpc_context:=rpc_contextandtypetztrace:=Error_monad.tztraceandtype'atzresult:='aError_monad.tzresultendmoduleBase58=structincludeTezos_crypto.Base58letsimple_encodeencs=simple_encodeencsletsimple_decodeencs=simple_decodeencsincludeMake(structtypecontext=Context.tend)letdecodes=decodesendmoduleContext=structincludeContextincludeEnvironment_context.V2letfold?depthctxtk~init~f=Context.fold?depthctxtk~order:`Sorted~init~fmoduleTree=structincludeTreeletfold?depthctxtk~init~f=fold?depthctxtk~order:`Sorted~init~fendletregister_resolver=Base58.register_resolverletcompletectxts=Base58.completectxtsendmoduleLiftV2(P:Updater.PROTOCOL)=structincludePletbegin_partial_application~chain_id~ancestor_context~predecessor_timestamp~predecessor_fitnessraw_block=letopenLwt_syntaxinlet+r=begin_partial_application~chain_id~ancestor_context~predecessor_timestamp~predecessor_fitnessraw_blockinwrap_tzresultrletbegin_application~chain_id~predecessor_context~predecessor_timestamp~predecessor_fitnessraw_block=letopenLwt_syntaxinlet+r=begin_application~chain_id~predecessor_context~predecessor_timestamp~predecessor_fitnessraw_blockinwrap_tzresultrletbegin_construction~chain_id~predecessor_context~predecessor_timestamp~predecessor_level~predecessor_fitness~predecessor~timestamp?protocol_data()=letopenLwt_syntaxinlet+r=begin_construction~chain_id~predecessor_context~predecessor_timestamp~predecessor_level~predecessor_fitness~predecessor~timestamp?protocol_data()inwrap_tzresultrletcurrent_contextc=letopenLwt_syntaxinlet+r=current_contextcinwrap_tzresultrletapply_operationco=letopenLwt_syntaxinlet+r=apply_operationcoinwrap_tzresultrletfinalize_blockc=letopenLwt_syntaxinlet+r=finalize_blockcinwrap_tzresultrletinitcbh=letopenLwt_syntaxinlet+r=initcbhinwrap_tzresultrendmoduleLift(P:Updater.PROTOCOL)=structincludeIgnoreCaches(Environment_protocol_T.V0toV10(LiftV2(P)))letset_log_message_consumer_=()letenvironment_version=Protocol.V2letexpected_context_hash=Resulting_contextendclass['chain,'block]proto_rpc_context(t:Tezos_rpc.Context.t)(prefix:(unit,(unit*'chain)*'block)RPC_path.t)=objectmethodcall_proto_service0:'m'q'i'o.(([<RPC_service.meth]as'm),RPC_context.t,RPC_context.t,'q,'i,'o)RPC_service.t->'chain*'block->'q->'i->'otzresultLwt.t=funs(chain,block)qi->lets=RPC_service.subst0sinlets=RPC_service.prefixprefixsint#call_services(((),chain),block)qimethodcall_proto_service1:'m'a'q'i'o.(([<RPC_service.meth]as'm),RPC_context.t,RPC_context.t*'a,'q,'i,'o)RPC_service.t->'chain*'block->'a->'q->'i->'otzresultLwt.t=funs(chain,block)a1qi->lets=RPC_service.subst1sinlets=RPC_service.prefixprefixsint#call_services((((),chain),block),a1)qimethodcall_proto_service2:'m'a'b'q'i'o.(([<RPC_service.meth]as'm),RPC_context.t,(RPC_context.t*'a)*'b,'q,'i,'o)RPC_service.t->'chain*'block->'a->'b->'q->'i->'otzresultLwt.t=funs(chain,block)a1a2qi->lets=RPC_service.subst2sinlets=RPC_service.prefixprefixsint#call_services(((((),chain),block),a1),a2)qimethodcall_proto_service3:'m'a'b'c'q'i'o.(([<RPC_service.meth]as'm),RPC_context.t,((RPC_context.t*'a)*'b)*'c,'q,'i,'o)RPC_service.t->'chain*'block->'a->'b->'c->'q->'i->'otzresultLwt.t=funs(chain,block)a1a2a3qi->lets=RPC_service.subst3sinlets=RPC_service.prefixprefixsint#call_services((((((),chain),block),a1),a2),a3)qiendclass['block]proto_rpc_context_of_directoryconvdir:['block]RPC_context.simple=letlookup=newTezos_rpc.Context.of_directorydirinobjectmethodcall_proto_service0:'m'q'i'o.(([<RPC_service.meth]as'm),RPC_context.t,RPC_context.t,'q,'i,'o)RPC_service.t->'block->'q->'i->'otzresultLwt.t=funsblockqi->letrpc_context=convblockinlookup#call_servicesrpc_contextqimethodcall_proto_service1:'m'a'q'i'o.(([<RPC_service.meth]as'm),RPC_context.t,RPC_context.t*'a,'q,'i,'o)RPC_service.t->'block->'a->'q->'i->'otzresultLwt.t=funsblocka1qi->letrpc_context=convblockinlookup#call_services(rpc_context,a1)qimethodcall_proto_service2:'m'a'b'q'i'o.(([<RPC_service.meth]as'm),RPC_context.t,(RPC_context.t*'a)*'b,'q,'i,'o)RPC_service.t->'block->'a->'b->'q->'i->'otzresultLwt.t=funsblocka1a2qi->letrpc_context=convblockinlookup#call_services((rpc_context,a1),a2)qimethodcall_proto_service3:'m'a'b'c'q'i'o.(([<RPC_service.meth]as'm),RPC_context.t,((RPC_context.t*'a)*'b)*'c,'q,'i,'o)RPC_service.t->'block->'a->'b->'c->'q->'i->'otzresultLwt.t=funsblocka1a2a3qi->letrpc_context=convblockinlookup#call_services(((rpc_context,a1),a2),a3)qiendmoduleEquality_witness=Environment_context.Equality_witnessend