Injective | Documentation
InjectiveGithub
Injective | Documentation
Injective | Documentation
  • About Injective
  • Getting Started
    • Wallet
      • Create a wallet
      • Accounts
      • Staking
      • Governance
      • Auction
    • Token Standards
      • INJ coin
      • Token Factory
      • CW20 Standard
    • Transactions
      • Gas and Fees
  • Guides
    • Create a Wallet
    • Bridge
      • From Ethereum
      • Using Wormhole
      • Using IBC
      • From Solana
    • Launch a Token
    • Launch a Market
    • Denom Metadata
    • Get INJ
  • Toolkits
    • injectived
      • Install injectived
      • Using injectived
      • Commands
    • Injective TS SDK
    • Injective Go SDK
    • Injective Python SDK
    • Injective CW SDK
    • Injective Rust
    • The Graph
  • References
  • Glossary
  • Developers
    • Getting Started
      • Guides
        • Testnet Proposals
        • Convert addresses
        • Calculations
          • Min Price Tick Size
          • Min Quantity Tick Size
        • Testnet Faucet Integration
    • Exchange Developers
      • Build a DEX
      • Provider Oracle
    • Cosmwasm Developers
      • Your First Smart Contract
      • Guides
        • Local Development
        • Mainnet Deployment
        • Whitelisting deployment address
        • Create your Swap Contract
        • Creating UIs
      • Using Injective Queries and Messages
      • CW20 Adapter
      • Injective Test Tube
    • Modules
      • Injective
        • Auction
          • State
          • Messages
          • EndBlock
          • Events
          • Params
          • Errors
        • Exchange
          • Derivative Markets Concepts
          • Spot Markets Concepts
          • Binary Option Markets Concepts
          • Other Concepts
          • State
          • State Transitions
          • Messages
          • Proposals
          • BeginBlock
          • EndBlock
          • Events
          • Params
          • MsgPrivilegedExecuteContract
          • Errors
        • Insurance
          • State
          • State Transitions
          • Messages
          • EndBlock
          • Events
          • Params
          • Improvements
          • Errors
        • OCR
          • Concepts
          • State
          • Messages
          • Proposals
          • BeginBlock
          • Hooks
          • Events
          • Params
          • Errors
        • Oracle
          • State
          • Keeper
          • Messages
          • Proposals
          • Events
          • Improvements
          • Errors
        • Peggy
          • Definitions
          • Workflow
          • State
          • Messages
          • Slashing
          • EndBlock
          • Events
          • Params
          • Relay Semantics
          • Improvements
          • Errors
        • Permissions
          • Concepts
          • State
          • State Transition
          • Errors
        • TokenFactory
          • Concepts
          • State
          • Messages
          • Events
          • Params
          • Errors
        • WasmX
          • Concepts
          • Data
          • Proposals
          • Messages
          • Params
          • Errors
        • Lanes
        • TxFees
      • Core
        • Auth
        • AuthZ
        • Bank
        • Consensus
        • Crisis
        • Distribution
        • Evidence
        • Feegrant
        • Gov
        • Group
        • Mint
        • NFT
        • Params
        • Slashing
        • Staking
        • Upgrade
        • Circuit
        • Genutils
    • dApps Documentation
  • Nodes
    • Getting Started
      • Interact with a node
      • Running a node
        • Setting up the keyring
        • Join a network
        • Cosmovisor
        • Upgrade your node
    • Validators
      • Mainnet
        • Peggo
        • Canonical Chain Upgrades
          • Upgrade to 10002-rc1
          • Upgrade to 10002-rc2
          • Upgrade to 10003-rc1
          • Upgrade to 10004-rc1
          • Upgrade to 10004-rc1-patch
          • Upgrade to 10005-rc1
          • Upgrade to 10006-rc1
          • Upgrade to 10007-rc1
          • Upgrade to 10008 - Camelot
          • Upgrade to 10009
          • Upgrade to v1.10
          • Upgrade to v1.11
          • Upgrade to v1.12.0 - Volan
          • Upgrade to v1.12.1
          • Upgrade to v1.13.0 - Altaris
          • Upgrade to v1.13.2
          • Upgrade to v1.13.3
          • Upgrade to v1.14.0
          • Upgrade to v1.14.1
          • Upgrade to v1.15.0
      • Testnet
        • Testnet Peggo
    • Public Endpoints
    • Premium Endpoints
    • Injective Indexer Setup
  • Traders
    • Getting Started
    • Documentation
    • API Reference
  • Useful Links
    • Injective 101
    • Injective Hub
    • Injective Explorer
    • Chain API Reference
    • Indexer API Reference
    • Testnet Faucet
Powered by GitBook
On this page
  • 1. Slashing
  • Validator slashing
  • Batch Slashing
  • 2. Cancelling timed out batches
  • 3. Creating new Valset updates
  • 4. Pruning old validator sets
  • 5. Attestation processing
  • 6. Cleaning up processed attestations
Edit on GitHub
Export as PDF
  1. Developers
  2. Modules
  3. Injective
  4. Peggy

EndBlock

Upon the end of each block the following operations are performed to the state of the module

1. Slashing

Validator slashing

A validator is slashed for not signing over a valset update which passed the SignedValsetsWindow. In other words, if a validator fails to provide the confirmation for a valset update within a preconfigured amount of time, they will be slashed for SlashFractionValset portion of their stake and get jailed immediately.

Batch Slashing

A validator is slashed for not signing over a batch which passed the SignedBatchesWindow. In other words, if a validator fails to provide the confirmation for a batch within a preconfigured amount of time, they will be slashed for SlashFractionBatch portion of their stake and get jailed immediately.

2. Cancelling timed out batches

Any batch still present in the Outgoing Batch pool whose BatchTimeout (a designated Ethereum height by which the batch should have executed) is exceeded gets removed from the pool and the withdrawals are reinserted back into the Outgoing Tx pool.

3. Creating new Valset updates

A new Validator Set update will be created automatically when:

  • there is a power diff greater than 5% between the latest and current validator set

  • a validator begins unbonding

The new validator set is eventually relayed to Peggy contract on Ethereum.

4. Pruning old validator sets

Previously observed valsets that passed the SignedValsetsWindow are removed from the state

5. Attestation processing

Processes all attestations (an aggregate of claims for a particular event) currently being voted on. Each attestation is processed one by one to ensure each Peggy contract event is processed. After each processed attestation the module's lastObservedEventNonce and lastObservedEthereumBlockHeight are updated.

Depending on the type of claim in the attestation, the following is executed:

  • MsgDepositClaim: deposited tokens are minted/unlocked for the receiver address

  • MsgWithdrawClaim: corresponding batch is removed from the outgoing pool and any previous batch is cancelled

  • MsgValsetUpdatedClaim: the module's LastObservedValset is updated

  • MsgERC20DeployedClaim: new token metadata is validated and registered within the module's state (denom <-> token_contract)

6. Cleaning up processed attestations

Previously processed attestations (height earlier that lastObservedEthereumBlockHeight) are removed from the module state

PreviousSlashingNextEvents

Last updated 6 months ago