Skip to content

Commit cf90768

Browse files
Implement events for EVM based applications. (#3960)
## Motivation A major feature of Linera is the streams. This PR implements them for the EVM. Fixes #3785 Fixed #3966 ## Proposal The following was done: * The `LineraRuntimePrecompile` was changed so that the input is put there. So the awkward conversion with `vec` has been changed in `revm.rs`. * A lot of conversion-to-string errors have been eliminated, and the code is much simplified. * Correspondingly, the serialization has been expanded for `LineraRuntimePrecompile`. The `LineraTypes.sol` is thus expanded. * The corresponding file `LineraTypes.yaml` has been added to the code. * The `fn process_streams` has been added for the REVM.rs and a test `test_evm_process_streams_end_to_end_counters` has been added. * The `Bytes::copy_from_slice(&resul)` have been replaced by `Bytes::from(result)` * The `transact_commit` / `transact` are now taking a `Vec<u8>`, which reduces the copy operations. * Many errors `ExecutionError::EvmQuery` are replaced by `into()` and `?`. * The `execute_message` and `process_streams` are now checking for the presence of the selector which avoids having neater errors. * We now check that the `Success` does return `Return` which allows better error handling. ## Test Plan A test has been added for `process_streams` in the CI. ## Release Plan - Nothing to do / These changes follow the usual release cycle. ## Links None.
1 parent 1be9170 commit cf90768

File tree

10 files changed

+2652
-811
lines changed

10 files changed

+2652
-811
lines changed

Cargo.lock

Lines changed: 22 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ alloy-primitives = { version = "1.1.0", default-features = false, features = [
7575
"serde",
7676
"k256",
7777
] }
78-
alloy-sol-types = "1.1.0"
78+
alloy-sol-types = "1.1.2"
7979
anyhow = "1.0.80"
8080
assert_matches = "1.5.0"
8181
async-graphql = "=7.0.17"
@@ -171,7 +171,7 @@ rcgen = "0.12.1"
171171
reqwest = { version = "0.11.24", default-features = false, features = [
172172
"rustls-tls",
173173
] }
174-
revm = { version = "24.0.0", default-features = false, features = [
174+
revm = { version = "24.0.1", default-features = false, features = [
175175
"std",
176176
"kzg-rs",
177177
"secp256k1",

0 commit comments

Comments
 (0)