celestiaorg / celestia-app

Celestia consensus node
https://celestiaorg.github.io/celestia-app/
Apache License 2.0
345 stars 292 forks source link

test: v3 e2e upgrade #3910

Closed cmwaters closed 1 month ago

cmwaters commented 1 month ago

Closes https://github.com/celestiaorg/celestia-app/issues/3772 Opens https://github.com/celestiaorg/celestia-app/issues/3947

Testing

make test-e2e MajorUpgradeToV3
test-e2e2024/10/08 22:36:00 --- ✅ PASS: MajorUpgradeToV3
rootulp commented 1 month ago
$ make test-e2e MajorUpgradeToV3
--> Running end to end tests
go run ./test/e2e MajorUpgradeToV3
test-e2e2024/09/30 10:24:36 === RUN MajorUpgradeToV3
test-e2e2024/09/30 10:24:36 Creating testnet
INFO[2024-09-30T10:24:36-04:00]log/logger.go:41 Current log level                             env_log_level=LOG_LEVEL log_level=info
ERRO[2024-09-30T10:24:41-04:00]traefik/traefik.go:355 Failed to discover Traefik API resources      error="the server could not find the requested resource"
2024/09/30 10:24:41 failed to create testnet: traefik API is not available
exit status 1
make: *** [test-e2e] Error 1

@evan-forbes @mojtaba-esk have either of you hit this?

mojtaba-esk commented 1 month ago
$ make test-e2e MajorUpgradeToV3
--> Running end to end tests
go run ./test/e2e MajorUpgradeToV3
test-e2e2024/09/30 10:24:36 === RUN MajorUpgradeToV3
test-e2e2024/09/30 10:24:36 Creating testnet
INFO[2024-09-30T10:24:36-04:00]log/logger.go:41 Current log level                             env_log_level=LOG_LEVEL log_level=info
ERRO[2024-09-30T10:24:41-04:00]traefik/traefik.go:355 Failed to discover Traefik API resources      error="the server could not find the requested resource"
2024/09/30 10:24:41 failed to create testnet: traefik API is not available
exit status 1
make: *** [test-e2e] Error 1

@evan-forbes @mojtaba-esk have either of you hit this?

yes traefik is not installed on your cluster, ask @celestiaorg/devops team to install it on your target cluster.

rootulp commented 1 month ago

Sysrex added traefik API to the Robusta cluster so this is now unblocked. The test hangs for me though:

