Skip to content

feat(core, proto)!: make bridge unlock memo string#1244

Merged
SuperFluffy merged 1 commit intomainfrom
superfluffy/memo-is-string
Jul 9, 2024
Merged

feat(core, proto)!: make bridge unlock memo string#1244
SuperFluffy merged 1 commit intomainfrom
superfluffy/memo-is-string

Conversation

@SuperFluffy
Copy link
Contributor

Summary

Changes the memo field of bridge unlock actions from bytes to string.

Background

IBC convention is to format all memos as json and encode as string rather than bytes when sending them over the wire. The astria.protocol.transactions.v1alpha1.Ics20Withdrawal.memo field is also string, so this change brings astria.protocol.transactions.v1alpha1.BridgeUnlockAction.memo in line.

Changes

  • Change astria.protocol.transactions.v1alpha1.BridgeUnlockAction.memo from bytes to string

Testing

All tests are updated and pass.

Breaking Changelist

This constitutes a breaking protobuf-change (as flagged by buf) but very likely neither a deployment nor network breaking change:

  • bytes and string are wire-compatible (from a protobuf point of view)
  • sequencer only passes the memo field through
  • bridge-withdrawer will be able to parse both formats as a Rust String is just Vec<u8> with extra checks for utf8 under the hood.

This change is only cosmetic, but marked as breaking due to buf.

@SuperFluffy SuperFluffy requested review from a team as code owners July 8, 2024 16:53
@github-actions github-actions bot added proto pertaining to the Astria Protobuf spec sequencer pertaining to the astria-sequencer crate labels Jul 8, 2024
@SuperFluffy SuperFluffy added this pull request to the merge queue Jul 9, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 9, 2024
@SuperFluffy SuperFluffy added this pull request to the merge queue Jul 9, 2024
Merged via the queue into main with commit afd8bcb Jul 9, 2024
@SuperFluffy SuperFluffy deleted the superfluffy/memo-is-string branch July 9, 2024 15:01
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
Changes the memo field of bridge unlock actions from `bytes` to
`string`.

## Background
IBC convention is to format all memos as json and encode as `string`
rather than `bytes` when sending them over the wire. The
`astria.protocol.transactions.v1alpha1.Ics20Withdrawal.memo` field is
also `string`, so this change brings
`astria.protocol.transactions.v1alpha1.BridgeUnlockAction.memo` in line.

## Changes
- Change `astria.protocol.transactions.v1alpha1.BridgeUnlockAction.memo`
from `bytes` to `string`

## Testing
All tests are updated and pass.

## Breaking Changelist
This constitutes a breaking protobuf-change (as flagged by `buf`) but
very likely neither a deployment nor network breaking change:

+ `bytes` and `string` are wire-compatible (from a protobuf point of
view)
+ `sequencer` only passes the memo field through
+ `bridge-withdrawer` will be able to parse both formats as a Rust
`String` is just `Vec<u8>` with extra checks for utf8 under the hood.

This change is only cosmetic, but marked as breaking due to `buf`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proto pertaining to the Astria Protobuf spec sequencer pertaining to the astria-sequencer crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants