Documentation ¶
Index ¶
- Constants
- func BuildVerificationContext(ctx context.Context, proofBackend proof.Backend, state *proof.ExecutionState) (*bindings.VerificationContextContext, error)
- func MidLen(segLen uint64) uint64
- func MidLenWithMod(segLen uint64) uint64
- func MidState(states []*proof.ExecutionState, segStart, segLen uint64) common.Hash
- func RespondBisection(b *BaseService, challengeSession *bindings.ChallengeSession, ...) error
- func SubmitOneStepProof(challengeSession *bindings.ChallengeSession, proofBackend proof.Backend, ...) error
- type Backend
- type BaseService
- type Config
Constants ¶
View Source
const ( NODE_SCHEDULER = "scheduler" NODE_VERIFIER = "verifier" )
Variables ¶
This section is empty.
Functions ¶
func BuildVerificationContext ¶
func BuildVerificationContext(ctx context.Context, proofBackend proof.Backend, state *proof.ExecutionState) (*bindings.VerificationContextContext, error)
func MidState ¶
func MidState(states []*proof.ExecutionState, segStart, segLen uint64) common.Hash
MidState mid-states with floor index
func RespondBisection ¶
func RespondBisection( b *BaseService, challengeSession *bindings.ChallengeSession, ev *bindings.ChallengeBisected, states []*proof.ExecutionState, ) error
Responder -> startStateHash, endStateHash
Types ¶
type Backend ¶
type Backend interface { BlockChain() *core.BlockChain TxPool() *core.TxPool StateAtBlock(block *types.Block, reexec uint64, base *state.StateDB, checkLive bool, preferDisk bool) (statedb *state.StateDB, err error) }
Required interface for interacting with Ethereum instance
type BaseService ¶
type BaseService struct { Config *Config Eth Backend ProofBackend proof.Backend Chain *core.BlockChain L1 *ethclient.Client TransactOpts *bind.TransactOpts Rollup *bindings.RollupSession AssertionMap *bindings.AssertionMapCallerSession Ctx context.Context Cancel context.CancelFunc Wg sync.WaitGroup }
func NewBaseService ¶
func NewBaseService(eth Backend, proofBackend proof.Backend, cfg *Config, auth *bind.TransactOpts) (*BaseService, error)
type Config ¶
type Config struct { Node string // Rollup node type, either sequencer or validator Passphrase string // The passphrase of the coinbase account L1Endpoint string // L1 API endpoint L1ChainID uint64 // L1 chain ID L1Confirmations uint64 // L1 confirmation block number SequencerAddr common.Address // Validator only RollupAddr common.Address // L1 Rollup contract address StakeAddr common.Address // The account used for rollup assertion stake StakeAmount uint64 // Amount of stake ChallengeVerify bool EnableHsm bool HsmAPIName string HsmCreden string HsmAddress string }
Config is the configuration of rollup services
Click to show internal directories.
Click to hide internal directories.