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

fix(core, bridge, sequencer)!: dismabiguate return addresses #1266

Merged
merged 2 commits into from
Jul 13, 2024

Conversation

SuperFluffy
Copy link
Member

@SuperFluffy SuperFluffy commented Jul 12, 2024

Summary

Ensures that bridge-withdrawer does not use a rollup address as a sequencer refund address.

Background

Bridge-withdrawer was using an address on the ethereum rollup as the sequencer refund address in the actions it was submitting to sequencer. That was wrong.

Changes

  • add a field rollup_refund_address to Ibc20WithdrawalFromRollupMemo to make its purpose clear
  • In bridge-withdrawer, set refund_address to the bridge account always (refund_address and bridge_address are now the same).
  • Sequencer now assumes that for refunds of ics20 withdrawals initiated by a rollup FungibleToketPacketData.sender is now the bridge address to which funds should be refunded. This is consistent with the change above.
  • Remove field Ibc20WithdrawalFromRollupMemo.brigde_address as it is no longer necessary.

Testing

Tests were updated and pass. This patch relies on the tests exhaustively testing the ics20 logic.

Breaking Changelist

  • This change is network-breaking because Ibc20WithdrawalFromRollupMemo is used in Sequencer's protocol.

@github-actions github-actions bot added the sequencer pertaining to the astria-sequencer crate label Jul 12, 2024
@SuperFluffy SuperFluffy changed the title fix(core, bridge, sequencer)!: separate rollup and sequencer return a… fix(core, bridge, sequencer)!: dismabiguate return addresses Jul 12, 2024
@SuperFluffy SuperFluffy marked this pull request as ready for review July 12, 2024 19:37
@SuperFluffy SuperFluffy requested review from a team, joroshiba and noot as code owners July 12, 2024 19:37
Copy link
Collaborator

@noot noot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, this looks great!

@SuperFluffy SuperFluffy added this pull request to the merge queue Jul 13, 2024
Merged via the queue into main with commit bb41dc4 Jul 13, 2024
43 checks passed
@SuperFluffy SuperFluffy deleted the superfluffy/rollup_return_address_into_memo branch July 13, 2024 08:04
steezeburger added a commit that referenced this pull request Jul 15, 2024
* main:
  feat(cli): add cmd to collect withdrawal events and submit as actions (#1261)
  fix(core, bridge, sequencer)!: dismabiguate return addresses (#1266)
  fix(withdrawer): support withdrawer address that differs from bridge address   (#1262)
  (core, sequencer)!: generate serde traits impls for all protocol protobufs (#1260)
  fix(charts): add resources for sequencer/cometbft (#1254)
  chore(sequencer)!: add metrics (#1248)
  fix(sequencer-utils): fixes issue in `parse_blob` tests (#1243)
  feat(core, proto)!: make bridge unlock memo string (#1244)
  fix(conductor): don't panic during panic (#1252)
  feat(core)!: lowerCamelCase for protobuf json mapping (#1250)
  refactor(bridge-withdrawer)!: refactor startup to a separate subtask and remove balance check from startup (#1190)
  fix: rollup archive node configurations (#1249)
  refactor(core, bridge-withdrawer)!: move bridge-unlock memo to core (#1245)
  fix(sequencer)!: store native asset ibc->trace mapping in init_chain (#1242)
steezeburger added a commit that referenced this pull request Jul 19, 2024
* main: (24 commits)
  chore: update `bytes` and `ics23` crates (#1279)
  fix(sequencer): improve and fix instrumentation (#1255)
  feature(charts): hermes chart fixes, bech32 updates, ibc bridge test (#1130)
  chore(cli): remove unused rollup cli code (#1275)
  chore(test): use a temporary file to not pollute the workspace (#1269)
  chore(sequencer): add mempool benchmarks (#1238)
  fix(bridge-withdrawer)!: fix nonce handling (#1215)
  feat(cli, bridge-withdrawer)!: share code between cli and service (#1270)
  feat(cli): add cmd to collect withdrawal events and submit as actions (#1261)
  fix(core, bridge, sequencer)!: dismabiguate return addresses (#1266)
  fix(withdrawer): support withdrawer address that differs from bridge address   (#1262)
  (core, sequencer)!: generate serde traits impls for all protocol protobufs (#1260)
  fix(charts): add resources for sequencer/cometbft (#1254)
  chore(sequencer)!: add metrics (#1248)
  fix(sequencer-utils): fixes issue in `parse_blob` tests (#1243)
  feat(core, proto)!: make bridge unlock memo string (#1244)
  fix(conductor): don't panic during panic (#1252)
  feat(core)!: lowerCamelCase for protobuf json mapping (#1250)
  refactor(bridge-withdrawer)!: refactor startup to a separate subtask and remove balance check from startup (#1190)
  fix: rollup archive node configurations (#1249)
  ...
bharath-123 pushed a commit that referenced this pull request Jul 25, 2024
## Summary
Ensures that bridge-withdrawer does not use a rollup address as a
sequencer refund address.

## Background
Bridge-withdrawer was using an address on the ethereum rollup as the
sequencer refund address in the actions it was submitting to sequencer.
That was wrong.

## Changes
- add a field `rollup_refund_address` to `Ibc20WithdrawalFromRollupMemo`
to make its purpose clear
- In bridge-withdrawer, set `refund_address` to the bridge account
always (`refund_address` and `bridge_address` are now the same).
- Sequencer now assumes that for refunds of ics20 withdrawals initiated
by a rollup `FungibleToketPacketData.sender` is now the bridge address
to which funds should be refunded. This is consistent with the change
above.
- Remove field `Ibc20WithdrawalFromRollupMemo.brigde_address` as it is
no longer necessary.

## Testing
Tests were updated and pass. This patch relies on the tests exhaustively
testing the ics20 logic.

## Breaking Changelist
- This change is network-breaking because
`Ibc20WithdrawalFromRollupMemo` is used in Sequencer's protocol.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sequencer pertaining to the astria-sequencer crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants