Documentation ¶
Index ¶
- type BlockSenderHeartbeater
- type BlockSigner
- type GuardianProverHeartBeater
- func (s *GuardianProverHeartBeater) SendHeartbeat(ctx context.Context, latestL1Block uint64, latestL2Block uint64) error
- func (s *GuardianProverHeartBeater) SendStartupMessage(ctx context.Context, revision string, version string, l1NodeVersion string, ...) error
- func (s *GuardianProverHeartBeater) SignAndSendBlock(ctx context.Context, blockID *big.Int) error
- type Heartbeater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockSenderHeartbeater ¶
type BlockSenderHeartbeater interface { BlockSigner Heartbeater }
BlockSenderHeartbeater defines an interface that communicates with a central Guardian Prover server, sending heartbeats and signed blocks (and in the future, contested blocks).
type BlockSigner ¶
type BlockSigner interface { SignAndSendBlock(ctx context.Context, blockID *big.Int) error SendStartupMessage( ctx context.Context, revision string, version string, l1NodeVersion string, l2NodeVersion string, ) error }
BlockSigner defines an interface that communicates with a central Guardian Prover server, sending signed blocks.
type GuardianProverHeartBeater ¶
type GuardianProverHeartBeater struct {
// contains filtered or unexported fields
}
GuardianProverHeartBeater is responsible for signing and sending known blocks to the health check server.
func New ¶
func New( privateKey *ecdsa.PrivateKey, healthCheckServerEndpoint *url.URL, rpc *rpc.Client, proverAddress common.Address, ) *GuardianProverHeartBeater
New creates a new GuardianProverBlockSender instance.
func (*GuardianProverHeartBeater) SendHeartbeat ¶
func (s *GuardianProverHeartBeater) SendHeartbeat( ctx context.Context, latestL1Block uint64, latestL2Block uint64, ) error
SendHeartbeat sends a heartbeat to the health check server.
func (*GuardianProverHeartBeater) SendStartupMessage ¶
func (s *GuardianProverHeartBeater) SendStartupMessage( ctx context.Context, revision string, version string, l1NodeVersion string, l2NodeVersion string, ) error
SendStartupMessage sends the startup message to the health check server.
func (*GuardianProverHeartBeater) SignAndSendBlock ¶
SignAndSendBlock signs the given block and sends it to the health check server.