Documentation
¶
Index ¶
- Variables
- func EncodeValidatorUpdates(v ValidatorUpdates) []string
- type Application
- type BaseApplication
- func (BaseApplication) BeginBlock(req RequestBeginBlock) ResponseBeginBlock
- func (BaseApplication) CheckTx(req RequestCheckTx) ResponseCheckTx
- func (BaseApplication) Close() error
- func (BaseApplication) Commit() ResponseCommit
- func (BaseApplication) DeliverTx(req RequestDeliverTx) ResponseDeliverTx
- func (BaseApplication) EndBlock(req RequestEndBlock) ResponseEndBlock
- func (BaseApplication) Info(req RequestInfo) ResponseInfo
- func (BaseApplication) InitChain(req RequestInitChain) ResponseInitChain
- func (BaseApplication) Query(req RequestQuery) ResponseQuery
- func (BaseApplication) SetOption(req RequestSetOption) ResponseSetOption
- type BlockParams
- type CheckTxType
- type ConsensusParams
- func (params ConsensusParams) Hash() []byte
- func (goo ConsensusParams) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo ConsensusParams) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *ConsensusParams) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- func (params ConsensusParams) Update(params2 ConsensusParams) ConsensusParams
- type Error
- type Event
- type EventString
- func (EventString) AssertABCIEvent()
- func (err EventString) Event() string
- func (goo EventString) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo EventString) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *EventString) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type Header
- type LastCommitInfo
- type MockHeader
- func (MockHeader) AssertABCIHeader()
- func (mh MockHeader) GetChainID() string
- func (mh MockHeader) GetHeight() int64
- func (mh MockHeader) GetTime() time.Time
- func (goo MockHeader) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo MockHeader) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *MockHeader) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type Request
- type RequestBase
- type RequestBeginBlock
- type RequestCheckTx
- type RequestCommit
- type RequestDeliverTx
- type RequestEcho
- type RequestEndBlock
- type RequestFlush
- type RequestInfo
- type RequestInitChain
- type RequestQuery
- type RequestSetOption
- type Response
- type ResponseBase
- func (ResponseBase) AssertResponse()
- func (r ResponseBase) EncodeEvents() []byte
- func (r ResponseBase) IsErr() bool
- func (r ResponseBase) IsOK() bool
- func (goo ResponseBase) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo ResponseBase) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *ResponseBase) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type ResponseBeginBlock
- type ResponseCheckTx
- type ResponseCommit
- type ResponseDeliverTx
- type ResponseEcho
- type ResponseEndBlock
- type ResponseException
- type ResponseFlush
- type ResponseInfo
- type ResponseInitChain
- type ResponseQuery
- type ResponseSetOption
- type StringError
- func (StringError) AssertABCIError()
- func (err StringError) Error() string
- func (goo StringError) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo StringError) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *StringError) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type ValidatorParams
- func (params ValidatorParams) IsValidPubKeyTypeURL(pubKeyTypeURL string) bool
- func (goo ValidatorParams) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo ValidatorParams) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *ValidatorParams) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type ValidatorUpdate
- func (vu ValidatorUpdate) Equals(vu2 ValidatorUpdate) bool
- func (goo ValidatorUpdate) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo ValidatorUpdate) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *ValidatorUpdate) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type ValidatorUpdates
- type VoteInfo
Constants ¶
This section is empty.
Variables ¶
var Package = amino.RegisterPackage(amino.NewPackage( "github.com/gnolang/gno/tm2/pkg/bft/abci/types", "abci", amino.GetCallersDirname(), ). WithGoPkgName("abci"). WithDependencies( merkle.Package, ). WithTypes( RequestBase{}, RequestEcho{}, RequestFlush{}, RequestInfo{}, RequestSetOption{}, RequestInitChain{}, RequestQuery{}, RequestBeginBlock{}, RequestCheckTx{}, RequestDeliverTx{}, RequestEndBlock{}, RequestCommit{}, ResponseBase{}, ResponseException{}, ResponseEcho{}, ResponseFlush{}, ResponseInfo{}, ResponseSetOption{}, ResponseInitChain{}, ResponseQuery{}, ResponseBeginBlock{}, ResponseCheckTx{}, ResponseDeliverTx{}, ResponseEndBlock{}, ResponseCommit{}, StringError(""), ConsensusParams{}, BlockParams{}, ValidatorParams{}, ValidatorUpdate{}, LastCommitInfo{}, VoteInfo{}, EventString(""), MockHeader{}, ))
Functions ¶
func EncodeValidatorUpdates ¶
func EncodeValidatorUpdates(v ValidatorUpdates) []string
EncodeValidatorUpdates is the inverse of ParseValidatorUpdates: it formats updates as "<bech32-pubkey>:<decimal-power>" strings, sorted canonically via ValidatorUpdates.Less (pubkey-bytes — see comment at Less above).
Used by the chain's InitChainer (to seed valset:current from genesis validators) and EndBlocker (to write valset:current after applying a proposal). One canonical encoding eliminates drift between the two writers and lets round-trip tests live in one package.
The input is sorted in place. Panics on a nil PubKey at any index — genesis is operator-supplied and a nil pubkey would otherwise nil-deref inside crypto.PubKeyToBech32; panic at InitChainer surfaces as an unrecoverable genesis-misconfig error, which is the correct semantic.
Types ¶
type Application ¶
type Application interface {
// Info/Query Connection
Info(RequestInfo) ResponseInfo // Return application info
SetOption(RequestSetOption) ResponseSetOption // Set application option
Query(RequestQuery) ResponseQuery // Query for state
// Mempool Connection
CheckTx(RequestCheckTx) ResponseCheckTx // Validate a tx for the mempool
// Consensus Connection
InitChain(RequestInitChain) ResponseInitChain // Initialize blockchain with validators and other info from TendermintCore
BeginBlock(RequestBeginBlock) ResponseBeginBlock // Signals the beginning of a block
DeliverTx(RequestDeliverTx) ResponseDeliverTx // Deliver a tx for full processing
EndBlock(RequestEndBlock) ResponseEndBlock // Signals the end of a block, returns changes to the validator set
Commit() ResponseCommit // Commit the state and return the application Merkle root hash
// Cleanup
Close() error
}
Application is an interface that enables any finite, deterministic state machine to be driven by a blockchain-based replication engine via the ABCI. All methods take a RequestXxx argument and return a ResponseXxx argument, except CheckTx/DeliverTx, which take `tx []byte`, and `Commit`, which takes nothing.
type BaseApplication ¶
type BaseApplication struct{}
func NewBaseApplication ¶
func NewBaseApplication() *BaseApplication
func (BaseApplication) BeginBlock ¶
func (BaseApplication) BeginBlock(req RequestBeginBlock) ResponseBeginBlock
func (BaseApplication) CheckTx ¶
func (BaseApplication) CheckTx(req RequestCheckTx) ResponseCheckTx
func (BaseApplication) Close ¶
func (BaseApplication) Close() error
func (BaseApplication) Commit ¶
func (BaseApplication) Commit() ResponseCommit
func (BaseApplication) DeliverTx ¶
func (BaseApplication) DeliverTx(req RequestDeliverTx) ResponseDeliverTx
func (BaseApplication) EndBlock ¶
func (BaseApplication) EndBlock(req RequestEndBlock) ResponseEndBlock
func (BaseApplication) Info ¶
func (BaseApplication) Info(req RequestInfo) ResponseInfo
func (BaseApplication) InitChain ¶
func (BaseApplication) InitChain(req RequestInitChain) ResponseInitChain
func (BaseApplication) Query ¶
func (BaseApplication) Query(req RequestQuery) ResponseQuery
func (BaseApplication) SetOption ¶
func (BaseApplication) SetOption(req RequestSetOption) ResponseSetOption
type BlockParams ¶
type BlockParams struct {
MaxTxBytes int64 // must be > 0
MaxDataBytes int64 // must be > 0
MaxBlockBytes int64 // must be > 0
MaxGas int64 // must be >= -1
TimeIotaMS int64 // must be > 0
}
func (BlockParams) MarshalBinary2 ¶
func (BlockParams) SizeBinary2 ¶
func (goo BlockParams) SizeBinary2(cdc *amino.Codec) (int, error)
func (*BlockParams) UnmarshalBinary2 ¶
type CheckTxType ¶
type CheckTxType int
const ( CheckTxTypeNew CheckTxType = 0 CheckTxTypeRecheck = iota )
type ConsensusParams ¶
type ConsensusParams struct {
Block *BlockParams
Validator *ValidatorParams
}
Parameters that need to be negotiated between the app and consensus.
func (ConsensusParams) Hash ¶
func (params ConsensusParams) Hash() []byte
func (ConsensusParams) MarshalBinary2 ¶
func (ConsensusParams) SizeBinary2 ¶
func (goo ConsensusParams) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ConsensusParams) UnmarshalBinary2 ¶
func (ConsensusParams) Update ¶
func (params ConsensusParams) Update(params2 ConsensusParams) ConsensusParams
type Error ¶
type Error interface {
AssertABCIError()
Error() string
}
func ABCIErrorOrStringError ¶
type EventString ¶
type EventString string
func (EventString) AssertABCIEvent ¶
func (EventString) AssertABCIEvent()
func (EventString) Event ¶
func (err EventString) Event() string
func (EventString) MarshalBinary2 ¶
func (EventString) SizeBinary2 ¶
func (goo EventString) SizeBinary2(cdc *amino.Codec) (int, error)
func (*EventString) UnmarshalBinary2 ¶
type LastCommitInfo ¶
func (LastCommitInfo) MarshalBinary2 ¶
func (LastCommitInfo) SizeBinary2 ¶
func (goo LastCommitInfo) SizeBinary2(cdc *amino.Codec) (int, error)
func (*LastCommitInfo) UnmarshalBinary2 ¶
type MockHeader ¶
type MockHeader struct {
Version string `json:"version"`
ChainID string `json:"chain_id"`
Height int64 `json:"height"`
Time time.Time `json:"time"`
NumTxs int64 `json:"num_txs"`
TotalTxs int64 `json:"total_txs"`
}
Only used for tests.
func (MockHeader) AssertABCIHeader ¶
func (MockHeader) AssertABCIHeader()
func (MockHeader) GetChainID ¶
func (mh MockHeader) GetChainID() string
func (MockHeader) GetHeight ¶
func (mh MockHeader) GetHeight() int64
func (MockHeader) GetTime ¶
func (mh MockHeader) GetTime() time.Time
func (MockHeader) MarshalBinary2 ¶
func (MockHeader) SizeBinary2 ¶
func (goo MockHeader) SizeBinary2(cdc *amino.Codec) (int, error)
func (*MockHeader) UnmarshalBinary2 ¶
type RequestBase ¶
type RequestBase struct{}
func (RequestBase) AssertRequest ¶
func (RequestBase) AssertRequest()
func (RequestBase) MarshalBinary2 ¶
func (RequestBase) SizeBinary2 ¶
func (goo RequestBase) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestBase) UnmarshalBinary2 ¶
type RequestBeginBlock ¶
type RequestBeginBlock struct {
RequestBase
Hash []byte
Header Header
LastCommitInfo *LastCommitInfo
}
func (RequestBeginBlock) MarshalBinary2 ¶
func (RequestBeginBlock) SizeBinary2 ¶
func (goo RequestBeginBlock) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestBeginBlock) UnmarshalBinary2 ¶
type RequestCheckTx ¶
type RequestCheckTx struct {
RequestBase
Tx []byte
Type CheckTxType
}
func (RequestCheckTx) MarshalBinary2 ¶
func (RequestCheckTx) SizeBinary2 ¶
func (goo RequestCheckTx) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestCheckTx) UnmarshalBinary2 ¶
type RequestCommit ¶
type RequestCommit struct {
RequestBase
}
func (RequestCommit) MarshalBinary2 ¶
func (RequestCommit) SizeBinary2 ¶
func (goo RequestCommit) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestCommit) UnmarshalBinary2 ¶
type RequestDeliverTx ¶
type RequestDeliverTx struct {
RequestBase
Tx []byte
}
func (RequestDeliverTx) MarshalBinary2 ¶
func (RequestDeliverTx) SizeBinary2 ¶
func (goo RequestDeliverTx) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestDeliverTx) UnmarshalBinary2 ¶
type RequestEcho ¶
type RequestEcho struct {
RequestBase
Message string
}
func (RequestEcho) MarshalBinary2 ¶
func (RequestEcho) SizeBinary2 ¶
func (goo RequestEcho) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestEcho) UnmarshalBinary2 ¶
type RequestEndBlock ¶
type RequestEndBlock struct {
RequestBase
Height int64
}
func (RequestEndBlock) MarshalBinary2 ¶
func (RequestEndBlock) SizeBinary2 ¶
func (goo RequestEndBlock) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestEndBlock) UnmarshalBinary2 ¶
type RequestFlush ¶
type RequestFlush struct {
RequestBase
}
func (RequestFlush) MarshalBinary2 ¶
func (RequestFlush) SizeBinary2 ¶
func (goo RequestFlush) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestFlush) UnmarshalBinary2 ¶
type RequestInfo ¶
type RequestInfo struct {
RequestBase
}
func (RequestInfo) MarshalBinary2 ¶
func (RequestInfo) SizeBinary2 ¶
func (goo RequestInfo) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestInfo) UnmarshalBinary2 ¶
type RequestInitChain ¶
type RequestInitChain struct {
RequestBase
Time time.Time
ChainID string
ConsensusParams *ConsensusParams
Validators []ValidatorUpdate
AppState any
// InitialHeight mirrors GenesisDoc.InitialHeight. 0 or 1 means standard
// genesis at height 1; >1 means the first produced block has this
// height (chain upgrade / hardfork replay).
InitialHeight int64
}
func (RequestInitChain) MarshalBinary2 ¶
func (RequestInitChain) SizeBinary2 ¶
func (goo RequestInitChain) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestInitChain) UnmarshalBinary2 ¶
type RequestQuery ¶
type RequestQuery struct {
RequestBase
Data []byte
Path string
Height int64
Prove bool
}
func (RequestQuery) MarshalBinary2 ¶
func (RequestQuery) SizeBinary2 ¶
func (goo RequestQuery) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestQuery) UnmarshalBinary2 ¶
type RequestSetOption ¶
type RequestSetOption struct {
RequestBase
Key string
Value string
}
nondeterministic
func (RequestSetOption) MarshalBinary2 ¶
func (RequestSetOption) SizeBinary2 ¶
func (goo RequestSetOption) SizeBinary2(cdc *amino.Codec) (int, error)
func (*RequestSetOption) UnmarshalBinary2 ¶
type ResponseBase ¶
type ResponseBase struct {
Error Error
Data []byte
Events []Event
Log string // nondeterministic
Info string // nondeterministic
}
func (ResponseBase) AssertResponse ¶
func (ResponseBase) AssertResponse()
func (ResponseBase) EncodeEvents ¶
func (r ResponseBase) EncodeEvents() []byte
func (ResponseBase) IsErr ¶
func (r ResponseBase) IsErr() bool
func (ResponseBase) IsOK ¶
func (r ResponseBase) IsOK() bool
func (ResponseBase) MarshalBinary2 ¶
func (ResponseBase) SizeBinary2 ¶
func (goo ResponseBase) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseBase) UnmarshalBinary2 ¶
type ResponseBeginBlock ¶
type ResponseBeginBlock struct {
ResponseBase
}
func (ResponseBeginBlock) MarshalBinary2 ¶
func (ResponseBeginBlock) SizeBinary2 ¶
func (goo ResponseBeginBlock) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseBeginBlock) UnmarshalBinary2 ¶
type ResponseCheckTx ¶
type ResponseCheckTx struct {
ResponseBase
GasWanted int64 // nondeterministic
GasUsed int64
}
func (ResponseCheckTx) MarshalBinary2 ¶
func (ResponseCheckTx) SizeBinary2 ¶
func (goo ResponseCheckTx) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseCheckTx) UnmarshalBinary2 ¶
type ResponseCommit ¶
type ResponseCommit struct {
ResponseBase
}
func (ResponseCommit) MarshalBinary2 ¶
func (ResponseCommit) SizeBinary2 ¶
func (goo ResponseCommit) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseCommit) UnmarshalBinary2 ¶
type ResponseDeliverTx ¶
type ResponseDeliverTx struct {
ResponseBase
GasWanted int64
GasUsed int64
}
func (ResponseDeliverTx) MarshalBinary2 ¶
func (ResponseDeliverTx) SizeBinary2 ¶
func (goo ResponseDeliverTx) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseDeliverTx) UnmarshalBinary2 ¶
type ResponseEcho ¶
type ResponseEcho struct {
ResponseBase
Message string
}
func (ResponseEcho) MarshalBinary2 ¶
func (ResponseEcho) SizeBinary2 ¶
func (goo ResponseEcho) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseEcho) UnmarshalBinary2 ¶
type ResponseEndBlock ¶
type ResponseEndBlock struct {
ResponseBase
ValidatorUpdates []ValidatorUpdate
ConsensusParams *ConsensusParams
Events []Event
}
func (ResponseEndBlock) MarshalBinary2 ¶
func (ResponseEndBlock) SizeBinary2 ¶
func (goo ResponseEndBlock) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseEndBlock) UnmarshalBinary2 ¶
type ResponseException ¶
type ResponseException struct {
ResponseBase
}
nondeterministic
func (ResponseException) MarshalBinary2 ¶
func (ResponseException) SizeBinary2 ¶
func (goo ResponseException) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseException) UnmarshalBinary2 ¶
type ResponseFlush ¶
type ResponseFlush struct {
ResponseBase
}
func (ResponseFlush) MarshalBinary2 ¶
func (ResponseFlush) SizeBinary2 ¶
func (goo ResponseFlush) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseFlush) UnmarshalBinary2 ¶
type ResponseInfo ¶
type ResponseInfo struct {
ResponseBase
ABCIVersion string
AppVersion string
LastBlockHeight int64
LastBlockAppHash []byte
}
func (ResponseInfo) MarshalBinary2 ¶
func (ResponseInfo) SizeBinary2 ¶
func (goo ResponseInfo) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseInfo) UnmarshalBinary2 ¶
type ResponseInitChain ¶
type ResponseInitChain struct {
ResponseBase
ConsensusParams *ConsensusParams
Validators []ValidatorUpdate
TxResponses []ResponseDeliverTx
}
func (ResponseInitChain) MarshalBinary2 ¶
func (ResponseInitChain) SizeBinary2 ¶
func (goo ResponseInitChain) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseInitChain) UnmarshalBinary2 ¶
type ResponseQuery ¶
func (ResponseQuery) MarshalBinary2 ¶
func (ResponseQuery) SizeBinary2 ¶
func (goo ResponseQuery) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseQuery) UnmarshalBinary2 ¶
type ResponseSetOption ¶
type ResponseSetOption struct {
ResponseBase
}
nondeterministic
func (ResponseSetOption) MarshalBinary2 ¶
func (ResponseSetOption) SizeBinary2 ¶
func (goo ResponseSetOption) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ResponseSetOption) UnmarshalBinary2 ¶
type StringError ¶
type StringError string
func (StringError) AssertABCIError ¶
func (StringError) AssertABCIError()
func (StringError) Error ¶
func (err StringError) Error() string
func (StringError) MarshalBinary2 ¶
func (StringError) SizeBinary2 ¶
func (goo StringError) SizeBinary2(cdc *amino.Codec) (int, error)
func (*StringError) UnmarshalBinary2 ¶
type ValidatorParams ¶
type ValidatorParams struct {
PubKeyTypeURLs []string
}
func (ValidatorParams) IsValidPubKeyTypeURL ¶
func (params ValidatorParams) IsValidPubKeyTypeURL(pubKeyTypeURL string) bool
func (ValidatorParams) MarshalBinary2 ¶
func (ValidatorParams) SizeBinary2 ¶
func (goo ValidatorParams) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ValidatorParams) UnmarshalBinary2 ¶
type ValidatorUpdate ¶
func ParseValidatorUpdate ¶
func ParseValidatorUpdate(entry string) (ValidatorUpdate, error)
ParseValidatorUpdate parses a single "<pubkey>:<power>" entry. Address is derived from the pubkey; powers are non-negative and capped at math.MaxInt64 so the int64 cast can't overflow.
func (ValidatorUpdate) Equals ¶
func (vu ValidatorUpdate) Equals(vu2 ValidatorUpdate) bool
func (ValidatorUpdate) MarshalBinary2 ¶
func (ValidatorUpdate) SizeBinary2 ¶
func (goo ValidatorUpdate) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ValidatorUpdate) UnmarshalBinary2 ¶
type ValidatorUpdates ¶
type ValidatorUpdates []ValidatorUpdate
ValidatorUpdates is a list of validators that implements the Sort interface
func ParseValidatorUpdates ¶
func ParseValidatorUpdates(entries []string) (ValidatorUpdates, error)
ParseValidatorUpdates parses a list of "<pubkey>:<power>" entries. Errors carry the offending entry index.
func (ValidatorUpdates) Len ¶
func (v ValidatorUpdates) Len() int
func (ValidatorUpdates) Less ¶
func (v ValidatorUpdates) Less(i, j int) bool
func (ValidatorUpdates) Swap ¶
func (v ValidatorUpdates) Swap(i, j int)
func (ValidatorUpdates) UpdatesFrom ¶
func (v ValidatorUpdates) UpdatesFrom(v2 ValidatorUpdates) ValidatorUpdates
UpdatesFrom compares this ValidatorUpdates set with another (v2) and returns a new ValidatorUpdates containing only the changes needed to go from the receiver to v2. It includes:
- Removals: validators present in the receiver but missing in v2 (Power = 0).
- Power changes: validators present in both but whose Power differs.
- Additions: validators present in v2 but missing in the receiver.