Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Add getter pending block extrinsics #1637

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
227 changes: 115 additions & 112 deletions Cargo.lock

Large diffs are not rendered by default.

124 changes: 62 additions & 62 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,78 +81,78 @@ version = "0.8.0"

[workspace.dependencies]
# Substrate frame dependencies
frame-executive = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
frame-support = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
frame-benchmarking = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
frame-benchmarking-cli = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
frame-system = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
frame-system-benchmarking = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
frame-system-rpc-runtime-api = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
frame-try-runtime = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
substrate-frame-rpc-system = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
frame-executive = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
frame-support = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
frame-benchmarking = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
frame-benchmarking-cli = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
frame-system = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
frame-system-benchmarking = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
frame-system-rpc-runtime-api = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
frame-try-runtime = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
substrate-frame-rpc-system = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }

# Substrate primitives dependencies
sp-core = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-std = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-io = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-runtime = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-consensus-aura = { git = "http://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-consensus = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-consensus-grandpa = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-timestamp = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-inherents = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-keyring = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-api = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-blockchain = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-block-builder = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-offchain = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-session = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-transaction-pool = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-version = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-database = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-arithmetic = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-storage = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-state-machine = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-statement-store = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-trie = { version = "22.0.0", git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-tracing = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sp-core = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-std = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-io = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-runtime = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-consensus-aura = { git = "http://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-consensus = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-consensus-grandpa = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-timestamp = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-inherents = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-keyring = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-api = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-blockchain = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-block-builder = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-offchain = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-session = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-transaction-pool = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-version = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-database = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-arithmetic = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-storage = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-state-machine = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-statement-store = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-trie = { version = "22.0.0", git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sp-tracing = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }

# Substrate client dependencies
sc-client-db = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-network = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-network-common = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-network-sync = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-consensus = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-client-db = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-network = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-network-common = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-network-sync = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-consensus = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
# For integration tests in order to create blocks on demand
sc-consensus-manual-seal = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-consensus-grandpa = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-rpc = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-rpc-api = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-basic-authorship = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-client-api = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-cli = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-executor = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-service = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-telemetry = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-keystore = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-transaction-pool = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-transaction-pool-api = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-offchain = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-consensus-aura = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-block-builder = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-proposer-metrics = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-utils = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
substrate-test-runtime-client = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
sc-consensus-manual-seal = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-consensus-grandpa = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-rpc = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-rpc-api = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-basic-authorship = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-client-api = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-cli = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-executor = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-service = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-telemetry = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-keystore = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-transaction-pool = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-transaction-pool-api = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-offchain = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-consensus-aura = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-block-builder = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-proposer-metrics = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
sc-utils = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
substrate-test-runtime-client = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }


# Substrate build & tools dependencies
substrate-build-script-utils = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.10.0-dev", git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
substrate-build-script-utils = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.10.0-dev", git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }

# Substrate Frame pallet
pallet-aura = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
pallet-grandpa = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
pallet-timestamp = { git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }
pallet-aura = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
pallet-grandpa = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }
pallet-timestamp = { git = "https://github.com/massalabs/polkadot-sdk", branch = "features/add_block_builder_extrinsic_getters" }