$ make test-e2e MajorUpgradeToV3
--> Running end to end tests
go run ./test/e2e MajorUpgradeToV3
test-e2e2024/09/30 13:53:39 === RUN MajorUpgradeToV3
test-e2e2024/09/30 13:53:39 Creating testnet
INFO[2024-09-30T13:53:39-04:00]log/logger.go:41 Current log level                             env_log_level=LOG_LEVEL log_level=info
{"level":"info","scope":"runmajorupgradetov3-20240930-135339","time":"2024-09-30T13:54:04-04:00","message":"Knuu initialized"}
test-e2e2024/09/30 13:54:04 Running major upgrade to v3 test version ef37dcd
test-e2e2024/09/30 13:54:04 Creating genesis nodes
test-e2e2024/09/30 13:54:04 Creating txsim
{"level":"info","name":"txsim","directory":"/var/folders/y0/dd92_x8x4tlf397xstgwfz_c0000gn/T/txsim","time":"2024-09-30T13:54:06-04:00","message":"txsim keyring directory created"}
{"level":"info","name":"txsim","pk":"PubKeySecp256k1{0300454F0C8C5CBE6ADBFF78C2CAC1AB432041A42FA29DB24510C7A15EFA9D32B2}","time":"2024-09-30T13:54:06-04:00","message":"txsim account created and added to genesis"}
{"level":"info","name":"txsim","image":"ghcr.io/celestiaorg/txsim:ef37dcd","args":"--key-path /home/celestia --grpc-endpoint 10.45.255.174:9090 --poll-time 1s --seed 42 --upgrade-schedule 20:3","time":"2024-09-30T13:54:06-04:00","message":"created tx client"}
test-e2e2024/09/30 13:54:06 Setting up testnet
{"level":"info","name":"val0","directory":"/var/folders/y0/dd92_x8x4tlf397xstgwfz_c0000gn/T/val0","time":"2024-09-30T13:54:06-04:00","message":"Creating validator's config and data directories"}
{"level":"info","name":"val1","directory":"/var/folders/y0/dd92_x8x4tlf397xstgwfz_c0000gn/T/val1","time":"2024-09-30T13:54:06-04:00","message":"Creating validator's config and data directories"}
{"level":"info","name":"val2","directory":"/var/folders/y0/dd92_x8x4tlf397xstgwfz_c0000gn/T/val2","time":"2024-09-30T13:54:06-04:00","message":"Creating validator's config and data directories"}
{"level":"info","name":"val3","directory":"/var/folders/y0/dd92_x8x4tlf397xstgwfz_c0000gn/T/val3","time":"2024-09-30T13:54:06-04:00","message":"Creating validator's config and data directories"}
test-e2e2024/09/30 13:54:06 Starting testnet
{"level":"info","time":"2024-09-30T13:54:11-04:00","message":"create endpoint proxies for genesis nodes"}
{"level":"info","name":"val0","version":"ef37dcd","time":"2024-09-30T13:54:20-04:00","message":"started and ports forwarded"}
{"level":"info","name":"val1","version":"ef37dcd","time":"2024-09-30T13:54:25-04:00","message":"started and ports forwarded"}
{"level":"info","name":"val2","version":"ef37dcd","time":"2024-09-30T13:54:31-04:00","message":"started and ports forwarded"}
{"level":"info","name":"val3","version":"ef37dcd","time":"2024-09-30T13:54:37-04:00","message":"started and ports forwarded"}
{"level":"info","time":"2024-09-30T13:54:37-04:00","message":"waiting for genesis nodes to sync"}
{"level":"info","name":"val0","time":"2024-09-30T13:54:37-04:00","message":"waiting for node to sync"}
{"level":"debug","RPC Address":"http://151.115.14.57:80/val0-f0257b5f-26657","time":"2024-09-30T13:54:37-04:00","message":"Creating HTTP client for node"}
{"level":"info","attempts":0,"name":"val0","time":"2024-09-30T13:54:37-04:00","message":"node has synced"}
{"level":"info","name":"val1","time":"2024-09-30T13:54:37-04:00","message":"waiting for node to sync"}
{"level":"debug","RPC Address":"http://151.115.14.57:80/val1-4060741b-26657","time":"2024-09-30T13:54:37-04:00","message":"Creating HTTP client for node"}
{"level":"info","attempts":0,"name":"val1","time":"2024-09-30T13:54:38-04:00","message":"node has synced"}
{"level":"info","name":"val2","time":"2024-09-30T13:54:38-04:00","message":"waiting for node to sync"}
{"level":"debug","RPC Address":"http://151.115.14.57:80/val2-c4614da0-26657","time":"2024-09-30T13:54:38-04:00","message":"Creating HTTP client for node"}
{"level":"info","attempts":0,"name":"val2","time":"2024-09-30T13:54:38-04:00","message":"node has synced"}
{"level":"info","name":"val3","time":"2024-09-30T13:54:38-04:00","message":"waiting for node to sync"}
{"level":"debug","RPC Address":"http://151.115.14.57:80/val3-b221ba4c-26657","time":"2024-09-30T13:54:38-04:00","message":"Creating HTTP client for node"}
{"level":"info","name":"val3","attempt":0,"time":"2024-09-30T13:54:38-04:00","message":"node is not synced yet, waiting..."}
{"level":"info","name":"val3","attempt":1,"time":"2024-09-30T13:54:38-04:00","message":"node is not synced yet, waiting..."}
{"level":"info","attempts":2,"name":"val3","time":"2024-09-30T13:54:39-04:00","message":"node has synced"}
{"level":"info","name":"txsim","time":"2024-09-30T13:54:40-04:00","message":"txsim started"}
test-e2e2024/09/30 14:31:30 waiting for upgrade
{"level":"debug","RPC Address":"http://151.115.14.57:80/val0-f0257b5f-26657","time":"2024-09-30T14:31:30-04:00","message":"Creating HTTP client for node"}
height 1669
height 1671
height 1674
height 1676
height 1678
height 1680
height 1683
height 1685
height 1687
height 1690
height 1692
height 1694
height 1696
height 1699
height 1701
height 1703
height 1705
height 1708
height 1710
test-e2e2024/09/30 14:32:30 --- ERROR MajorUpgradeToV3: failed to upgrade to v3, last height: 1710
exit status 1
make: *** [test-e2e] Error 1

