-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ibc: remediate remaining monorepo issues from zellic audit #4558
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// | ||
// relevant ibc-go code: | ||
// https://github.com/cosmos/ibc-go/blob/main/modules/light-clients/07-tendermint/upgrade.go#L74 | ||
// https://github.com/cosmos/ibc-go/blob/2555a7c504a904064d659e4c1a3a74000887f73d/modules/core/02-client/keeper/keeper.go#L552-L564 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. I realize we haven't tested counterparty host chain upgrade ever, maybe we should do that.
@@ -328,7 +328,7 @@ async fn main() -> anyhow::Result<()> { | |||
let randomizer = OsRng.gen::<u32>(); | |||
let chain_id = | |||
chain_id.unwrap_or_else(|| env!("PD_LATEST_TESTNET_NAME").to_string()); | |||
format!("{}-{}", chain_id, hex::encode(randomizer.to_le_bytes())) | |||
format!("{}-{}", chain_id, randomizer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N.B. this will update preview/devnet chain ids to a format like penumbra-testnet-deimos-8-722430144
, where the lattermost chunk is understood as a revision. Off the cuff, it might make more sense for the cli to default to rev 0 for devnets, but that's a bikeshedding conversation for another day. Thanks for fixing!
We automatically append a hex randomizer to devnet/preview chain ids, to avoid collisions. Client tooling may expect that suffix to be a revision number, a behavior we want to avoid. Let's stick an 'x' in the randomizer to prevent this behavior. Follow-up to #4558. Revisits and therefore closes #4552.
We automatically append a hex randomizer to devnet/preview chain ids, to avoid collisions. Client tooling may expect that suffix to be a revision number, a behavior we want to avoid. Let's stick an 'x' in the randomizer to prevent this behavior. Follow-up to #4558. Revisits and therefore closes #4552.
Closes #4549
Closes #4552
Closes #4553
Closes #4550
Closes #4546