Documentation ¶
Index ¶
- Constants
- Variables
- func UnpackLog(abiObject *abi.ABI, out interface{}, event string, log *types.Log) error
- type BridgeEvent
- type CheckpointAck
- type CheckpointBlock
- type CheckpointConfig
- type ContractCheckpoint
- type EventRecordWithBlock
- type HeaderBlock
- type Heimdall
- func (h *Heimdall) AwaitCheckpoint(ctx context.Context, blockNumber *big.Int) error
- func (h *Heimdall) Close()
- func (h *Heimdall) FetchCheckpoint(ctx context.Context, number int64) (*checkpoint.Checkpoint, error)
- func (h *Heimdall) FetchCheckpointCount(ctx context.Context) (int64, error)
- func (h *Heimdall) FetchLastNoAckMilestone(ctx context.Context) (string, error)
- func (h *Heimdall) FetchMilestone(ctx context.Context) (*milestone.Milestone, error)
- func (h *Heimdall) FetchMilestoneCount(ctx context.Context) (int64, error)
- func (h *Heimdall) FetchMilestoneID(ctx context.Context, milestoneID string) error
- func (h *Heimdall) FetchNoAckMilestone(ctx context.Context, milestoneID string) error
- func (h *Heimdall) NodeCreated(ctx context.Context, node devnet.Node)
- func (h *Heimdall) NodeStarted(ctx context.Context, node devnet.Node)
- func (h *Heimdall) RootChainAddress() libcommon.Address
- func (h *Heimdall) Span(ctx context.Context, spanID uint64) (*span.HeimdallSpan, error)
- func (h *Heimdall) Start(ctx context.Context) error
- func (h *Heimdall) StateSenderAddress() libcommon.Address
- func (f *Heimdall) StateSenderContract() *contracts.TestStateSender
- func (h *Heimdall) StateSyncEvents(ctx context.Context, fromID uint64, to int64, limit int) (uint64, []*clerk.EventRecordWithTime, error)
- func (h *Heimdall) Stop()
- type ProofGenerator
- func (pg *ProofGenerator) GenerateExitPayload(ctx context.Context, burnTxHash libcommon.Hash, eventSignature libcommon.Hash, ...) ([]byte, error)
- func (pg *ProofGenerator) NodeCreated(ctx context.Context, node devnet.Node)
- func (pg *ProofGenerator) NodeStarted(ctx context.Context, node devnet.Node)
- func (pg *ProofGenerator) Start(ctx context.Context) error
- func (pg *ProofGenerator) Stop()
Constants ¶
View Source
const ( DefaultRootChainTxConfirmations uint64 = 6 DefaultChildChainTxConfirmations uint64 = 10 DefaultAvgCheckpointLength uint64 = 256 DefaultMaxCheckpointLength uint64 = 1024 DefaultChildBlockInterval uint64 = 10000 DefaultCheckpointBufferTime time.Duration = 1000 * time.Second )
View Source
const HeimdallGrpcAddressDefault = "localhost:8540"
View Source
const LegacyMaxStateSyncSize = 100000
Maximum allowed event record data size
View Source
const MaxStateSyncSize = 30000
New max state sync size after hardfork
Variables ¶
View Source
var BridgeEvents = struct { StakingEvent BridgeEvent TopupEvent BridgeEvent ClerkEvent BridgeEvent SlashingEvent BridgeEvent }{ StakingEvent: "staking", TopupEvent: "topup", ClerkEvent: "clerk", SlashingEvent: "slashing", }
View Source
var ErrTokenIndexOutOfRange = errors.New("Index is grater than the number of tokens in transaction")
Functions ¶
Types ¶
type BridgeEvent ¶
type BridgeEvent string
type CheckpointAck ¶
type CheckpointAck struct { From libcommon.Address `json:"from"` Number uint64 `json:"number"` Proposer libcommon.Address `json:"proposer"` StartBlock uint64 `json:"start_block"` EndBlock uint64 `json:"end_block"` RootHash libcommon.Hash `json:"root_hash"` TxHash libcommon.Hash `json:"tx_hash"` LogIndex uint64 `json:"log_index"` }
type CheckpointBlock ¶
type CheckpointBlock struct { Proposer libcommon.Address `json:"proposer"` StartBlock uint64 `json:"start_block"` EndBlock uint64 `json:"end_block"` RootHash libcommon.Hash `json:"root_hash"` AccountRootHash libcommon.Hash `json:"account_root_hash"` BorChainID string `json:"bor_chain_id"` }
func (CheckpointBlock) GetSideSignBytes ¶
func (c CheckpointBlock) GetSideSignBytes() []byte
func (CheckpointBlock) GetSignBytes ¶
func (c CheckpointBlock) GetSignBytes() ([]byte, error)
func (CheckpointBlock) GetSigners ¶
func (c CheckpointBlock) GetSigners() []byte
func (CheckpointBlock) ValidateBasic ¶
func (c CheckpointBlock) ValidateBasic() error
type CheckpointConfig ¶
type ContractCheckpoint ¶
type ContractCheckpoint struct {
// contains filtered or unexported fields
}
type EventRecordWithBlock ¶
type EventRecordWithBlock struct { clerk.EventRecordWithTime BlockNumber uint64 }
type HeaderBlock ¶
type HeaderBlock struct {
// contains filtered or unexported fields
}
type Heimdall ¶
func NewHeimdall ¶
func NewHeimdall( chainConfig *chain.Config, grpcAddr string, checkpointConfig *CheckpointConfig, logger log.Logger, ) *Heimdall
func (*Heimdall) AwaitCheckpoint ¶
func (*Heimdall) FetchCheckpoint ¶
func (h *Heimdall) FetchCheckpoint(ctx context.Context, number int64) (*checkpoint.Checkpoint, error)
func (*Heimdall) FetchCheckpointCount ¶
func (*Heimdall) FetchLastNoAckMilestone ¶
func (*Heimdall) FetchMilestone ¶
func (*Heimdall) FetchMilestoneCount ¶
func (*Heimdall) FetchMilestoneID ¶
func (*Heimdall) FetchNoAckMilestone ¶
func (*Heimdall) NodeCreated ¶
func (*Heimdall) NodeStarted ¶
func (*Heimdall) RootChainAddress ¶
func (*Heimdall) StateSenderAddress ¶
func (*Heimdall) StateSenderContract ¶
func (f *Heimdall) StateSenderContract() *contracts.TestStateSender
func (*Heimdall) StateSyncEvents ¶
type ProofGenerator ¶
type ProofGenerator struct {
// contains filtered or unexported fields
}
func NewProofGenerator ¶
func NewProofGenerator() *ProofGenerator
func (*ProofGenerator) GenerateExitPayload ¶
func (*ProofGenerator) NodeCreated ¶
func (pg *ProofGenerator) NodeCreated(ctx context.Context, node devnet.Node)
func (*ProofGenerator) NodeStarted ¶
func (pg *ProofGenerator) NodeStarted(ctx context.Context, node devnet.Node)
func (*ProofGenerator) Stop ¶
func (pg *ProofGenerator) Stop()
Click to show internal directories.
Click to hide internal directories.