Update: it didn't hang, it just took forever to complete.

mojtaba-esk commented 1 month ago

Can we please merge this PR after merging #3911 as it has some updates to bump to knuu v0.16.1 ? @cmwaters @rootulp

rootulp commented 1 month ago

Sure! This PR isn't ready and https://github.com/celestiaorg/celestia-app/pull/3911 is ready.

cmwaters commented 1 month ago

I wasn't aware of this problem when testing. The last problem I experienced with this test is that the txsim wasn't able to execute the MsgSignalVersion. The keyring couldn't find the account of the validator to submit the message. So I was in the process of investigating which keys got added as I had assumed the validator keys would be part of it.

rootulp commented 1 month ago

Note to self: can see logs for txsim by looking in Lens admin@k8s-knuu-1 and then filtering to namespace like: runmajorupgradetov3-20241003-163612

txsim logs say:

Starting txsim with command:
/bin/txsim --key-path /home/celestia --grpc-endpoint 10.42.89.14:9090 --poll-time 1s --seed 42 --upgrade-schedule 20:3

Error: no sequences specified. Use --stake, --send or --blob
Usage:
  txsim [flags]

Examples:
txsim --key-path /path/to/keyring --grpc-endpoint localhost:9090 --seed 1234 --poll-time 1s --blob 5

Flags:
      --blob int                  number of blob sequences to run
      --blob-amounts string       range of blobs per PFB specified as a single value or a min-max range (e.g., 10 or 5-10). A single value indicates the exact number of blobs to be created. (default "1")
      --blob-share-version int    optionally specify a share version to use for the blob sequences (default -1)
      --blob-sizes string         range of blob sizes to send (default "100-1000")
      --feegrant                  use the feegrant module to pay for fees
      --grpc-endpoint string      grpc endpoint to a running node
  -h, --help                      help for txsim
      --key-mnemonic string       space separated mnemonic for the keyring. The hdpath used is an empty string
      --key-path string           path to the keyring
      --master string             the account name of the master account. Leaving empty will result in using the account with the most funds.
      --poll-time duration        poll time for the transaction client (default 3s)
      --seed int                  seed for the random number generator

I'm considering adding a post-hook so that the validators can submit a signal message instead of requiring txSim to do that.

Update: I don't think this test is using the new txSim binary b/c the --upgrade-schedule flag isn't listed there

rootulp commented 1 month ago
Starting txsim with command:
/bin/txsim --key-path /home/celestia --grpc-endpoint 10.44.168.16:9090 --poll-time 1s --seed 42 --blob 1 --blob-amounts 100 --blob-sizes 100-2000 --upgrade-schedule 20:3

