Reputation: 55
In the specs of the Cosmos SDK, what does the byte 0x34
in a line like this mean?
Redelegations: 0x34 | DelegatorAddr | ValidatorSrcAddr | ValidatorDstAddr -> amino(redelegation)
And I guess amino
is the decoder?
Upvotes: 3
Views: 810
Reputation: 188
When you build a blockchain with Cosmos SDK, there is a key-value store abstraction for interacting with the on-chain data. Each module has its own KV store. A module may want to store different types of data in its store and so prefixes are used to differentiate between different types in the store.
In your example, in the staking
module there are "redelegations" and each redelegation is stored in the store with a prefix of 0x34
. There are keys for other types as well.
Upvotes: 3
Reputation: 1041
0x34
is the hexadecimal number 34
. It corresponds with the decimal number 3*16+4=52
. The |
is a binary operator that uses infix notation and calculates the logical or
of the two operands.
Upvotes: 1