# Madara pallets
pallet-starknet = { path = "crates/pallets/starknet" }
Expand Down
1 change: 1 addition & 0 deletions crates/client/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ mc-genesis-data-provider = { workspace = true }
mc-rpc-core = { workspace = true }
mc-storage = { workspace = true }
pallet-starknet-runtime-api = { workspace = true }
sc-block-builder = { workspace = true }
sc-transaction-pool = { workspace = true }
sc-transaction-pool-api = { workspace = true }
sp-api = { workspace = true }
Expand Down
13 changes: 7 additions & 6 deletions crates/client/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ use mp_transactions::from_broadcasted_transactions::{
use mp_transactions::to_starknet_core_transaction::to_starknet_core_tx;
use mp_transactions::{compute_message_hash, get_transaction_hash, TransactionStatus};
use pallet_starknet_runtime_api::{ConvertTransactionRuntimeApi, StarknetRuntimeApi};
use sc_block_builder::GetPendingBlockExtrinsics;
use sc_client_api::backend::{Backend, StorageProvider};
use sc_client_api::BlockBackend;
use sc_network_sync::SyncingService;
use sc_transaction_pool::{ChainApi, Pool};
use sc_transaction_pool_api::error::{Error as PoolError, IntoPoolError};
use sc_transaction_pool_api::{InPoolTransaction, TransactionPool, TransactionSource};
use sc_transaction_pool_api::{TransactionPool, TransactionSource};
use sp_api::ProvideRuntimeApi;
use sp_arithmetic::traits::UniqueSaturatedInto;
use sp_blockchain::HeaderBackend;
Expand Down Expand Up @@ -228,6 +229,7 @@ where
BE: Backend<B> + 'static,
C: HeaderBackend<B> + BlockBackend<B> + StorageProvider<B, BE> + 'static,
C: ProvideRuntimeApi<B>,
C: GetPendingBlockExtrinsics<B>,
C::Api: StarknetRuntimeApi<B> + ConvertTransactionRuntimeApi<B>,
G: GenesisProvider + Send + Sync + 'static,
H: HasherT + Send + Sync + 'static,
Expand Down Expand Up @@ -272,6 +274,7 @@ where
BE: Backend<B> + 'static,
C: HeaderBackend<B> + BlockBackend<B> + StorageProvider<B, BE> + 'static,
C: ProvideRuntimeApi<B>,
C: GetPendingBlockExtrinsics<B>,
C::Api: StarknetRuntimeApi<B> + ConvertTransactionRuntimeApi<B>,
G: GenesisProvider + Send + Sync + 'static,
H: HasherT + Send + Sync + 'static,
Expand Down Expand Up @@ -391,6 +394,7 @@ where
BE: Backend<B> + 'static,
C: HeaderBackend<B> + BlockBackend<B> + StorageProvider<B, BE> + 'static,
C: ProvideRuntimeApi<B>,
C: GetPendingBlockExtrinsics<B>,
C::Api: StarknetRuntimeApi<B> + ConvertTransactionRuntimeApi<B>,
G: GenesisProvider + Send + Sync + 'static,
H: HasherT + Send + Sync + 'static,
Expand Down Expand Up @@ -1318,6 +1322,7 @@ where
BE: Backend<B> + 'static,
C: HeaderBackend<B> + BlockBackend<B> + StorageProvider<B, BE> + 'static,
C: ProvideRuntimeApi<B>,
C: GetPendingBlockExtrinsics<B>,
C::Api: StarknetRuntimeApi<B> + ConvertTransactionRuntimeApi<B>,
G: GenesisProvider + Send + Sync + 'static,
H: HasherT + Send + Sync + 'static,
Expand Down Expand Up @@ -1368,11 +1373,7 @@ where
&self,
latest_block: B::Hash,
) -> Result<Vec<blockifier::transaction::transaction_execution::Transaction>, StarknetRpcApiError> {
// Fetch all Pending Txs from Transaction Pool
// Operates as RPC Call `author_pendingExtrinsics`
// See https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.6.0/substrate/client/rpc/src/author/mod.rs#L153-L155
// But fetches pending transactions as Vec<B::Extrinsic>
let pending_transactions: Vec<B::Extrinsic> = self.pool.ready().map(|tx| tx.data().clone()).collect();
let pending_transactions: Vec<B::Extrinsic> = self.client.get_pending_extrinsics();

// Use Runtime API to filter all Pending Txs
// And get only Starknet Txs (Pallet Starknet calls) as
Expand Down
2 changes: 2 additions & 0 deletions crates/client/rpc/src/madara_routes.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use jsonrpsee::core::{async_trait, RpcResult};
use log::error;
use sc_block_builder::GetPendingBlockExtrinsics;
use mc_genesis_data_provider::GenesisProvider;
pub use mc_rpc_core::{
Felt, MadaraRpcApiServer, PredeployedAccountWithBalance, StarknetReadRpcApiServer, StarknetTraceRpcApiServer,
Expand Down Expand Up @@ -31,6 +32,7 @@ where
BE: Backend<B> + 'static,
C: HeaderBackend<B> + BlockBackend<B> + StorageProvider<B, BE> + 'static,
C: ProvideRuntimeApi<B>,
C: GetPendingBlockExtrinsics<B>,
G: GenesisProvider + Send + Sync + 'static,
C::Api: StarknetRuntimeApi<B> + ConvertTransactionRuntimeApi<B>,
P: TransactionPool<Block = B> + 'static,
Expand Down
2 changes: 2 additions & 0 deletions crates/client/rpc/src/runtime_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use mp_felt::Felt252Wrapper;
use mp_hashers::HasherT;
use mp_simulations::SimulationFlags;
use pallet_starknet_runtime_api::{ConvertTransactionRuntimeApi, StarknetRuntimeApi};
use sc_block_builder::GetPendingBlockExtrinsics;
use sc_client_api::backend::Backend;
use sc_transaction_pool::ChainApi;
use sp_api::{ApiError, ProvideRuntimeApi};
Expand All @@ -32,6 +33,7 @@ where
BE: Backend<B>,
C: HeaderBackend<B> + 'static,
C: ProvideRuntimeApi<B>,
C: GetPendingBlockExtrinsics<B>,
C::Api: StarknetRuntimeApi<B> + ConvertTransactionRuntimeApi<B>,
H: HasherT + Send + Sync + 'static,
{
Expand Down
Loading
Loading