upgradeScheduleMap: map[20:3]
{"level":"info","address":"celestia1uu3jgdyvaqdntshffs7e6j3lsqceq5wd5ugfpm","balance":9999998999899600,"time":"2024-10-04T16:59:03Z","message":"set master account"}
{"level":"info","height":17,"address":"celestia1uu3jgdyvaqdntshffs7e6j3lsqceq5wd5ugfpm","msgs":"/cosmos.bank.v1beta1.MsgSend,/cosmos.bank.v1beta1.MsgSend","time":"2024-10-04T16:59:06Z","message":"tx committed"}
{"level":"info","address":"celestia1syvxa98zd5hr25r7qjq8tja9pkd3y4tydhmzjz","balance":1000000000,"time":"2024-10-04T16:59:06Z","message":"initialized account"}
{"level":"info","address":"celestia1wuh7pqua3qm70gs6cqvkk4k49jcuk8gfrk8wt8","balance":100000,"time":"2024-10-04T16:59:06Z","message":"initialized account"}
{"level":"error","error":"key with address celestia1j3wq8c7edndasx460hwfyrm26f26frj6a3fnyp not found: key not found","address":"celestia1j3wq8c7edndasx460hwfyrm26f26frj6a3fnyp","msgs":"/celestia.signal.v1.MsgSignalVersion","time":"2024-10-04T16:59:06Z","message":"tx failed"}
{"level":"error","error":"sequence 1: key with address celestia1j3wq8c7edndasx460hwfyrm26f26frj6a3fnyp not found: key not found [celestiaorg/cosmos-sdk@v1.24.1-sdk-v0.46.16/crypto/keyring/keyring.go:489]","time":"2024-10-04T16:59:06Z","message":"sequence failed"}
{"level":"error","error":"broadcast tx error: share version 1 is not supported in 2. Supported from v3 onwards: unsupported share version","address":"celestia1syvxa98zd5hr25r7qjq8tja9pkd3y4tydhmzjz","blobs count":"100","total byte size of blobs":105956,"time":"2024-10-04T16:59:06Z","message":"tx failed"}
{"level":"error","error":"sequence 0: broadcast tx error: share version 1 is not supported in 2. Supported from v3 onwards: unsupported share version","time":"2024-10-04T16:59:06Z","message":"sequence failed"}
Error: sequence 0: broadcast tx error: share version 1 is not supported in 2. Supported from v3 onwards: unsupported share version

which makes sense because it's trying to send authored blobs before the upgrade from v2 -> v3 happens.

rootulp commented 1 month ago

I hit the error @cmwaters described

Starting txsim with command:
/bin/txsim --key-path /home/celestia --grpc-endpoint 10.45.61.218:9090 --poll-time 1s --seed 42 --blob 1 --blob-amounts 100 --blob-sizes 100-2000 --upgrade-schedule 20:3 --blob-share-version 0

upgradeScheduleMap: map[20:3]
{"level":"info","address":"celestia165t58ve34dr9kz4s9tvhtazdj0chkwshzfjwz5","balance":10000000000000000,"time":"2024-10-04T17:04:25Z","message":"set master account"}
{"level":"info","height":14,"address":"celestia165t58ve34dr9kz4s9tvhtazdj0chkwshzfjwz5","msgs":"/cosmos.bank.v1beta1.MsgSend,/cosmos.bank.v1beta1.MsgSend","time":"2024-10-04T17:04:28Z","message":"tx committed"}
{"level":"info","address":"celestia15jhfgfrmuhzj2yszdnr0wgc6vnh57sfktylm4g","balance":1000000000,"time":"2024-10-04T17:04:28Z","message":"initialized account"}
{"level":"info","address":"celestia17mhtmkp8mtp7u75sjs0jsyw7v54xqffc002q93","balance":100000,"time":"2024-10-04T17:04:28Z","message":"initialized account"}
{"level":"error","error":"key with address celestia1aq0pgp009862vskwr59785jnwc327mv6gtv5f5 not found: key not found","address":"celestia1aq0pgp009862vskwr59785jnwc327mv6gtv5f5","msgs":"/celestia.signal.v1.MsgSignalVersion","time":"2024-10-04T17:04:28Z","message":"tx failed"}
{"level":"error","error":"sequence 1: key with address celestia1aq0pgp009862vskwr59785jnwc327mv6gtv5f5 not found: key not found [celestiaorg/cosmos-sdk@v1.25.0-sdk-v0.46.16/crypto/keyring/keyring.go:489]","time":"2024-10-04T17:04:28Z","message":"sequence failed"}
rootulp commented 1 month ago

