-
Notifications
You must be signed in to change notification settings - Fork 992
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
Handle multiple WASMs in a single transaction #1356
Comments
We should do this in a general way, not an IBC-specific way - it should be possible to compose transactions, right? (we should allow multiple WASM blobs to be executed in sequence) |
Thank you for the comment. |
Should this batch of multiple wasms be atomic or should we allow arbitrary txs to fail while still committing the successful ones? Given that the main (but not only) use case for this is relaying IBC messages I guess it shouldn't but I'd like for a confirmation |
No, the multiple WASMs should be atomic, that's typically the desired user behaviour. We can add a flag to make it atomic/non-atomic if non-atomic behaviour is desired by IBC relayers. |
@grarco Would it be possible to re-scope this to batch IBC transactions only? |
* grarco/tx-batch: Restores `batch_size` arg for `fetch` Refactors `dispatch_tx` to return a result Refactors masp events to avoid dynamic attributes Short-circuit atomic batches at the first failure Implements a `get_tx_data` method on `Ctx` Refactors validity booleans into a `ValidityFlags` struct Refactors buckets in write log with iterator chains Misc refactors, fixes typo Improves unit tests for batches Refactors match on inner tx result Preserve txs order when constructing batch in the sdk Drops duplicated events for errored batch More unit tests for tx batching Appends inner tx result even in case of out of gas Better handling of batch errors Restores shielded sync struct in the sdk Reverts wrong shielded sync cli changes Removes broken batch section optimization Extracts ok tx result evaluation to a separate function Changes error code for batches. Fixes missing events Refactors `evaluate_tx_result`. Updates stats Renames `TxInfo` and fixes write log commit in `finalize_block` Refactors stats accounting Reverts `TryFrom` impls for ethereum data to `Tx` Changelog #1356 Adds unit tests for tx batches Updates tx types comparisons and avoid duplicated signatures for batches Updates error message in ibc test Fixes bug in wrapper keys Fixes fee payemnt logic and unit tests Recomputes signatures for localnet genesis Clippy fix Removes unused `Ciphertext` section Updates `add_inner_tx` to avoid duplicated sections Adds new `mk_tx_batch` for unit testing Fixes tx interface to attach a new inner tx Updates comments Adds an SDK function to construct tx batches Renames `Commitments` and update docs Refactors the batch write log Refactors tx result handling in `finalize_block` Removes custom borsh impls for `BatchedTx` and `BatchedTxRef` More refactoring Misc refactoring Fixes benchmarks Fixes integration tests Fixes wasm tests Refactors test envs Fixes serialization of tx result and unit tests Rebuilds wasm for tests Recomputes genesis signatures. Fixes missing commitments in tests Updates `VpEval` Fixes wasm for test. Clippy + fmt Updates wasm interface and codes Renames batched txs structs Misc updates to write log. Updates tx result handling in `finalize_block` Updates `WriteLog` to support tx batches Improves handling of txs' results in `dispatch_tx` and `finalize_block` Introduces `OwnedBatchedTx` for benchmarks. Fixes benches and tests Generic `TxResult` Updates contexts for batched transactions. Misc updates to protocol Updates logs and tx result to support batching Adds `BatchedTx` struct and updated the native vps and transactions execution Updates core tx methods and masp client functions Adds multiple tx commitments in `Header`
* origin/grarco/tx-batch: Restores `batch_size` arg for `fetch` Refactors `dispatch_tx` to return a result Refactors masp events to avoid dynamic attributes Short-circuit atomic batches at the first failure Implements a `get_tx_data` method on `Ctx` Refactors validity booleans into a `ValidityFlags` struct Refactors buckets in write log with iterator chains Misc refactors, fixes typo Improves unit tests for batches Refactors match on inner tx result Preserve txs order when constructing batch in the sdk Drops duplicated events for errored batch More unit tests for tx batching Appends inner tx result even in case of out of gas Better handling of batch errors Restores shielded sync struct in the sdk Reverts wrong shielded sync cli changes Removes broken batch section optimization Extracts ok tx result evaluation to a separate function Changes error code for batches. Fixes missing events Refactors `evaluate_tx_result`. Updates stats Renames `TxInfo` and fixes write log commit in `finalize_block` Refactors stats accounting Reverts `TryFrom` impls for ethereum data to `Tx` Changelog #1356 Adds unit tests for tx batches Updates tx types comparisons and avoid duplicated signatures for batches Updates error message in ibc test Fixes bug in wrapper keys Fixes fee payemnt logic and unit tests Recomputes signatures for localnet genesis Clippy fix Removes unused `Ciphertext` section Updates `add_inner_tx` to avoid duplicated sections Adds new `mk_tx_batch` for unit testing Fixes tx interface to attach a new inner tx Updates comments Adds an SDK function to construct tx batches Renames `Commitments` and update docs Refactors the batch write log Refactors tx result handling in `finalize_block` Removes custom borsh impls for `BatchedTx` and `BatchedTxRef` More refactoring Misc refactoring Fixes benchmarks Fixes integration tests Fixes wasm tests Refactors test envs Fixes serialization of tx result and unit tests Rebuilds wasm for tests Recomputes genesis signatures. Fixes missing commitments in tests Updates `VpEval` Fixes wasm for test. Clippy + fmt Updates wasm interface and codes Renames batched txs structs Misc updates to write log. Updates tx result handling in `finalize_block` Updates `WriteLog` to support tx batches Improves handling of txs' results in `dispatch_tx` and `finalize_block` Introduces `OwnedBatchedTx` for benchmarks. Fixes benches and tests Generic `TxResult` Updates contexts for batched transactions. Misc updates to protocol Updates logs and tx result to support batching Adds `BatchedTx` struct and updated the native vps and transactions execution Updates core tx methods and masp client functions Adds multiple tx commitments in `Header`
* origin/grarco/tx-batch: Restores `batch_size` arg for `fetch` Refactors `dispatch_tx` to return a result Refactors masp events to avoid dynamic attributes Short-circuit atomic batches at the first failure Implements a `get_tx_data` method on `Ctx` Refactors validity booleans into a `ValidityFlags` struct Refactors buckets in write log with iterator chains Misc refactors, fixes typo Improves unit tests for batches Refactors match on inner tx result Preserve txs order when constructing batch in the sdk Drops duplicated events for errored batch More unit tests for tx batching Appends inner tx result even in case of out of gas Better handling of batch errors Restores shielded sync struct in the sdk Reverts wrong shielded sync cli changes Removes broken batch section optimization Extracts ok tx result evaluation to a separate function Changes error code for batches. Fixes missing events Refactors `evaluate_tx_result`. Updates stats Renames `TxInfo` and fixes write log commit in `finalize_block` Refactors stats accounting Reverts `TryFrom` impls for ethereum data to `Tx` Changelog #1356 Adds unit tests for tx batches Updates tx types comparisons and avoid duplicated signatures for batches Updates error message in ibc test Fixes bug in wrapper keys Fixes fee payemnt logic and unit tests Recomputes signatures for localnet genesis Clippy fix Removes unused `Ciphertext` section Updates `add_inner_tx` to avoid duplicated sections Adds new `mk_tx_batch` for unit testing Fixes tx interface to attach a new inner tx Updates comments Adds an SDK function to construct tx batches Renames `Commitments` and update docs Refactors the batch write log Refactors tx result handling in `finalize_block` Removes custom borsh impls for `BatchedTx` and `BatchedTxRef` More refactoring Misc refactoring Fixes benchmarks Fixes integration tests Fixes wasm tests Refactors test envs Fixes serialization of tx result and unit tests Rebuilds wasm for tests Recomputes genesis signatures. Fixes missing commitments in tests Updates `VpEval` Fixes wasm for test. Clippy + fmt Updates wasm interface and codes Renames batched txs structs Misc updates to write log. Updates tx result handling in `finalize_block` Updates `WriteLog` to support tx batches Improves handling of txs' results in `dispatch_tx` and `finalize_block` Introduces `OwnedBatchedTx` for benchmarks. Fixes benches and tests Generic `TxResult` Updates contexts for batched transactions. Misc updates to protocol Updates logs and tx result to support batching Adds `BatchedTx` struct and updated the native vps and transactions execution Updates core tx methods and masp client functions Adds multiple tx commitments in `Header`
* origin/grarco/tx-batch: Restores `batch_size` arg for `fetch` Refactors `dispatch_tx` to return a result Refactors masp events to avoid dynamic attributes Short-circuit atomic batches at the first failure Implements a `get_tx_data` method on `Ctx` Refactors validity booleans into a `ValidityFlags` struct Refactors buckets in write log with iterator chains Misc refactors, fixes typo Improves unit tests for batches Refactors match on inner tx result Preserve txs order when constructing batch in the sdk Drops duplicated events for errored batch More unit tests for tx batching Appends inner tx result even in case of out of gas Better handling of batch errors Restores shielded sync struct in the sdk Reverts wrong shielded sync cli changes Removes broken batch section optimization Extracts ok tx result evaluation to a separate function Changes error code for batches. Fixes missing events Refactors `evaluate_tx_result`. Updates stats Renames `TxInfo` and fixes write log commit in `finalize_block` Refactors stats accounting Reverts `TryFrom` impls for ethereum data to `Tx` Changelog #1356 Adds unit tests for tx batches Updates tx types comparisons and avoid duplicated signatures for batches Updates error message in ibc test Fixes bug in wrapper keys Fixes fee payemnt logic and unit tests Recomputes signatures for localnet genesis Clippy fix Removes unused `Ciphertext` section Updates `add_inner_tx` to avoid duplicated sections Adds new `mk_tx_batch` for unit testing Fixes tx interface to attach a new inner tx Updates comments Adds an SDK function to construct tx batches Renames `Commitments` and update docs Refactors the batch write log Refactors tx result handling in `finalize_block` Removes custom borsh impls for `BatchedTx` and `BatchedTxRef` More refactoring Misc refactoring Fixes benchmarks Fixes integration tests Fixes wasm tests Refactors test envs Fixes serialization of tx result and unit tests Rebuilds wasm for tests Recomputes genesis signatures. Fixes missing commitments in tests Updates `VpEval` Fixes wasm for test. Clippy + fmt Updates wasm interface and codes Renames batched txs structs Misc updates to write log. Updates tx result handling in `finalize_block` Updates `WriteLog` to support tx batches Improves handling of txs' results in `dispatch_tx` and `finalize_block` Introduces `OwnedBatchedTx` for benchmarks. Fixes benches and tests Generic `TxResult` Updates contexts for batched transactions. Misc updates to protocol Updates logs and tx result to support batching Adds `BatchedTx` struct and updated the native vps and transactions execution Updates core tx methods and masp client functions Adds multiple tx commitments in `Header`
We want to put multiple IBC messages into a transaction so that an IBC relayer (Hermes) can request IBC transactions efficiently.
P.S. By supporting a transaction with multiple WASMs
The text was updated successfully, but these errors were encountered: