Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
EventsProcessed = promauto.NewCounter(prometheus.CounterOpts{
Name: "events_processed_ops_total",
Help: "The total number of processed events",
})
)
Functions ¶
This section is empty.
Types ¶
type GetSignedBlocksByStartingBlockIDOpts ¶
type GetSignedBlocksByStartingBlockIDOpts struct {
StartingBlockID uint64
}
type GuardianProver ¶
type GuardianProver struct { Address common.Address ID *big.Int HealthCheckCounter prometheus.Counter SignedBlockCounter prometheus.Counter }
func SignatureToGuardianProver ¶
func SignatureToGuardianProver( msg []byte, b64EncodedSig string, guardianProvers []GuardianProver, ) (*GuardianProver, error)
type HealthCheck ¶
type HealthCheck struct { ID int `json:"id"` GuardianProverID uint64 `json:"guardianProverId"` Alive bool `json:"alive"` ExpectedAddress string `json:"expectedAddress"` RecoveredAddress string `json:"recoveredAddress"` SignedResponse string `json:"signedResponse"` LatestL1Block uint64 `json:"latestL1Block"` LatestL2Block uint64 `json:"latestL2Block"` CreatedAt time.Time `json:"createdAt"` }
type HealthCheckRepository ¶
type HealthCheckRepository interface { Get( ctx context.Context, req *http.Request, ) (paginate.Page, error) GetByGuardianProverAddress( ctx context.Context, req *http.Request, address string, ) (paginate.Page, error) GetMostRecentByGuardianProverAddress( ctx context.Context, req *http.Request, address string, ) (*HealthCheck, error) Save(ctx context.Context, opts *SaveHealthCheckOpts) error GetUptimeByGuardianProverAddress(ctx context.Context, address string) (float64, int, error) }
type SaveHealthCheckOpts ¶
type SaveSignedBlockOpts ¶
type SaveStartupOpts ¶
type SignedBlock ¶
type SignedBlockRepository ¶
type SignedBlockRepository interface { Save(ctx context.Context, opts *SaveSignedBlockOpts) error GetByStartingBlockID(ctx context.Context, opts GetSignedBlocksByStartingBlockIDOpts) ([]*SignedBlock, error) GetMostRecentByGuardianProverAddress(ctx context.Context, address string) (*SignedBlock, error) }
SignedBlockRepository defines database interaction methods to create and get signed blocks submitted by guardian provers.
type Startup ¶
type Startup struct { GuardianProverID uint64 `json:"guardianProverID"` GuardianProverAddress string `json:"guardianProverAddress"` L1NodeVersion string `json:"l1NodeVersion"` L2NodeVersion string `json:"l2NodeVersion"` Revision string `json:"revision"` GuardianVersion string `json:"guardianVersion"` CreatedAt time.Time `json:"createdAt"` }
Startup represents an individual startup from a guardian prover, every time one boots up, we should receive a startup and save it in the database.
type StartupRepository ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.