Some debug logs:

Starting txsim with command:
/bin/txsim --key-path /home/celestia --grpc-endpoint 10.35.177.178:9090 --poll-time 1s --seed 42 --blob 1 --blob-amounts 100 --blob-sizes 100-2000 --upgrade-schedule 20:3 --blob-share-version 0

keys: %!v(MISSING)
reccord name: txsim address 4318238D9FF69295A3E86EE6C699457C40773B17
upgradeScheduleMap: map[20:3]
{"level":"info","address":"celestia1gvvz8rvl76fftglgdmnvdx2903q8wwch02sph6","balance":10000000000000000,"time":"2024-10-04T17:35:26Z","message":"set master account"}
{"level":"info","height":22,"address":"celestia1gvvz8rvl76fftglgdmnvdx2903q8wwch02sph6","msgs":"/cosmos.bank.v1beta1.MsgSend,/cosmos.bank.v1beta1.MsgSend","time":"2024-10-04T17:35:29Z","message":"tx committed"}
{"level":"info","address":"celestia1zwkfr4v6scp393y36dvm9tng0rgc3dkdnesu0q","balance":1000000000,"time":"2024-10-04T17:35:29Z","message":"initialized account"}
{"level":"info","address":"celestia1jatkxmcnz825vjd6cm83zk5gdzwe9un0cxnlc7","balance":100000,"time":"2024-10-04T17:35:29Z","message":"initialized account"}
{"level":"error","error":"key with address celestia1h6aj6gp3wz405dvw2jtr9pj6hz0wuzl2w07rlk not found: key not found","address":"celestia1h6aj6gp3wz405dvw2jtr9pj6hz0wuzl2w07rlk","msgs":"/celestia.signal.v1.MsgSignalVersion","time":"2024-10-04T17:35:29Z","message":"tx failed"}
{"level":"error","error":"sequence 1: key with address celestia1h6aj6gp3wz405dvw2jtr9pj6hz0wuzl2w07rlk not found: key not found [celestiaorg/cosmos-sdk@v1.25.0-sdk-v0.46.16/crypto/keyring/keyring.go:489]","time":"2024-10-04T17:35:29Z","message":"sequence failed"}
{"level":"info","height":25,"address":"celestia1zwkfr4v6scp393y36dvm9tng0rgc3dkdnesu0q","blobs count":"100","total byte size of blobs":105956,"time":"2024-10-04T17:35:32Z","message":"tx committed"}

Looks like validator keys don't get added. Validator instances get a volume /home/celestia/.celestia-app. TxSim nodes use a temp directory to add a key.

rootulp commented 1 month ago

Still didn't work:

Starting txsim with command:
/bin/txsim --key-path /home/celestia/.celestia-app --grpc-endpoint 10.45.203.36:9090 --poll-time 1s --seed 42 --blob 1 --blob-amounts 100 --blob-sizes 100-2000 --upgrade-schedule 20:3 --blob-share-version 0

