refactor(core, proto)!: define bridge memos in proto#1285
Conversation
570dcf2 to
7efa2b1
Compare
7efa2b1 to
dcfe19a
Compare
dcfe19a to
6ad69f5
Compare
There was a problem hiding this comment.
It seems as though the only breaking change here is changing the strings used for the memos. Would be good to have some discussion over this. I'm not tied to what they are, it's good to have them be designed more.
Technically it is better to have as concise as necessary field names here, as each charachter is bytes we must include in txs and thus blocks, and we should expect briding txs to be some of our absolute most common txs.
There was a problem hiding this comment.
I have changed the format of the hash and address types: before, the rust types were of type [u8; N] and serialized as base64, now they are opaque string so that the rollup can decide to write them in its favorite format.
No hard opinions on the names. I think this would be better addressed by compression of the data before being put into blocks, but maybe that would require too much of a lift. :-/
There was a problem hiding this comment.
I think a long term option would be that we could upgrade to accept json OR base64 formatted pb wire format through the memo. Less human readable, would offer the wire format elimination of names space savings.
Reviewing names, I think these do offer enhanced clarity.
6ad69f5 to
ba836bd
Compare
fdfd94b to
8927a93
Compare
| - name: Install astria cli (rust) | ||
| run: just install-cli | ||
| - name: Fetch and install celestia-appd | ||
| run: just get-celestia-appd v1.9.0 Linux x86_64 |
There was a problem hiding this comment.
This could be avoided if we make celestia-local into a stateful set. We could then kubectl execute from inside the celestia-local container, making this step unnecessary.
There was a problem hiding this comment.
I'll note that celestia-local being a statefulset is technically correct and I believe basically a oneliner + file rename for consistency.
Some concern that this creates room for key collision running locally. I think we can refactor the smoke-test in general after merge though.
There was a problem hiding this comment.
Yes, this indeed has that issue, which running directly inside a stateful set wouldn't have. Followup sounds good. I will create an issue.
| just ibc-test deploy $TAG | ||
| - name: Run IBC ICS20 Transfer test | ||
| timeout-minutes: 3 | ||
| run: just ibc-test run ./celestia ./celestia-appd |
There was a problem hiding this comment.
Similar to above: the arguments are required because we need to provide a celestia "home" directory, and the path to the celestia-appd executable. It would be neater if we could run straight from the container running celestia-appd.
joroshiba
left a comment
There was a problem hiding this comment.
Approved, I think in general the smoke tests could use cleanup but that can be follow up.
| init-ibc-bridge privateKey asset feeAsset rollupName=defaultRollupName: | ||
| astria-cli sequencer init-bridge-account \ | ||
| --rollup-name {{ rollupName }} \ | ||
| --private-key {{ privateKey }} \ | ||
| --sequencer.chain-id {{ sequencer_chain_id }} \ | ||
| --sequencer-url {{ sequencer_rpc_url }} \ | ||
| --fee-asset {{ feeAsset }} \ | ||
| --asset {{ asset }} |
There was a problem hiding this comment.
nit: duplication with above init-rollup-bridge code. this can be follow up cleanup though.
There was a problem hiding this comment.
It's a partial duplication. feeAsset and asset are hardcoded in init-rollup-bridge, and there is an additional lock command to lock to the rollup. Could be refactored.
| # operatingSystem is Linux or Darwin | ||
| # machineHardwareName is arm64 or x86_64 | ||
| celestia_default_appd_dst := "." | ||
| get-celestia-appd version operatingSystem machineHardwareName dst=celestia_default_appd_dst: |
There was a problem hiding this comment.
we have install-cli should this be install-celestia-appd?
There was a problem hiding this comment.
No, because we don't install it. cargo install foo puts foo in a well known spot (~/.cargo/bin) that is expexted to be in PATH. I don't really know where to put this binary because I don't have knowledge of the users PATH.
Either way, we can remove this entirely when moving to a stateful set.
| - name: Install astria cli (rust) | ||
| run: just install-cli | ||
| - name: Fetch and install celestia-appd | ||
| run: just get-celestia-appd v1.9.0 Linux x86_64 |
There was a problem hiding this comment.
I'll note that celestia-local being a statefulset is technically correct and I believe basically a oneliner + file rename for consistency.
Some concern that this creates room for key collision running locally. I think we can refactor the smoke-test in general after merge though.
There was a problem hiding this comment.
I think a long term option would be that we could upgrade to accept json OR base64 formatted pb wire format through the memo. Less human readable, would offer the wire format elimination of names space savings.
Reviewing names, I think these do offer enhanced clarity.
Co-authored-by: Jordan Oroshiba <jordan@astria.org>
* main: release: cut bridge withdrawer release (#1303) release: version cuts for dusk-9 (#1299) chore(core): remove ed25519_consensus from public API (#1277) chore: remove spurious entry in gitignore (#1276) chore(chart): Update EVM-Rollup Geth devTag (#1300) fix(proto)!: Change execution API to use primitive RollupId (#1291) refactor(core, proto)!: define bridge memos in proto (#1285) chore(sequencer-relayer)!: minimize resubmissions to Celestia (#1234)
…1302) ## Summary Updates the `charts/celestia-local` to spin up `celestia-appd` in a stateful set. Executes the ics20 transfer inside the celestia-app container inside the set. ## Background #1285 updates the ibc ics20 transfer test to require `celestia-appd` and an initialized celestia keystore to be present on the machine running the test. This is undesirable because it pollutes the host environment and creates potential for collisions. Turning `celestia-local` from a kubernetes deployment to a stateful set allows executing the ics20 transfer from inside the container. ## Changes - Rename `charts/celestia-local/templates/deployment.yaml -> charts/celestia-local/templates/statefulsets.yaml` - Changes `kind: Deployment -> kind: StatefulSet` in that file - Update recipes in `charts/deploy.just` to use `kubectl rollout status` instead of `kubectl wait` (the latter does not seem to work with stateful sets) - Use `kubectl exec` against the celestia-app container in the stateful set to initialize the transfer instead of a locally present `celestia-appd` ## Testing This is an update to the ibc ics20 smoke test flow. The test still passes with the expected result. ## Related Issues Closes #1296 Closes #1295
…1302) ## Summary Updates the `charts/celestia-local` to spin up `celestia-appd` in a stateful set. Executes the ics20 transfer inside the celestia-app container inside the set. ## Background #1285 updates the ibc ics20 transfer test to require `celestia-appd` and an initialized celestia keystore to be present on the machine running the test. This is undesirable because it pollutes the host environment and creates potential for collisions. Turning `celestia-local` from a kubernetes deployment to a stateful set allows executing the ics20 transfer from inside the container. ## Changes - Rename `charts/celestia-local/templates/deployment.yaml -> charts/celestia-local/templates/statefulsets.yaml` - Changes `kind: Deployment -> kind: StatefulSet` in that file - Update recipes in `charts/deploy.just` to use `kubectl rollout status` instead of `kubectl wait` (the latter does not seem to work with stateful sets) - Use `kubectl exec` against the celestia-app container in the stateful set to initialize the transfer instead of a locally present `celestia-appd` ## Testing This is an update to the ibc ics20 smoke test flow. The test still passes with the expected result. ## Related Issues Closes #1296 Closes #1295
…1302) ## Summary Updates the `charts/celestia-local` to spin up `celestia-appd` in a stateful set. Executes the ics20 transfer inside the celestia-app container inside the set. ## Background #1285 updates the ibc ics20 transfer test to require `celestia-appd` and an initialized celestia keystore to be present on the machine running the test. This is undesirable because it pollutes the host environment and creates potential for collisions. Turning `celestia-local` from a kubernetes deployment to a stateful set allows executing the ics20 transfer from inside the container. ## Changes - Rename `charts/celestia-local/templates/deployment.yaml -> charts/celestia-local/templates/statefulsets.yaml` - Changes `kind: Deployment -> kind: StatefulSet` in that file - Update recipes in `charts/deploy.just` to use `kubectl rollout status` instead of `kubectl wait` (the latter does not seem to work with stateful sets) - Use `kubectl exec` against the celestia-app container in the stateful set to initialize the transfer instead of a locally present `celestia-appd` ## Testing This is an update to the ibc ics20 smoke test flow. The test still passes with the expected result. ## Related Issues Closes #1296 Closes #1295
## Summary Defines `astria.protocol.genesis.v1alpha1.GenesisAppState`, replacing the Rust-as-JSON definition. ## Background All protocol relevant Astria types are supposed to be defined in Astria's protobuf spec. With #1285 having redefined the memos as protobuf message, this patch migrates the last type to protobuf spec. ## Changes - Define `astria.protocol.genesis.v1alpha1.GenesisAppState` and related protobuf messages - Remove the `astria-core::sequencer::GenesisState` module - Update Sequencer in terms of the protobuf type - Update all charts and snapshots (especially the genesis template) ## Testing All tests have been updated to use the new types, including snapshot tests. The genesis state is only read at `init-chain` and does not affect the evaluation of the state machine. Hence no tests should change as long as the same data is passed in (which is reflected by `tests-breaking-changes` leading to the same hash). ## Breaking Changelist This is a breaking change because an old sequencer would not understand a new (json-formatted) genesis app state and vise versa. ## Related issues Closes #1347
…(#1302) ## Summary Updates the `charts/celestia-local` to spin up `celestia-appd` in a stateful set. Executes the ics20 transfer inside the celestia-app container inside the set. ## Background astriaorg/astria#1285 updates the ibc ics20 transfer test to require `celestia-appd` and an initialized celestia keystore to be present on the machine running the test. This is undesirable because it pollutes the host environment and creates potential for collisions. Turning `celestia-local` from a kubernetes deployment to a stateful set allows executing the ics20 transfer from inside the container. ## Changes - Rename `charts/celestia-local/templates/deployment.yaml -> charts/celestia-local/templates/statefulsets.yaml` - Changes `kind: Deployment -> kind: StatefulSet` in that file - Update recipes in `charts/deploy.just` to use `kubectl rollout status` instead of `kubectl wait` (the latter does not seem to work with stateful sets) - Use `kubectl exec` against the celestia-app container in the stateful set to initialize the transfer instead of a locally present `celestia-appd` ## Testing This is an update to the ibc ics20 smoke test flow. The test still passes with the expected result. ## Related Issues Closes #1296 Closes #1295
## Summary Defines `astria.protocol.genesis.v1alpha1.GenesisAppState`, replacing the Rust-as-JSON definition. ## Background All protocol relevant Astria types are supposed to be defined in Astria's protobuf spec. With astriaorg/astria#1285 having redefined the memos as protobuf message, this patch migrates the last type to protobuf spec. ## Changes - Define `astria.protocol.genesis.v1alpha1.GenesisAppState` and related protobuf messages - Remove the `astria-core::sequencer::GenesisState` module - Update Sequencer in terms of the protobuf type - Update all charts and snapshots (especially the genesis template) ## Testing All tests have been updated to use the new types, including snapshot tests. The genesis state is only read at `init-chain` and does not affect the evaluation of the state machine. Hence no tests should change as long as the same data is passed in (which is reflected by `tests-breaking-changes` leading to the same hash). ## Breaking Changelist This is a breaking change because an old sequencer would not understand a new (json-formatted) genesis app state and vise versa. ## Related issues Closes astriaorg/astria#1347
…(#1302) ## Summary Updates the `charts/celestia-local` to spin up `celestia-appd` in a stateful set. Executes the ics20 transfer inside the celestia-app container inside the set. ## Background astriaorg/astria#1285 updates the ibc ics20 transfer test to require `celestia-appd` and an initialized celestia keystore to be present on the machine running the test. This is undesirable because it pollutes the host environment and creates potential for collisions. Turning `celestia-local` from a kubernetes deployment to a stateful set allows executing the ics20 transfer from inside the container. ## Changes - Rename `charts/celestia-local/templates/deployment.yaml -> charts/celestia-local/templates/statefulsets.yaml` - Changes `kind: Deployment -> kind: StatefulSet` in that file - Update recipes in `charts/deploy.just` to use `kubectl rollout status` instead of `kubectl wait` (the latter does not seem to work with stateful sets) - Use `kubectl exec` against the celestia-app container in the stateful set to initialize the transfer instead of a locally present `celestia-appd` ## Testing This is an update to the ibc ics20 smoke test flow. The test still passes with the expected result. ## Related Issues Closes #1296 Closes #1295
## Summary Defines `astria.protocol.genesis.v1alpha1.GenesisAppState`, replacing the Rust-as-JSON definition. ## Background All protocol relevant Astria types are supposed to be defined in Astria's protobuf spec. With astriaorg/astria#1285 having redefined the memos as protobuf message, this patch migrates the last type to protobuf spec. ## Changes - Define `astria.protocol.genesis.v1alpha1.GenesisAppState` and related protobuf messages - Remove the `astria-core::sequencer::GenesisState` module - Update Sequencer in terms of the protobuf type - Update all charts and snapshots (especially the genesis template) ## Testing All tests have been updated to use the new types, including snapshot tests. The genesis state is only read at `init-chain` and does not affect the evaluation of the state machine. Hence no tests should change as long as the same data is passed in (which is reflected by `tests-breaking-changes` leading to the same hash). ## Breaking Changelist This is a breaking change because an old sequencer would not understand a new (json-formatted) genesis app state and vise versa. ## Related issues Closes astriaorg/astria#1347
Summary
Defines the bridge unlock, ics20 withdrawal, and ics20 deposit memos as protobuf.
Background
The various memos were read inside sequencer to inform the behaviour of the protocol, but were not defined in the canonical
astria.protocol.v1alpha1protobufs. This patch defines the memo types in a newastria.protocol.v1alpha1.memosso that there is a single source of truth for all protocol-relevant objects. The memos are still only ever serialiazed as plaintextJSONand not as protobuf.Changes
astria.protocol.v1alpha1.memos.BridgeUnlockastria.protocol.v1alpha1.memos.Ics20WithdrawalFromRollupastria.protocol.v1alpha1.memos.Ics20TransferDepositastria_core::bridgemoduleastria_bridge_contracts,astria_bridge_withdrawer, andastria_sequencerto operate in terms of these typesstringso that the rollup-native formatting can be used (to make it easier to identify e.g. transactions and avoid the use of base64 for non-Astria byte slices)rollup_transaction_hash,rollup_return_address).Testing
The changes in this code rely on smoke tests still working. Because the IBC tests require the latest (rust) astria-cli, the IBC tests were reworked.
Breaking Changelist
Related Issues
Closes #1286