Skip to content
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

Merged
merged 5 commits into from
Jun 10, 2024

Conversation

avahowell
Copy link
Contributor

@avahowell avahowell commented Jun 4, 2024

Closes #4549
Closes #4552
Closes #4553
Closes #4550
Closes #4546

Copy link
Member

@erwanor erwanor left a 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
Copy link
Member

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.

@erwanor erwanor added A-IBC Area: IBC integration with Penumbra consensus-breaking breaking change to execution of on-chain data labels Jun 10, 2024
@erwanor erwanor added this to the Sprint 8 milestone Jun 10, 2024
@@ -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)
Copy link
Contributor

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!

@conorsch conorsch merged commit 3ab4889 into main Jun 10, 2024
13 checks passed
@conorsch conorsch deleted the ibc-audit-pass-2 branch June 10, 2024 19:42
conorsch added a commit that referenced this pull request Jun 17, 2024
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.
avahowell pushed a commit that referenced this pull request Jun 17, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-IBC Area: IBC integration with Penumbra consensus-breaking breaking change to execution of on-chain data
Projects
Archived in project
3 participants