keys: {0xc00120e5d0 0xc00121e220 test {[{}] [{}]}}
reccord name: txsim address celestia1vtskfhazquysg58ufc5dq4g5jp9rfd86kdz0fc
upgradeScheduleMap: map[20:3]
{"level":"info","address":"celestia1vtskfhazquysg58ufc5dq4g5jp9rfd86kdz0fc","balance":10000000000000000,"time":"2024-10-04T17:53:41Z","message":"set master account"}
{"level":"info","height":90,"address":"celestia1vtskfhazquysg58ufc5dq4g5jp9rfd86kdz0fc","msgs":"/cosmos.bank.v1beta1.MsgSend,/cosmos.bank.v1beta1.MsgSend","time":"2024-10-04T17:53:44Z","message":"tx committed"}
{"level":"info","address":"celestia1keldxjcxavgztpmjd9yfd9fk0gsdgfded2zhwp","balance":1000000000,"time":"2024-10-04T17:53:44Z","message":"initialized account"}
{"level":"info","address":"celestia10e7r95r7v32l2q7l0rmyww6nse58xyz8mfkyn6","balance":100000,"time":"2024-10-04T17:53:44Z","message":"initialized account"}
{"level":"error","error":"key with address celestia16lnajh2lcrf8crrv3ez7l54pk2tegsgh56dk0a not found: key not found","address":"celestia16lnajh2lcrf8crrv3ez7l54pk2tegsgh56dk0a","msgs":"/celestia.signal.v1.MsgSignalVersion","time":"2024-10-04T17:53:44Z","message":"tx failed"}
{"level":"error","error":"sequence 1: key with address celestia16lnajh2lcrf8crrv3ez7l54pk2tegsgh56dk0a not found: key not found [celestiaorg/cosmos-sdk@v1.25.0-sdk-v0.46.16/crypto/keyring/keyring.go:489]","time":"2024-10-04T17:53:44Z","message":"sequence failed"}

Update: I don't see any logic to copy the keys from the validators to the txSim nodes.

rootulp commented 1 month ago

I'm having trouble importing the crypto.PrivKey from the validator into the Cosmos SDK keyring because the types are incompatible. The keyring imports a key in armored ASCII text which is different from the format the crypto.PrivKey starts with.

rootulp commented 1 month ago

Most recent commit failed b/c txsim node claims no accounts were found in keyring.

rootulp commented 1 month ago

Adding validator keys to txsim works.

Starting txsim with command:
/bin/txsim --key-path /var/folders/y0/dd92_x8x4tlf397xstgwfz_c0000gn/T/txsim --grpc-endpoint 10.36.149.103:9090 --poll-time 1s --seed 42 --blob 1 --blob-amounts 100 --blob-sizes 100-2000 --upgrade-schedule 20:3 --blob-share-version 0

keys: {0xc0012e85d0 0xc0012ea220 test {[{}] [{}]}}
reccord name: txsim address celestia1djzsle4g9hmvmy9gs0u553h7kkwul4z7ss5emx
reccord name: val0 address celestia19a8xrjtahah5hqh3ezgxx9yfy454n5qxpxjw9f
reccord name: val1 address celestia19cas48w82xyvm666fxskuh7g4pey9kmrcw7463
reccord name: val2 address celestia12m6n2e8lj7zsrxu7wrx97hjuzfu5z40p6j0wlj
reccord name: val3 address celestia1pynstc04xzp7lpfvfdzgj8zqs3zqn8se6eurjk
upgradeScheduleMap: map[20:3]
{"level":"info","address":"celestia1djzsle4g9hmvmy9gs0u553h7kkwul4z7ss5emx","balance":10000000000000000,"time":"2024-10-06T23:44:32Z","message":"set master account"}
{"level":"info","height":14,"address":"celestia1djzsle4g9hmvmy9gs0u553h7kkwul4z7ss5emx","msgs":"/cosmos.bank.v1beta1.MsgSend,/cosmos.bank.v1beta1.MsgSend","time":"2024-10-06T23:44:35Z","message":"tx committed"}
{"level":"info","address":"celestia1whr558c6gt0st638v67sl63gvtptqnksn27zmz","balance":1000000000,"time":"2024-10-06T23:44:35Z","message":"initialized account"}
{"level":"info","address":"celestia1r8retlt0z5decjrpp8ltp9fma7d9h89c40utf8","balance":100000,"time":"2024-10-06T23:44:35Z","message":"initialized account"}
{"level":"info","height":16,"address":"celestia12m6n2e8lj7zsrxu7wrx97hjuzfu5z40p6j0wlj","msgs":"/celestia.signal.v1.MsgSignalVersion","time":"2024-10-06T23:44:38Z","message":"tx committed"}
{"level":"info","height":16,"address":"celestia1whr558c6gt0st638v67sl63gvtptqnksn27zmz","blobs count":"100","total byte size of blobs":105956,"time":"2024-10-06T23:44:38Z","message":"tx committed"}
{"level":"info","height":18,"address":"celestia1r8retlt0z5decjrpp8ltp9fma7d9h89c40utf8","msgs":"/celestia.signal.v1.MsgTryUpgrade","time":"2024-10-06T23:44:41Z","message":"tx committed"}
{"level":"info","error":"sequence 1: end of sequence","time":"2024-10-06T23:44:41Z","message":"sequence terminated"}

