Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
bbb49c7
refactor(revive): use uint64 in Counter.sol fixture
pgherveou Feb 12, 2026
baf2ce0
refactor(revive): replace k256 with sp_core::ecdsa in benchmarks
pgherveou Feb 12, 2026
24b89ef
refactor(revive): add debug log for eth_transact substrate tx hash
pgherveou Feb 12, 2026
30876c2
fix(revive): minor formatting fixes
pgherveou Feb 12, 2026
825d3b6
fix(revive): fix Transaction7702Signed RLP decoding field order
pgherveou Feb 12, 2026
490aa77
refactor(revive): upgrade to Rust 2024 edition
pgherveou Feb 12, 2026
bc56bb5
refactor(revive): use if-let chains from Rust 2024 edition
pgherveou Feb 13, 2026
6a6d944
Update from github-actions[bot] running command 'prdoc --audience run…
github-actions[bot] Feb 13, 2026
63a7418
PR review
pgherveou Feb 13, 2026
4e98087
fixes
pgherveou Feb 13, 2026
211d333
Apply suggestion from @pgherveou
pgherveou Feb 13, 2026
cc9b2f9
fix(ci): revert accidental cargo update and bump parity-publish to 0.…
pgherveou Feb 13, 2026
2c79f83
Merge branch 'master' into pg/revive-cleanup
pgherveou Feb 13, 2026
b060e30
restore lock
pgherveou Feb 13, 2026
a35e2cc
fix(ci): downgrade parity-publish to 0.10.6 for Rust 1.88 compatibility
pgherveou Feb 13, 2026
309d83a
fix: add cargo-features for edition2024 in revive crates
pgherveou Feb 13, 2026
89b2ddc
fix(prdoc): add validate: false for Transaction7702 API change
pgherveou Feb 13, 2026
244be53
fix: remove unnecessary cargo-features for edition2024
pgherveou Feb 13, 2026
d2c0d41
Revert "fix: remove unnecessary cargo-features for edition2024"
pgherveou Feb 13, 2026
7c69b01
Merge branch 'master' into pg/revive-cleanup
pgherveou Feb 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/publish-check-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Install Rust
run: |
RUST_VERSION=$(cat .github/env | sed -E 's/.*ci-unified:[^-]+-([^-]+).*/\1/')
rustup install $RUST_VERSION
rustup default $RUST_VERSION

- name: Rust Cache
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-claim-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/master' }}

- name: install parity-publish
run: cargo install parity-publish@0.10.4 --locked -q
run: cargo install parity-publish@0.10.6 --locked -q

- name: parity-publish claim
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-80_publish-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
cache-on-failure: true

- name: Install parity-publish
run: cargo install parity-publish@0.10.9 --locked -q
run: cargo install parity-publish@0.10.6 --locked -q

- name: Run parity-publish plan
run: |
Expand Down
22 changes: 22 additions & 0 deletions prdoc/pr_11054.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
title: 'pallet-revive: minor cleanups and fixes'
doc:
- audience: Runtime Dev
description: |-
## Summary

Preparatory cleanup PR extracted from the EIP-7702 branch to simplify review.

- **Counter.sol uint64**: Change `uint256` to `uint64` in Counter/NestedCounter fixtures, to avoid U256 conversion in tests.
- **Remove k256 dependency**: Replace `k256::ecdsa::SigningKey` with `sp_core::ecdsa::Pair` in benchmark signing helpers
- **Debug log**: Add debug log for `eth_transact` substrate tx hash
- **Formatting**: Fix indentation in call.rs closure body, remove stray blank line in lib.rs
- **RLP fix**: Fix `Transaction7702Signed` decoder field order (removed incorrect `gas_price` field at index 4, aligned with encoder)
crates:
- name: pallet-revive-fixtures
bump: patch
- name: pallet-revive
bump: patch
validate: false
- name: pallet-revive-eth-rpc
bump: patch
validate: false
4 changes: 3 additions & 1 deletion substrate/frame/revive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cargo-features = ["edition2024"]

