Documentation ¶
Index ¶
- Variables
- func BloomToBytes(bloom types.Bloom) [8][32]byte
- func BytesToBloom(b [8][32]byte) types.Bloom
- func EncodeAssignmentHookInput(input *AssignmentHookInput) ([]byte, error)
- func EncodeBlockParams(params *BlockParams) ([]byte, error)
- func EncodeProveBlockInput(meta *bindings.TaikoDataBlockMetadata, ...) ([]byte, error)
- func EncodeProverAssignmentPayload(chainID uint64, taikoAddress common.Address, ...) ([]byte, error)
- func ToExecutableData(header *types.Header) *engine.ExecutableData
- func TryParsingCustomError(originalError error) error
- func UnpackTxListBytes(txData []byte) ([]byte, error)
- type AssignmentHookInput
- type BlockParams
- type HookCall
- type ProverAssignment
- type TierFee
Constants ¶
This section is empty.
Variables ¶
var ( TaikoL1ABI *abi.ABI TaikoL2ABI *abi.ABI TaikoTokenABI *abi.ABI GuardianProverABI *abi.ABI LibProposingABI *abi.ABI LibProvingABI *abi.ABI LibUtilsABI *abi.ABI LibVerifyingABI *abi.ABI AssignmentHookABI *abi.ABI SGXVerifierABI *abi.ABI GuardianVerifierABI *abi.ABI )
Contract ABIs.
var ( TierOptimisticID uint16 = 100 TierSgxID uint16 = 200 TierSgxAndZkVMID uint16 = 300 TierGuardianID uint16 = 1000 ProtocolTiers = []uint16{TierOptimisticID, TierSgxID, TierSgxAndZkVMID, TierGuardianID} GoldenTouchPrivKey = "92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38" )
Tier IDs defined in protocol.
Functions ¶
func BloomToBytes ¶
BloomToBytes converts a types.Bloom to [8][32]byte slice.
func BytesToBloom ¶ added in v0.1.5
BytesToBloom converts a [8][32]byte slice to types.Bloom.
func EncodeAssignmentHookInput ¶ added in v0.18.0
func EncodeAssignmentHookInput(input *AssignmentHookInput) ([]byte, error)
EncodeAssignmentHookInput performs the solidity `abi.encode` for the given input
func EncodeBlockParams ¶ added in v0.18.0
func EncodeBlockParams(params *BlockParams) ([]byte, error)
EncodeBlockParams performs the solidity `abi.encode` for the given blockParams.
func EncodeProveBlockInput ¶
func EncodeProveBlockInput( meta *bindings.TaikoDataBlockMetadata, transition *bindings.TaikoDataTransition, tierProof *bindings.TaikoDataTierProof, ) ([]byte, error)
EncodeProveBlockInput performs the solidity `abi.encode` for the given TaikoL1.proveBlock input.
func EncodeProverAssignmentPayload ¶ added in v0.17.0
func EncodeProverAssignmentPayload( chainID uint64, taikoAddress common.Address, assignmentHookAddress common.Address, blockProposer common.Address, assignedProver common.Address, blobHash common.Hash, feeToken common.Address, expiry uint64, maxBlockID uint64, maxProposedIn uint64, tierFees []TierFee, ) ([]byte, error)
EncodeProverAssignmentPayload performs the solidity `abi.encode` for the given proverAssignment payload.
func ToExecutableData ¶ added in v0.9.0
func ToExecutableData(header *types.Header) *engine.ExecutableData
ToExecutableData converts a GETH *types.Header to *engine.ExecutableData.
func TryParsingCustomError ¶ added in v0.5.0
TryParsingCustomError tries to checks whether the given error is one of the custom errors defined the protocol ABIs, if so, it will return the matched custom error, otherwise, it simply returns the original error.
func UnpackTxListBytes ¶
UnpackTxListBytes unpacks the input data of a TaikoL1.proposeBlock transaction, and returns the txList bytes.
Types ¶
type AssignmentHookInput ¶ added in v0.18.0
type AssignmentHookInput struct { Assignment *ProverAssignment Tip *big.Int }
AssignmentHookInput should be same as AssignmentHook.Input
type BlockParams ¶ added in v0.18.0
type BlockParams struct { AssignedProver common.Address Coinbase common.Address ExtraData [32]byte ParentMetaHash [32]byte HookCalls []HookCall Signature []byte }
BlockParams should be same with TaikoData.BlockParams.
type ProverAssignment ¶ added in v0.15.0
type ProverAssignment struct { FeeToken common.Address Expiry uint64 MaxBlockId uint64 // nolint: revive,stylecheck MaxProposedIn uint64 MetaHash [32]byte ParentMetaHash [32]byte TierFees []TierFee Signature []byte }
ProverAssignment should be same with TaikoData.ProverAssignment.