but the sequence terminated before enough voting power signalled for it:

val3-49g58:~$ celestia-appd query signal tally 3
threshold_power: "17"
total_voting_power: "20"
voting_power: "5"
rootulp commented 1 month ago

The sequence isn't signaling for all the validators:

Starting txsim with command:
/bin/txsim --key-path /var/folders/y0/dd92_x8x4tlf397xstgwfz_c0000gn/T/txsim --grpc-endpoint 10.38.125.59:9090 --poll-time 1s --seed 42 --blob 1 --blob-amounts 100 --blob-sizes 100-2000 --upgrade-schedule 20:3 --blob-share-version 0

upgradeScheduleMap: map[20:3]
creating new upgrade sequence for height 20 and version 3
{"level":"info","address":"celestia1r3en28cft80rhps58pzlpxggnnhca6mn2aaejt","balance":10000000000000000,"time":"2024-10-07T03:00:32Z","message":"set master account"}
{"level":"info","height":14,"address":"celestia1r3en28cft80rhps58pzlpxggnnhca6mn2aaejt","msgs":"/cosmos.bank.v1beta1.MsgSend,/cosmos.bank.v1beta1.MsgSend","time":"2024-10-07T03:00:35Z","message":"tx committed"}
{"level":"info","address":"celestia1vu258ne9t6ghq8562uun0d7l4cusf32mplqslv","balance":1000000000,"time":"2024-10-07T03:00:35Z","message":"initialized account"}
{"level":"info","address":"celestia1r6sp0jztlh80jvg6ytey6h26qrvrghwjc7jfcm","balance":100000,"time":"2024-10-07T03:00:35Z","message":"initialized account"}
validators: [commission:
  commission_rates:
    max_change_rate: "1.000000000000000000"
    max_rate: "1.000000000000000000"
    rate: "0.500000000000000000"
  update_time: "2024-10-07T02:59:42.080110Z"
consensus_pubkey:
  '@type': /cosmos.crypto.ed25519.PubKey
  key: uKkXe+jSDL79IZ0WHEp7GqbrN45XK8TlGHstz1+2pUI=
delegator_shares: "5000000.000000000000000000"
description:
  details: ""
  identity: ""
  moniker: val0
  security_contact: ""
  website: ""
jailed: false

{"level":"info","height":19,"address":"celestia1vu258ne9t6ghq8562uun0d7l4cusf32mplqslv","blobs count":"100","total byte size of blobs":113088,"time":"2024-10-07T03:00:41Z","message":"tx committed"}
{"level":"info","height":19,"address":"celestia1r6sp0jztlh80jvg6ytey6h26qrvrghwjc7jfcm","msgs":"/celestia.signal.v1.MsgTryUpgrade","time":"2024-10-07T03:00:41Z","message":"tx committed"}
{"level":"info","error":"sequence 1: end of sequence","time":"2024-10-07T03:00:41Z","message":"sequence terminated"}
rootulp commented 1 month ago

e2e test passes now:

test-e2e2024/10/06 23:17:04 --- ✅ PASS: MajorUpgradeToV3

this PR just needs to be cleaned up before it's ready for review

rootulp commented 1 month ago

For posterity the two issues I found and fixed were:

  1. txsim didn't have access to the validator keys so I copied them from the genesis keyring to the txsim keyring
  2. the upgrade sequence had a bug where it prematurely submitted the MsgTryUpgrade before all validator signals were submitted
coderabbitai[bot] commented 1 month ago
📝 Walkthrough
📝 Walkthrough ## Walkthrough The changes in this pull request involve the introduction of a new file `major_upgrade_v3.go` that implements the `MajorUpgradeToV3` function, which orchestrates an upgrade process for a test network to version 3 of the Celestia application. Additionally, modifications to the `Testnet` struct and its methods in `test/e2e/testnet/testnet.go` include updates to method signatures and enhancements in account management. ## Changes | File Path | Change Summary | |------------------------------------------------|----------------------------------------------------------------------------------------------------| | `test/e2e/testnet/testnet.go` | Updated method signatures to include `upgradeSchedule` and improved account management logic. | | `test/e2e/major_upgrade_v3.go` | Added function `MajorUpgradeToV3` for managing the upgrade process to version 3 of the application. | ## Assessment against linked issues | Objective | Addressed | Explanation | |---------------------------------------------------|-----------|-----------------------------------------------| | Add an e2e major upgrade test for v3 (#3772) | ✅ | A new test for upgrading to version 3 was created in `major_upgrade_v3.go`. | ## Possibly related PRs - **#3890**: This PR introduces a test function for upgrading from version 2 to version 3, which is directly related to the `MajorUpgradeToV3` function added in the main PR. - **#3903**: This PR adds a CLI command for specifying an upgrade schedule, which complements the upgrade functionality implemented in the main PR by allowing users to define when upgrades occur in the testing environment. ## Suggested labels `testing`, `WS: Big Blonks 🔭`, `warn:api breaking` ## Suggested reviewers - cmwaters - staheri14 - evan-forbes

📜 Recent review details **Configuration used: .coderabbit.yaml** **Review profile: CHILL**
📥 Commits Files that changed from the base of the PR and between 11a01b071d280224ac1dbe750a5595069d99e826 and ae45da4a70cb17a6640524d0a78fd6107f062fd9.
📒 Files selected for processing (2) * test/e2e/major_upgrade_v3.go (1 hunks) * test/e2e/testnet/testnet.go (9 hunks)
🚧 Files skipped from review as they are similar to previous changes (1) * test/e2e/major_upgrade_v3.go
🧰 Additional context used
🔇 Additional comments (5)
test/e2e/testnet/testnet.go (5)
`33-33`: **Function `New`: Addition of `chainID` and `genesisModifiers`** The updated function signature for `New` now includes `chainID` and `genesisModifiers`, enhancing the flexibility of the testnet initialization by allowing custom chain IDs and genesis modifications. --- `113-117`: **Integration of `upgradeSchedule` in `CreateTxClients`** The addition of the `upgradeSchedule` parameter to `CreateTxClients` enables scheduling multiple upgrades, improving the testnet's ability to simulate complex upgrade scenarios. --- `132-143`: **Improved documentation for `CreateTxClient`** The detailed parameter descriptions added to the `CreateTxClient` function enhance code readability and maintainability, adhering to Go's documentation conventions. --- `146-153`: **Function `CreateTxClient`: Inclusion of `upgradeSchedule`** The function signature update correctly adds `upgradeSchedule`, preparing the `txsim` client to handle scheduled upgrades during testing. --- `478-481`: **New method `Genesis`: Accessor for genesis configuration** Adding the `Genesis` method provides access to the `genesis` field, facilitating further configurations or inspections of the genesis state as needed.
--- 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?
❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): > ‼️ **IMPORTANT** > Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged. - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
rootulp commented 1 month ago

Did you encounter a similar issue?

I encountered that on an earlier commit of this PR but thought it was fixed after subsequent commits. Hmm I can repro on the most recent commit though.

rootulp commented 1 month ago

713bd50a160d78b49da72f250a21a21d2d9a37b5 works acc95b0975f113b9a09e095515bef202e4a57f06 doesn't work 964112984f47b7d5052fffaf96172ad09f5c0fb5 doesn't work 6e4fa05ad9ee33a8ace20e279535380e45aa4640 doesn't work 11a01b071d280224ac1dbe750a5595069d99e826 doesn't work