[package]
name = "pallet-revive"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
edition = "2024"
license = "Apache-2.0"
homepage.workspace = true
repository.workspace = true
Expand Down
10 changes: 5 additions & 5 deletions substrate/frame/revive/fixtures/contracts/Counter.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Counter {
uint256 public number;
uint64 public number;

constructor() {
number = 3;
}

function setNumber(uint256 newNumber) public returns (uint256) {
function setNumber(uint64 newNumber) public returns (uint64) {
number = newNumber;
}

Expand All @@ -18,7 +18,7 @@ contract Counter {

contract NestedCounter {
Counter public counter;
uint256 public number;
uint64 public number;


constructor() {
Expand All @@ -27,8 +27,8 @@ contract NestedCounter {
number = 7;
}

function nestedNumber() public returns (uint256) {
uint256 currentNumber = counter.setNumber(number);
function nestedNumber() public returns (uint64) {
uint64 currentNumber = counter.setNumber(number);
number++;
return currentNumber;
}
Expand Down
4 changes: 3 additions & 1 deletion substrate/frame/revive/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cargo-features = ["edition2024"]

[package]
name = "pallet-revive-eth-rpc"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
edition = "2024"
license = "Apache-2.0"
homepage.workspace = true
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/revive/rpc/examples/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use pallet_revive::{
create1,
evm::{Account, BlockTag, ReceiptInfo, U256},
};
use pallet_revive_eth_rpc::{example::TransactionBuilder, EthRpcClient};
use pallet_revive_eth_rpc::{EthRpcClient, example::TransactionBuilder};
use std::sync::Arc;

#[tokio::main]
Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/revive/rpc/examples/eth-rpc-tester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
use clap::Parser;
use jsonrpsee::http_client::HttpClientBuilder;
use pallet_revive::evm::{Account, BlockTag, ReceiptInfo};
use pallet_revive_eth_rpc::{example::TransactionBuilder, EthRpcClient};
use pallet_revive_eth_rpc::{EthRpcClient, example::TransactionBuilder};
use std::sync::Arc;
use tokio::{
io::{AsyncBufReadExt, BufReader},
process::{Child, ChildStderr, Command},
signal::unix::{signal, SignalKind},
signal::unix::{SignalKind, signal},
};

const DOCKER_CONTAINER_NAME: &str = "eth-rpc-test";
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/revive/rpc/examples/extrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use pallet_revive_eth_rpc::subxt_client::{
self, revive::calls::types::InstantiateWithCode, SrcChainConfig,
self, SrcChainConfig, revive::calls::types::InstantiateWithCode,
};
use sp_weights::Weight;
use subxt::OnlineClient;
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/revive/rpc/examples/remark-extrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use pallet_revive_eth_rpc::subxt_client::{self, system::calls::types::Remark, SrcChainConfig};
use pallet_revive_eth_rpc::subxt_client::{self, SrcChainConfig, system::calls::types::Remark};
use subxt::OnlineClient;
use subxt_signer::sr25519::dev;

Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/revive/rpc/examples/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// limitations under the License.
use jsonrpsee::http_client::HttpClientBuilder;
use pallet_revive::evm::{Account, BlockTag, ReceiptInfo};
use pallet_revive_eth_rpc::{example::TransactionBuilder, EthRpcClient};
use pallet_revive_eth_rpc::{EthRpcClient, example::TransactionBuilder};
use std::sync::Arc;

#[tokio::main]
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/revive/rpc/src/apis/execution_apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub trait EthRpc {
/// Returns the balance of the account of given address.
#[method(name = "eth_getBalance")]
async fn get_balance(&self, address: Address, block: BlockNumberOrTagOrHash)
-> RpcResult<U256>;
-> RpcResult<U256>;

/// Returns information about a block by hash.
#[method(name = "eth_getBlockByHash")]
Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/revive/rpc/src/block_info_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
// limitations under the License.

use crate::{
ClientError,
client::{SubscriptionType, SubstrateBlock, SubstrateBlockNumber},
subxt_client::SrcChainConfig,
ClientError,
};
use jsonrpsee::core::async_trait;
use sp_core::H256;
use std::sync::Arc;
use subxt::{backend::legacy::LegacyRpcMethods, OnlineClient};
use subxt::{OnlineClient, backend::legacy::LegacyRpcMethods};
use tokio::sync::RwLock;

/// BlockInfoProvider cache and retrieves information about blocks.
Expand Down
13 changes: 7 additions & 6 deletions substrate/frame/revive/rpc/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@
// limitations under the License.
//! The Ethereum JSON-RPC server.
use crate::{
client::{connect, Client, SubscriptionType, SubstrateBlockNumber},
DebugRpcServer, DebugRpcServerImpl, EthRpcServer, EthRpcServerImpl, PolkadotRpcServer,
PolkadotRpcServerImpl, ReceiptExtractor, ReceiptProvider, SubxtBlockInfoProvider,
SystemHealthRpcServer, SystemHealthRpcServerImpl, LOG_TARGET,
DebugRpcServer, DebugRpcServerImpl, EthRpcServer, EthRpcServerImpl, LOG_TARGET,
PolkadotRpcServer, PolkadotRpcServerImpl, ReceiptExtractor, ReceiptProvider,
SubxtBlockInfoProvider, SystemHealthRpcServer, SystemHealthRpcServerImpl,
client::{Client, SubscriptionType, SubstrateBlockNumber, connect},
};
use clap::Parser;
use futures::{future::BoxFuture, pin_mut, FutureExt};
use futures::{FutureExt, future::BoxFuture, pin_mut};
use jsonrpsee::server::RpcModule;
use sc_cli::{PrometheusParams, RpcParams, SharedParams, Signals};
use sc_service::{
TaskManager,
config::{PrometheusConfig, RpcConfiguration},
start_rpc_servers, TaskManager,
start_rpc_servers,
};
use sqlx::sqlite::SqlitePoolOptions;

Expand Down
18 changes: 9 additions & 9 deletions substrate/frame/revive/rpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@ pub(crate) mod runtime_api;
pub(crate) mod storage_api;

use crate::{
subxt_client::{self, revive::calls::types::EthTransact, SrcChainConfig},
BlockInfoProvider, BlockTag, FeeHistoryProvider, ReceiptProvider, SubxtBlockInfoProvider,
TracerType, TransactionInfo,
subxt_client::{self, SrcChainConfig, revive::calls::types::EthTransact},
};
use jsonrpsee::types::{error::CALL_EXECUTION_FAILED_CODE, ErrorObjectOwned};
use jsonrpsee::types::{ErrorObjectOwned, error::CALL_EXECUTION_FAILED_CODE};
use pallet_revive::{
EthTransactError,
evm::{
decode_revert_reason, Block, BlockNumberOrTag, BlockNumberOrTagOrHash, FeeHistoryResult,
Filter, GenericTransaction, HashesOrTransactionInfos, Log, ReceiptInfo, SyncingProgress,
SyncingStatus, Trace, TransactionSigned, TransactionTrace, H256,
Block, BlockNumberOrTag, BlockNumberOrTagOrHash, FeeHistoryResult, Filter,
GenericTransaction, H256, HashesOrTransactionInfos, Log, ReceiptInfo, SyncingProgress,
SyncingStatus, Trace, TransactionSigned, TransactionTrace, decode_revert_reason,
},
EthTransactError,
};
use runtime_api::RuntimeApi;
use sp_runtime::traits::Block as BlockT;
use sp_weights::Weight;
use std::{ops::Range, sync::Arc, time::Duration};
use storage_api::StorageApi;
use subxt::{
Config, OnlineClient,
backend::{
legacy::{rpc_methods::SystemHealth, LegacyRpcMethods},
legacy::{LegacyRpcMethods, rpc_methods::SystemHealth},
rpc::{
reconnecting_rpc_client::{ExponentialBackoff, RpcClient as ReconnectingRpcClient},
RpcClient,
reconnecting_rpc_client::{ExponentialBackoff, RpcClient as ReconnectingRpcClient},
},
},
config::{HashFor, Header},
ext::subxt_rpcs::rpc_params,
Config, OnlineClient,
};
use thiserror::Error;
use tokio::sync::Mutex;
Expand Down
10 changes: 5 additions & 5 deletions substrate/frame/revive/rpc/src/client/runtime_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
// limitations under the License.

use crate::{
ClientError,
client::Balance,
subxt_client::{self, SrcChainConfig},
ClientError,
};
use futures::TryFutureExt;
use pallet_revive::{
DryRunConfig, EthTransactInfo,
evm::{
Block as EthBlock, BlockNumberOrTagOrHash, BlockTag, GenericTransaction, ReceiptGasInfo,
Trace, H160, U256,
Block as EthBlock, BlockNumberOrTagOrHash, BlockTag, GenericTransaction, H160,
ReceiptGasInfo, Trace, U256,
},
DryRunConfig, EthTransactInfo,
};
use sp_core::H256;
use sp_timestamp::Timestamp;
use subxt::{error::MetadataError, ext::subxt_rpcs::UserError, Error::Metadata, OnlineClient};
use subxt::{Error::Metadata, OnlineClient, error::MetadataError, ext::subxt_rpcs::UserError};

const LOG_TARGET: &str = "eth-rpc::runtime_api";

Expand Down
7 changes: 3 additions & 4 deletions substrate/frame/revive/rpc/src/client/storage_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
// limitations under the License.

use crate::{
ClientError, H160,
subxt_client::{
self,
self, SrcChainConfig,
runtime_types::pallet_revive::storage::{AccountType, ContractInfo},
SrcChainConfig,
},
ClientError, H160,
};
use subxt::{storage::Storage, OnlineClient};
use subxt::{OnlineClient, storage::Storage};

/// A wrapper around the Substrate Storage API.
#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/revive/rpc/src/fee_history_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use crate::{client::SubstrateBlockNumber, ClientError};
use crate::{ClientError, client::SubstrateBlockNumber};
use pallet_revive::evm::{Block, FeeHistoryResult, ReceiptInfo};
use sp_core::U256;
use std::{collections::BTreeMap, sync::Arc};
Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/revive/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

use client::ClientError;
use jsonrpsee::{
core::{async_trait, RpcResult},
core::{RpcResult, async_trait},
types::{ErrorCode, ErrorObjectOwned},
};
use pallet_revive::evm::*;
use sp_core::{keccak_256, H160, H256, U256};
use sp_core::{H160, H256, U256, keccak_256};
use thiserror::Error;
use tokio::time::Duration;

Expand Down
12 changes: 6 additions & 6 deletions substrate/frame/revive/rpc/src/receipt_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use crate::{
client::{runtime_api::RuntimeApi, SubstrateBlock, SubstrateBlockNumber},
ClientError, H160, LOG_TARGET,
client::{SubstrateBlock, SubstrateBlockNumber, runtime_api::RuntimeApi},
subxt_client::{
SrcChainConfig,
revive::{
calls::types::EthTransact,
events::{ContractEmitted, EthExtrinsicRevert},
},
SrcChainConfig,
},
ClientError, H160, LOG_TARGET,
};

use futures::{stream, StreamExt};
use futures::{StreamExt, stream};
use pallet_revive::{
create1,
evm::{GenericTransaction, Log, ReceiptGasInfo, ReceiptInfo, TransactionSigned, H256, U256},
evm::{GenericTransaction, H256, Log, ReceiptGasInfo, ReceiptInfo, TransactionSigned, U256},
};
use sp_core::keccak_256;
use std::{future::Future, pin::Pin, sync::Arc};
use subxt::{blocks::ExtrinsicDetails, OnlineClient};
use subxt::{OnlineClient, blocks::ExtrinsicDetails};

type FetchReceiptDataFn = Arc<
dyn Fn(H256) -> Pin<Box<dyn Future<Output = Option<Vec<ReceiptGasInfo>>> + Send>> + Send + Sync,
Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/revive/rpc/src/receipt_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use crate::{
client::{SubstrateBlock, SubstrateBlockNumber},
Address, AddressOrAddresses, BlockInfoProvider, BlockNumberOrTag, BlockTag, Bytes, ClientError,
FilterTopic, ReceiptExtractor, SubxtBlockInfoProvider,
client::{SubstrateBlock, SubstrateBlockNumber},
};
use pallet_revive::evm::{Filter, Log, ReceiptInfo, TransactionSigned};
use sp_core::{H256, U256};
use sqlx::{query, QueryBuilder, Row, Sqlite, SqlitePool};
use sqlx::{QueryBuilder, Row, Sqlite, SqlitePool, query};
use std::{
collections::{BTreeMap, HashMap},
sync::Arc,
Expand Down
Loading