diff --git a/Cargo.lock b/Cargo.lock index bd11682..7c678b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -351,9 +351,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" [[package]] name = "cfg-if" @@ -755,9 +755,9 @@ checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fastrlp" @@ -868,9 +868,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" @@ -968,7 +968,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -1080,9 +1080,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libm" @@ -1348,8 +1348,8 @@ dependencies = [ [[package]] name = "polkavm" -version = "0.9.3" -source = "git+https://github.com/koute/polkavm.git#4ca06cc1b7cb435b2b92e81e30c2eb0e988f563e" +version = "0.10.0" +source = "git+https://github.com/koute/polkavm.git?rev=e2801d9#e2801d9f34211fb5e16aee36a81700ad450c50e5" dependencies = [ "libc", "log", @@ -1360,27 +1360,27 @@ dependencies = [ [[package]] name = "polkavm-assembler" -version = "0.9.0" -source = "git+https://github.com/koute/polkavm.git#4ca06cc1b7cb435b2b92e81e30c2eb0e988f563e" +version = "0.10.0" +source = "git+https://github.com/koute/polkavm.git?rev=e2801d9#e2801d9f34211fb5e16aee36a81700ad450c50e5" dependencies = [ "log", ] [[package]] name = "polkavm-common" -version = "0.9.0" -source = "git+https://github.com/koute/polkavm.git#4ca06cc1b7cb435b2b92e81e30c2eb0e988f563e" +version = "0.10.0" +source = "git+https://github.com/koute/polkavm.git?rev=e2801d9#e2801d9f34211fb5e16aee36a81700ad450c50e5" dependencies = [ "log", ] [[package]] name = "polkavm-linker" -version = "0.9.2" -source = "git+https://github.com/koute/polkavm.git#4ca06cc1b7cb435b2b92e81e30c2eb0e988f563e" +version = "0.10.0" +source = "git+https://github.com/koute/polkavm.git?rev=e2801d9#e2801d9f34211fb5e16aee36a81700ad450c50e5" dependencies = [ "gimli", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "log", "object", "polkavm-common", @@ -1390,8 +1390,8 @@ dependencies = [ [[package]] name = "polkavm-linux-raw" -version = "0.9.0" -source = "git+https://github.com/koute/polkavm.git#4ca06cc1b7cb435b2b92e81e30c2eb0e988f563e" +version = "0.10.0" +source = "git+https://github.com/koute/polkavm.git?rev=e2801d9#e2801d9f34211fb5e16aee36a81700ad450c50e5" [[package]] name = "ppv-lite86" @@ -1675,6 +1675,8 @@ dependencies = [ "polkavm", "revive-differential", "revive-solidity", + "serde", + "serde_json", "sha1", ] @@ -1920,18 +1922,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" dependencies = [ "proc-macro2", "quote", @@ -2260,9 +2262,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" [[package]] name = "valuable" @@ -2396,9 +2398,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134306a13c5647ad6453e8deaec55d3a44d6021970129e6188735e74bf546697" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ "windows-sys 0.52.0", ] diff --git a/Cargo.toml b/Cargo.toml index 902f9e2..9db6a7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,9 +27,9 @@ path-slash = "0.2" rayon = "1.8" structopt = { version = "0.3", default-features = false } rand = "0.8" -polkavm-common = { git = "https://github.com/koute/polkavm.git" } -polkavm-linker = { git = "https://github.com/koute/polkavm.git" } -polkavm = { git = "https://github.com/koute/polkavm.git" } +polkavm-common = { git = "https://github.com/koute/polkavm.git", rev = "e2801d9" } +polkavm-linker = { git = "https://github.com/koute/polkavm.git", rev = "e2801d9" } +polkavm = { git = "https://github.com/koute/polkavm.git", rev = "e2801d9" } alloy-primitives = "0.6" alloy-sol-types = "0.6" env_logger = { version = "0.10.0", default-features = false } @@ -49,3 +49,4 @@ features = ["serde", "llvm18-0", "no-libffi-linking", "target-riscv"] [profile.benchmark] inherits = "release" lto = true +codegen-units = 1 diff --git a/crates/benchmarks/benches/execute.rs b/crates/benchmarks/benches/execute.rs index 70de49a..61594bb 100644 --- a/crates/benchmarks/benches/execute.rs +++ b/crates/benchmarks/benches/execute.rs @@ -5,10 +5,6 @@ use criterion::{ criterion_group, criterion_main, measurement::Measurement, BenchmarkGroup, BenchmarkId, Criterion, }; -#[cfg(any(feature = "bench-pvm-interpreter", feature = "bench-pvm"))] -use polkavm::BackendKind; - -use revive_benchmarks::prepare_pvm; use revive_integration::cases::Contract; fn bench
(mut group: BenchmarkGroup<'_, M>, parameters: &[P], labels: &[L], contract: I)
@@ -35,10 +31,10 @@ where
#[cfg(feature = "bench-pvm-interpreter")]
{
let contract = contract(p.clone());
- let (state, mut instance, export) = prepare_pvm(
+ let (state, mut instance, export) = revive_benchmarks::prepare_pvm(
&contract.pvm_runtime,
&contract.calldata,
- BackendKind::Interpreter,
+ polkavm::BackendKind::Interpreter,
);
group.bench_with_input(BenchmarkId::new("PVMInterpreter", l), p, |b, _| {
b.iter(|| {
@@ -50,10 +46,10 @@ where
#[cfg(feature = "bench-pvm")]
{
let contract = contract(p.clone());
- let (state, mut instance, export) = prepare_pvm(
+ let (state, mut instance, export) = revive_benchmarks::prepare_pvm(
&contract.pvm_runtime,
&contract.calldata,
- BackendKind::Compiler,
+ polkavm::BackendKind::Compiler,
);
group.bench_with_input(BenchmarkId::new("PVM", l), p, |b, _| {
b.iter(|| {
@@ -66,40 +62,34 @@ where
group.finish();
}
-#[cfg(feature = "bench-extensive")]
-fn group_extensive<'error, M>(
- c: &'error mut Criterion