Closed MaxMustermann2 closed 2 weeks ago
This update predominantly involves upgrading the Go version from 1.21.9 to 1.21.11 across multiple configurations including GitHub workflows, Dockerfiles, and Go modules. Additionally, significant changes were made to the dogfood
package to update the genesis state handling and validation mechanisms, introduce new fields, and improve logic for handling validator sets and epochs.
File(s) | Change Summary |
---|---|
.github/workflows/... |
Updated Go version from 1.21.9 to 1.21.11 . Modified conditional logic in several workflows to disable certain jobs. |
.golangci.yml , Dockerfile , Makefile , go.mod |
Updated Go version to 1.21.11 in various configuration files. |
app/ethtest_helper.go , app/test_helpers.go , cmd/exocored/testnet.go |
Added cosmossdk.io/math import and initialized new slices for epoch-related data. |
app/export.go |
Replaced variable validators with an empty slice of tmtypes.GenesisValidator . |
local_node.sh |
Updated JSON object manipulation keys using jq for dogfood app state. |
proto/exocore/dogfood/v1/genesis.proto |
Renamed fields, added new ones for epoch information. Introduced new messages for storing epoch-related data. |
testutil/utils.go |
Included initialization for additional empty slices and new integer value using math.NewInt(2) . |
x/delegation/types/keys.go |
Updated to use sdk.AccAddress instead of string for OperatorAddr . Added comment for TxHash validation. |
x/dogfood/keeper/... |
Introduced new functions, updated validation logic, modified how validator and epoch-related data are handled. Added imports for new types. |
x/dogfood/types/genesis.go , x/dogfood/types/genesis_test.go |
Modified NewGenesis and Validate methods to handle new fields and updated validation logic. Added imports and new entities. |
> O, the code it changes, ebb and flow,
> Upgrading Go to help it grow.
> From `.yml` files to Docker too,
> Renewed in pieces, fresh and new.
> Epochs, validators, slices neat,
> All things aligned, a bug’s defeat.
> With syntax crisp, and logic clear,
> Forward we go, no fear, no tear.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Trying to export the latest height, query the validator information before stopping the node, there are two active validators with power 5000,1001. after exporting, there is only one validator in the val_set
.
exocored q tendermint-validator-set
block_height: "159864"
total: "2"
validators:
- address: exovalcons18z3p42xn8pjk338upvzp794h02wh7p4t7jj9jx
proposer_priority: "1268"
pub_key:
type: tendermint/PubKeyEd25519
value: 8PaRnlIsW5fbLIJVv/dD+d/d162fw3ywwWcLSA0PmRQ=
voting_power: "5000"
- address: exovalcons1fllfq6nj5tc9wu8a82dtqd8axfxva48wzna4pa
proposer_priority: "-1267"
pub_key:
type: tendermint/PubKeyEd25519
value: XLtFCK0/nB1xExSXEhH5kaxRte3aIXSGaBfWSeNOtpE=
voting_power: "1001"
"dogfood": {
"consensus_addrs_to_prune": [],
"last_total_power": "6001",
"opt_out_expiries": [],
"params": {
"asset_ids": [
"0xdac17f958d2ee523a2206206994597c13d831ec7_0x65"
],
"epoch_identifier": "hour",
"epochs_until_unbonded": 7,
"historical_entries": 10000,
"max_validators": 100
},
"undelegation_maturities": [],
"val_set": [
{
"power": "5000",
"public_key": "0xf0f6919e522c5b97db2c8255bff743f9dfddd7ad9fc37cb0c1670b480d0f9914"
}
]
}
Trying to export the latest height, query the validator information before stopping the node, there are two active validators with power 5000,1001. after exporting, there is only one validator in the
val_set
.
Yes, my bad. I only tested with one operator via ./local_node.sh
. Fixed in the latest commit 97723ed by continuing the loop after the first iteration.
~The exported genesis is erroneous. I am checking.~
This has now been fixed.
{
"consensus_addrs_to_prune": [
{
"cons_addrs": [
"exovalcons1vwjcr2h5tfz0nxqnf0aw8dfslzz6nn7m00fjls"
],
"epoch": "12"
}
],
"last_total_power": "5000",
"opt_out_expiries": [
{
"epoch": "12",
"operator_acc_addrs": [
"exo1vwjcr2h5tfz0nxqnf0aw8dfslzz6nn7m4qg6kt"
]
}
],
"params": {
"asset_ids": [
"0xdac17f958d2ee523a2206206994597c13d831ec7_0x65"
],
"epoch_identifier": "minute",
"epochs_until_unbonded": 2,
"historical_entries": 10000,
"max_validators": 100
},
"undelegation_maturities": [
{
"epoch": "12",
"undelegation_record_keys": [
"0x63a581aaf45a44f998134bfae3b530f885a9cfdb"
]
}
],
"val_set": [
{
"power": "5000",
"public_key": "0xf0f6919e522c5b97db2c8255bff743f9dfddd7ad9fc37cb0c1670b480d0f9914"
}
]
}
Test passed (https://github.com/ExocoreNetwork/exocore/pull/95/commits/add0753ede5df98839ddbc9b8f3938093eedc8cf), set epoch as minute
and epochs_until_unbonded as 5, after sending opt-out-avs transaction at epoch 176. and export genesis file like:
"dogfood": {
"consensus_addrs_to_prune": [
{
"cons_addrs": [
"exovalcons1u8yx7e02wr2yvs5zk3zhvehhekh4vzxde43yra"
],
"epoch": "180"
}
],
"last_total_power": "5500",
"opt_out_expiries": [
{
"epoch": "180",
"operator_acc_addrs": [
"exo1u8yx7e02wr2yvs5zk3zhvehhekh4vzxdr6sv2x"
]
}
],
"params": {
"asset_ids": [
"0xdac17f958d2ee523a2206206994597c13d831ec7_0x65"
],
"epoch_identifier": "minute",
"epochs_until_unbonded": 5,
"historical_entries": 10000,
"max_validators": 100
},
"undelegation_maturities": [
{
"epoch": "180",
"undelegation_record_keys": [
"0xe1c86f65ea70d4464282b4457666f7cdaf5608cd"
]
}
],
"val_set": [
{
"power": "5000",
"public_key": "0xf0f6919e522c5b97db2c8255bff743f9dfddd7ad9fc37cb0c1670b480d0f9914"
},
{
"power": "500",
"public_key": "0x5cbb4508ad3f9c1d711314971211f991ac51b5edda2174866817d649e34eb691"
}
]
},
after epoch 180, export genesis file like:
"dogfood": {
"consensus_addrs_to_prune": [],
"last_total_power": "5000",
"opt_out_expiries": [],
"params": {
"asset_ids": [
"0xdac17f958d2ee523a2206206994597c13d831ec7_0x65"
],
"epoch_identifier": "minute",
"epochs_until_unbonded": 5,
"historical_entries": 10000,
"max_validators": 100
},
"undelegation_maturities": [],
"val_set": [
{
"power": "5000",
"public_key": "0xf0f6919e522c5b97db2c8255bff743f9dfddd7ad9fc37cb0c1670b480d0f9914"
}
]
},
GenesisState defines the dogfood module's genesis state. Note that, as always,
genesis
is a misnomer. Ideally, this state can be exported at any point in time (or height), and reimported elsewhere where it will be the new genesis potentially at a non-zero height. In other words, it is the entire, current, state of the module.The state consists of the following items.
ValSet
, the currently active validator setOptOutExpiries
, which refers to a list of epochs and a corresponding list of operator account addresses whose opt-outs will expire at the end of said epoch.ConsensusAddrsToPrune
which contains a similar list of epochs and a corresponding list of consensus addresses to be pruned from the operator module at the end of said epoch.UndelegationMaturities
which contains another list of epochs and a corresponding list of undelegation record keys to mature at the end of said epoch.LastTotalPower
which represents the last recorded power of the currently active validator set.For convenience:
ValSet
consists of thebytes32
key and voting power.OptOutExpiries
contain the bech32AccAddress
ConsensusAddrsToPrune
contain the bech32ConsAddress
UndelegationMaturities
contain the hex encoded record keyOther changes:
chain-id
supplied report whether the process of opting out is still under process (OptingOut
). The consensus key is stored until the opt-out epoch + unbonding duration is complete, and hence, it is returned even when the operator is in the process of opting out. To avoid confusion, anOptingOut
boolean flag is returned.init-cons-key-removal
command into itself.Summary by CodeRabbit
New Features
EpochToOperatorAddrs
,EpochToConsensusAddrs
, andEpochToUndelegationRecordKeys
.Enhancements
1.21.9
to1.21.11
across various workflows and configuration files.1.21.11
.Bug Fixes
Refactor