BlockKeeperEpochContract.abi.json

Overview

This file defines the Application Binary Interface (ABI) for the BlockKeeperEpochContract, a smart contract responsible for managing the lifecycle and state of block keepers within an epoch-based system. The contract facilitates operations such as initializing block keepers with stake and public keys, managing stake continuation, slashing penalties, lifecycle control (including destruction), and querying contract details. The ABI format describes the contract's functions, their inputs and outputs, and the state variables (fields) maintained by the contract.

The contract’s primary role is to handle stake management and reputation within a system where multiple block keepers operate over defined epochs, ensuring proper continuation, penalization, and destruction mechanisms align with the system’s epoch lifecycle.


Classes, Functions, and Methods

The file does not define traditional classes but instead specifies the contract interface with a set of functions and state fields. These functions represent the callable methods on the smart contract.

Functions

constructor

setStake

continueStake

cancelContinueStake

slash

touch

cantDelete

canDelete

destroy

destroy_full_slash

getDetails

getProxyListContinue

getEpochCoolerCodeHash

getVersion


Fields (State Variables)

The contract maintains numerous state variables, which store configuration and state data:


Important Implementation Details


Interaction with Other Parts of the System


Diagram: Contract Function and State Interaction Flow

flowchart TD
constructor --> setStake
setStake --> continueStake
continueStake --> cancelContinueStake
continueStake --> getProxyListContinue
continueStake --> getDetails
slash --> destroy_full_slash
canDelete --> destroy
touch --> cantDelete
getVersion --> getEpochCoolerCodeHash
subgraph State Variables
_pubkey
_bls_pubkey
_stake
_licenses
_proxyListContinue
_reward_sum
_signerIndex
_isContinue
_nodeVersion
_is_full_slashing
end
constructor -->|sets| _pubkey
constructor -->|sets| _bls_pubkey
constructor -->|sets| _licenses
setStake -->|updates| _stake
continueStake -->|updates| _proxyListContinue
slash -->|sets| _is_full_slashing
destroy -->|clears| _stake
getDetails -->|reads| State Variables
getProxyListContinue -->|reads| _proxyListContinue

This flowchart illustrates the primary function call relationships and their impact on key state variables within the contract. It highlights the lifecycle from construction through stake management, continuation, slashing, and potential destruction.