Home

EndBlock

EndBlock is a concept in the Tendermint consensus engine and its application interface (ABCI) used by many blockchain ecosystems, notably those built on the Cosmos SDK. It refers to the end-of-block processing step. After all transactions in a block are executed, the application receives an EndBlock request for the corresponding block height. The EndBlock method executes module logic that should occur at block boundaries and returns an EndBlockResponse.

Typically, EndBlock logic includes updating the validator set due to stake changes, processing slashing decisions, finalizing

EndBlock is distinct from BeginBlock, which handles per-block initialization tasks before transactions are processed. Together, they

In practice, EndBlock is implemented by the blockchain application. In Cosmos SDK-based chains, modules implement an

governance
outcomes,
distributing
or
scheduling
rewards,
or
performing
maintenance
tasks
such
as
advancing
unbonding
queues.
The
EndBlockResponse
may
include
ValidatorUpdates
to
alter
the
active
validator
set
and
a
list
of
consensus
parameter
updates.
It
also
carries
events
(tags)
that
observers
can
subscribe
to.
enable
modular,
per-block
state
transitions.
Implementations
must
be
deterministic
and
idempotent;
given
the
same
input,
EndBlock
should
produce
the
same
results,
to
preserve
consensus.
EndBlocker
function
that
receives
the
current
block
height
and
state,
performs
module-specific
per-block
work,
and
returns
any
validator
updates
or
parameter
changes
to
the
consensus
engine.