diff --git a/Cargo.lock b/Cargo.lock index 32159c6936666..6ed80a00f0bda 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9180,9 +9180,9 @@ checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" [[package]] name = "syn" -version = "1.0.58" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5" +checksum = "6498a9efc342871f91cc2d0d694c674368b4ceb40f62b65a7a08c3792935e702" dependencies = [ "proc-macro2", "quote", diff --git a/client/chain-spec/derive/Cargo.toml b/client/chain-spec/derive/Cargo.toml index 09196c125b7dd..cdcedaecc5082 100644 --- a/client/chain-spec/derive/Cargo.toml +++ b/client/chain-spec/derive/Cargo.toml @@ -18,6 +18,6 @@ proc-macro = true proc-macro-crate = "0.1.4" proc-macro2 = "1.0.6" quote = "1.0.3" -syn = "1.0.58" +syn = "1.0.67" [dev-dependencies] diff --git a/client/tracing/proc-macro/Cargo.toml b/client/tracing/proc-macro/Cargo.toml index e2f4cf14435ba..8ddf2bebfecde 100644 --- a/client/tracing/proc-macro/Cargo.toml +++ b/client/tracing/proc-macro/Cargo.toml @@ -18,4 +18,4 @@ proc-macro = true proc-macro-crate = "0.1.4" proc-macro2 = "1.0.6" quote = { version = "1.0.3", features = ["proc-macro"] } -syn = { version = "1.0.58", features = ["proc-macro", "full", "extra-traits", "parsing"] } +syn = { version = "1.0.67", features = ["proc-macro", "full", "extra-traits", "parsing"] } diff --git a/client/transaction-pool/src/api.rs b/client/transaction-pool/src/api.rs index fc14a5a0cba64..9b9d487a13cfd 100644 --- a/client/transaction-pool/src/api.rs +++ b/client/transaction-pool/src/api.rs @@ -18,322 +18,344 @@ //! Chain api required for the transaction pool. -use std::{marker::PhantomData, pin::Pin, sync::Arc}; use codec::{Decode, Encode}; use futures::{ - channel::oneshot, executor::{ThreadPool, ThreadPoolBuilder}, future::{Future, FutureExt, ready, Ready}, + channel::oneshot, + executor::{ThreadPool, ThreadPoolBuilder}, + future::{ready, Future, FutureExt, Ready}, }; +use std::{marker::PhantomData, pin::Pin, sync::Arc}; +use prometheus_endpoint::Registry as PrometheusRegistry; use sc_client_api::{ - blockchain::HeaderBackend, light::{Fetcher, RemoteCallRequest, RemoteBodyRequest}, BlockBackend, + blockchain::HeaderBackend, + light::{Fetcher, RemoteBodyRequest, RemoteCallRequest}, + BlockBackend, }; +use sp_api::{ApiExt, ProvideRuntimeApi}; use sp_runtime::{ - generic::BlockId, traits::{self, Block as BlockT, BlockIdTo, Header as HeaderT, Hash as HashT}, - transaction_validity::{TransactionValidity, TransactionSource}, + generic::BlockId, + traits::{self, Block as BlockT, BlockIdTo, Hash as HashT, Header as HeaderT}, + transaction_validity::{TransactionSource, TransactionValidity}, }; use sp_transaction_pool::runtime_api::TaggedTransactionQueue; -use sp_api::{ProvideRuntimeApi, ApiExt}; -use prometheus_endpoint::Registry as PrometheusRegistry; -use crate::{metrics::{ApiMetrics, ApiMetricsExt}, error::{self, Error}}; +use crate::{ + error::{self, Error}, + metrics::{ApiMetrics, ApiMetricsExt}, +}; /// The transaction pool logic for full client. pub struct FullChainApi { - client: Arc, - pool: ThreadPool, - _marker: PhantomData, - metrics: Option>, + client: Arc, + pool: ThreadPool, + _marker: PhantomData, + metrics: Option>, } impl FullChainApi { - /// Create new transaction pool logic. - pub fn new( - client: Arc, - prometheus: Option<&PrometheusRegistry>, - ) -> Self { - let metrics = prometheus.map(ApiMetrics::register).and_then(|r| { - match r { - Err(err) => { - log::warn!( - target: "txpool", - "Failed to register transaction pool api prometheus metrics: {:?}", - err, - ); - None - }, - Ok(api) => Some(Arc::new(api)) - } - }); - - FullChainApi { - client, - pool: ThreadPoolBuilder::new() - .pool_size(2) - .name_prefix("txpool-verifier") - .create() - .expect("Failed to spawn verifier threads, that are critical for node operation."), - _marker: Default::default(), - metrics, - } - } + /// Create new transaction pool logic. + pub fn new(client: Arc, prometheus: Option<&PrometheusRegistry>) -> Self { + let metrics = prometheus.map(ApiMetrics::register).and_then(|r| match r { + Err(err) => { + log::warn!( + target: "txpool", + "Failed to register transaction pool api prometheus metrics: {:?}", + err, + ); + None + } + Ok(api) => Some(Arc::new(api)), + }); + + FullChainApi { + client, + pool: ThreadPoolBuilder::new() + .pool_size(2) + .name_prefix("txpool-verifier") + .create() + .expect("Failed to spawn verifier threads, that are critical for node operation."), + _marker: Default::default(), + metrics, + } + } } impl sc_transaction_graph::ChainApi for FullChainApi where - Block: BlockT, - Client: ProvideRuntimeApi + BlockBackend + BlockIdTo, - Client: Send + Sync + 'static, - Client::Api: TaggedTransactionQueue, - sp_api::ApiErrorFor: Send + std::fmt::Display, + Block: BlockT, + Client: ProvideRuntimeApi + BlockBackend + BlockIdTo, + Client: Send + Sync + 'static, + Client::Api: TaggedTransactionQueue, + sp_api::ApiErrorFor: Send + std::fmt::Display, { - type Block = Block; - type Error = error::Error; - type ValidationFuture = Pin< - Box> + Send> - >; - type BodyFuture = Ready::Extrinsic>>>>; - - fn block_body(&self, id: &BlockId) -> Self::BodyFuture { - ready(self.client.block_body(&id).map_err(|e| error::Error::from(e))) - } - - fn validate_transaction( - &self, - at: &BlockId, - source: TransactionSource, - uxt: sc_transaction_graph::ExtrinsicFor, - ) -> Self::ValidationFuture { - let (tx, rx) = oneshot::channel(); - let client = self.client.clone(); - let at = at.clone(); - - let metrics = self.metrics.clone(); - metrics.report(|m| m.validations_scheduled.inc()); - - self.pool.spawn_ok(futures_diagnose::diagnose( - "validate-transaction", - async move { - let res = validate_transaction_blocking(&*client, &at, source, uxt); - if let Err(e) = tx.send(res) { - log::warn!("Unable to send a validate transaction result: {:?}", e); - } - metrics.report(|m| m.validations_finished.inc()); - }, - )); - - Box::pin(async move { - match rx.await { - Ok(r) => r, - Err(_) => Err(Error::RuntimeApi("Validation was canceled".into())), - } - }) - } - - fn block_id_to_number( - &self, - at: &BlockId, - ) -> error::Result>> { - self.client.to_number(at).map_err(|e| Error::BlockIdConversion(format!("{:?}", e))) - } - - fn block_id_to_hash( - &self, - at: &BlockId, - ) -> error::Result>> { - self.client.to_hash(at).map_err(|e| Error::BlockIdConversion(format!("{:?}", e))) - } - - fn hash_and_length( - &self, - ex: &sc_transaction_graph::ExtrinsicFor, - ) -> (sc_transaction_graph::ExtrinsicHash, usize) { - ex.using_encoded(|x| { - ( as traits::Hash>::hash(x), x.len()) - }) - } + type Block = Block; + type Error = error::Error; + type ValidationFuture = + Pin> + Send>>; + type BodyFuture = Ready::Extrinsic>>>>; + + fn block_body(&self, id: &BlockId) -> Self::BodyFuture { + ready( + self.client + .block_body(&id) + .map_err(|e| error::Error::from(e)), + ) + } + + fn validate_transaction( + &self, + at: &BlockId, + source: TransactionSource, + uxt: sc_transaction_graph::ExtrinsicFor, + ) -> Self::ValidationFuture { + let (tx, rx) = oneshot::channel(); + let client = self.client.clone(); + let at = at.clone(); + + let metrics = self.metrics.clone(); + metrics.report(|m| m.validations_scheduled.inc()); + + self.pool.spawn_ok(futures_diagnose::diagnose( + "validate-transaction", + async move { + dbg!(uxt.clone()); + log::info!( + "------------------ api, at: {:?}, source: {:?}, uxt: {:?}", + at, + source, + uxt + ); + let res = validate_transaction_blocking(&*client, &at, source, uxt); + if let Err(e) = tx.send(res) { + log::warn!("Unable to send a validate transaction result: {:?}", e); + } + metrics.report(|m| m.validations_finished.inc()); + }, + )); + + Box::pin(async move { + match rx.await { + Ok(r) => r, + Err(_) => Err(Error::RuntimeApi("Validation was canceled".into())), + } + }) + } + + fn block_id_to_number( + &self, + at: &BlockId, + ) -> error::Result>> { + self.client + .to_number(at) + .map_err(|e| Error::BlockIdConversion(format!("{:?}", e))) + } + + fn block_id_to_hash( + &self, + at: &BlockId, + ) -> error::Result>> { + self.client + .to_hash(at) + .map_err(|e| Error::BlockIdConversion(format!("{:?}", e))) + } + + fn hash_and_length( + &self, + ex: &sc_transaction_graph::ExtrinsicFor, + ) -> (sc_transaction_graph::ExtrinsicHash, usize) { + ex.using_encoded(|x| ( as traits::Hash>::hash(x), x.len())) + } } /// Helper function to validate a transaction using a full chain API. /// This method will call into the runtime to perform the validation. fn validate_transaction_blocking( - client: &Client, - at: &BlockId, - source: TransactionSource, - uxt: sc_transaction_graph::ExtrinsicFor>, + client: &Client, + at: &BlockId, + source: TransactionSource, + uxt: sc_transaction_graph::ExtrinsicFor>, ) -> error::Result where - Block: BlockT, - Client: ProvideRuntimeApi + BlockBackend + BlockIdTo, - Client: Send + Sync + 'static, - Client::Api: TaggedTransactionQueue, - sp_api::ApiErrorFor: Send + std::fmt::Display, + Block: BlockT, + Client: ProvideRuntimeApi + BlockBackend + BlockIdTo, + Client: Send + Sync + 'static, + Client::Api: TaggedTransactionQueue, + sp_api::ApiErrorFor: Send + std::fmt::Display, { - sp_tracing::within_span!(sp_tracing::Level::TRACE, "validate_transaction"; - { - let runtime_api = client.runtime_api(); - let has_v2 = sp_tracing::within_span! { sp_tracing::Level::TRACE, "check_version"; - runtime_api - .has_api_with::, _>(&at, |v| v >= 2) - .unwrap_or_default() - }; - - let res = sp_tracing::within_span!( - sp_tracing::Level::TRACE, "runtime::validate_transaction"; - { - if has_v2 { - runtime_api.validate_transaction(&at, source, uxt) - } else { - #[allow(deprecated)] // old validate_transaction - runtime_api.validate_transaction_before_version_2(&at, uxt) - } - }); - - res.map_err(|e| Error::RuntimeApi(e.to_string())) - }) + sp_tracing::within_span!(sp_tracing::Level::TRACE, "validate_transaction"; + { + let runtime_api = client.runtime_api(); + let has_v2 = sp_tracing::within_span! { sp_tracing::Level::TRACE, "check_version"; + runtime_api + .has_api_with::, _>(&at, |v| v >= 2) + .unwrap_or_default() + }; + + let res = sp_tracing::within_span!( + sp_tracing::Level::TRACE, "runtime::validate_transaction"; + { + if has_v2 { + runtime_api.validate_transaction(&at, source, uxt) + } else { + #[allow(deprecated)] // old validate_transaction + runtime_api.validate_transaction_before_version_2(&at, uxt) + } + }); + + res.map_err(|e| Error::RuntimeApi(e.to_string())) + }) } impl FullChainApi where - Block: BlockT, - Client: ProvideRuntimeApi + BlockBackend + BlockIdTo, - Client: Send + Sync + 'static, - Client::Api: TaggedTransactionQueue, - sp_api::ApiErrorFor: Send + std::fmt::Display, + Block: BlockT, + Client: ProvideRuntimeApi + BlockBackend + BlockIdTo, + Client: Send + Sync + 'static, + Client::Api: TaggedTransactionQueue, + sp_api::ApiErrorFor: Send + std::fmt::Display, { - /// Validates a transaction by calling into the runtime, same as - /// `validate_transaction` but blocks the current thread when performing - /// validation. Only implemented for `FullChainApi` since we can call into - /// the runtime locally. - pub fn validate_transaction_blocking( - &self, - at: &BlockId, - source: TransactionSource, - uxt: sc_transaction_graph::ExtrinsicFor, - ) -> error::Result { - validate_transaction_blocking(&*self.client, at, source, uxt) - } + /// Validates a transaction by calling into the runtime, same as + /// `validate_transaction` but blocks the current thread when performing + /// validation. Only implemented for `FullChainApi` since we can call into + /// the runtime locally. + pub fn validate_transaction_blocking( + &self, + at: &BlockId, + source: TransactionSource, + uxt: sc_transaction_graph::ExtrinsicFor, + ) -> error::Result { + validate_transaction_blocking(&*self.client, at, source, uxt) + } } /// The transaction pool logic for light client. pub struct LightChainApi { - client: Arc, - fetcher: Arc, - _phantom: PhantomData, + client: Arc, + fetcher: Arc, + _phantom: PhantomData, } impl LightChainApi { - /// Create new transaction pool logic. - pub fn new(client: Arc, fetcher: Arc) -> Self { - LightChainApi { - client, - fetcher, - _phantom: Default::default(), - } - } + /// Create new transaction pool logic. + pub fn new(client: Arc, fetcher: Arc) -> Self { + LightChainApi { + client, + fetcher, + _phantom: Default::default(), + } + } } -impl sc_transaction_graph::ChainApi for - LightChainApi where - Block: BlockT, - Client: HeaderBackend + 'static, - F: Fetcher + 'static, +impl sc_transaction_graph::ChainApi for LightChainApi +where + Block: BlockT, + Client: HeaderBackend + 'static, + F: Fetcher + 'static, { - type Block = Block; - type Error = error::Error; - type ValidationFuture = Box< - dyn Future> + Send + Unpin - >; - type BodyFuture = Pin< - Box< - dyn Future::Extrinsic>>>> - + Send - > - >; - - fn validate_transaction( - &self, - at: &BlockId, - source: TransactionSource, - uxt: sc_transaction_graph::ExtrinsicFor, - ) -> Self::ValidationFuture { - let header_hash = self.client.expect_block_hash_from_id(at); - let header_and_hash = header_hash - .and_then(|header_hash| self.client.expect_header(BlockId::Hash(header_hash)) - .map(|header| (header_hash, header))); - let (block, header) = match header_and_hash { - Ok((header_hash, header)) => (header_hash, header), - Err(err) => return Box::new(ready(Err(err.into()))), - }; - let remote_validation_request = self.fetcher.remote_call(RemoteCallRequest { - block, - header, - method: "TaggedTransactionQueue_validate_transaction".into(), - call_data: (source, uxt).encode(), - retry_count: None, - }); - let remote_validation_request = remote_validation_request.then(move |result| { - let result: error::Result = result - .map_err(Into::into) - .and_then(|result| Decode::decode(&mut &result[..]) - .map_err(|e| Error::RuntimeApi( - format!("Error decoding tx validation result: {:?}", e) - )) - ); - ready(result) - }); - - Box::new(remote_validation_request) - } - - fn block_id_to_number( - &self, - at: &BlockId, - ) -> error::Result>> { - Ok(self.client.block_number_from_id(at)?) - } - - fn block_id_to_hash( - &self, - at: &BlockId, - ) -> error::Result>> { - Ok(self.client.block_hash_from_id(at)?) - } - - fn hash_and_length( - &self, - ex: &sc_transaction_graph::ExtrinsicFor, - ) -> (sc_transaction_graph::ExtrinsicHash, usize) { - ex.using_encoded(|x| { - (<::Hashing as HashT>::hash(x), x.len()) - }) - } - - fn block_body(&self, id: &BlockId) -> Self::BodyFuture { - let header = self.client.header(*id) - .and_then(|h| h.ok_or_else(|| sp_blockchain::Error::UnknownBlock(format!("{}", id)))); - let header = match header { - Ok(header) => header, - Err(err) => { - log::warn!(target: "txpool", "Failed to query header: {:?}", err); - return Box::pin(ready(Ok(None))); - } - }; - - let fetcher = self.fetcher.clone(); - async move { - let transactions = fetcher.remote_body({ - RemoteBodyRequest { - header, - retry_count: None, - } - }) - .await - .unwrap_or_else(|e| { - log::warn!(target: "txpool", "Failed to fetch block body: {:?}", e); - Vec::new() - }); - - Ok(Some(transactions)) - }.boxed() - } + type Block = Block; + type Error = error::Error; + type ValidationFuture = + Box> + Send + Unpin>; + type BodyFuture = Pin< + Box< + dyn Future::Extrinsic>>>> + + Send, + >, + >; + + fn validate_transaction( + &self, + at: &BlockId, + source: TransactionSource, + uxt: sc_transaction_graph::ExtrinsicFor, + ) -> Self::ValidationFuture { + let header_hash = self.client.expect_block_hash_from_id(at); + let header_and_hash = header_hash.and_then(|header_hash| { + self.client + .expect_header(BlockId::Hash(header_hash)) + .map(|header| (header_hash, header)) + }); + let (block, header) = match header_and_hash { + Ok((header_hash, header)) => (header_hash, header), + Err(err) => return Box::new(ready(Err(err.into()))), + }; + let remote_validation_request = self.fetcher.remote_call(RemoteCallRequest { + block, + header, + method: "TaggedTransactionQueue_validate_transaction".into(), + call_data: (source, uxt).encode(), + retry_count: None, + }); + let remote_validation_request = remote_validation_request.then(move |result| { + let result: error::Result = + result.map_err(Into::into).and_then(|result| { + Decode::decode(&mut &result[..]).map_err(|e| { + Error::RuntimeApi(format!("Error decoding tx validation result: {:?}", e)) + }) + }); + ready(result) + }); + + Box::new(remote_validation_request) + } + + fn block_id_to_number( + &self, + at: &BlockId, + ) -> error::Result>> { + Ok(self.client.block_number_from_id(at)?) + } + + fn block_id_to_hash( + &self, + at: &BlockId, + ) -> error::Result>> { + Ok(self.client.block_hash_from_id(at)?) + } + + fn hash_and_length( + &self, + ex: &sc_transaction_graph::ExtrinsicFor, + ) -> (sc_transaction_graph::ExtrinsicHash, usize) { + ex.using_encoded(|x| { + ( + <::Hashing as HashT>::hash(x), + x.len(), + ) + }) + } + + fn block_body(&self, id: &BlockId) -> Self::BodyFuture { + let header = self + .client + .header(*id) + .and_then(|h| h.ok_or_else(|| sp_blockchain::Error::UnknownBlock(format!("{}", id)))); + let header = match header { + Ok(header) => header, + Err(err) => { + log::warn!(target: "txpool", "Failed to query header: {:?}", err); + return Box::pin(ready(Ok(None))); + } + }; + + let fetcher = self.fetcher.clone(); + async move { + let transactions = fetcher + .remote_body({ + RemoteBodyRequest { + header, + retry_count: None, + } + }) + .await + .unwrap_or_else(|e| { + log::warn!(target: "txpool", "Failed to fetch block body: {:?}", e); + Vec::new() + }); + + Ok(Some(transactions)) + } + .boxed() + } } diff --git a/frame/staking/reward-curve/Cargo.toml b/frame/staking/reward-curve/Cargo.toml index 9d2564522cd92..e64e01b43549e 100644 --- a/frame/staking/reward-curve/Cargo.toml +++ b/frame/staking/reward-curve/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] proc-macro = true [dependencies] -syn = { version = "1.0.58", features = ["full", "visit"] } +syn = { version = "1.0.67", features = ["full", "visit"] } quote = "1.0.3" proc-macro2 = "1.0.6" proc-macro-crate = "0.1.4" diff --git a/frame/support/procedural/Cargo.toml b/frame/support/procedural/Cargo.toml index 3d829afb0ca3f..8a1205ba9d357 100644 --- a/frame/support/procedural/Cargo.toml +++ b/frame/support/procedural/Cargo.toml @@ -19,7 +19,7 @@ frame-support-procedural-tools = { version = "2.0.0", path = "./tools" } proc-macro2 = "1.0.6" quote = "1.0.3" Inflector = "0.11.4" -syn = { version = "1.0.58", features = ["full"] } +syn = { version = "1.0.67", features = ["full"] } [features] default = ["std"] diff --git a/frame/support/procedural/tools/Cargo.toml b/frame/support/procedural/tools/Cargo.toml index 0c8b9249b5cac..8039f200f9d38 100644 --- a/frame/support/procedural/tools/Cargo.toml +++ b/frame/support/procedural/tools/Cargo.toml @@ -15,5 +15,5 @@ targets = ["x86_64-unknown-linux-gnu"] frame-support-procedural-tools-derive = { version = "2.0.0", path = "./derive" } proc-macro2 = "1.0.6" quote = "1.0.3" -syn = { version = "1.0.58", features = ["full", "visit"] } +syn = { version = "1.0.67", features = ["full", "visit"] } proc-macro-crate = "0.1.5" diff --git a/frame/support/procedural/tools/derive/Cargo.toml b/frame/support/procedural/tools/derive/Cargo.toml index 0ec72f1388e03..363ebd1cd3671 100644 --- a/frame/support/procedural/tools/derive/Cargo.toml +++ b/frame/support/procedural/tools/derive/Cargo.toml @@ -17,4 +17,4 @@ proc-macro = true [dependencies] proc-macro2 = "1.0.6" quote = { version = "1.0.3", features = ["proc-macro"] } -syn = { version = "1.0.58", features = ["proc-macro" ,"full", "extra-traits", "parsing"] } +syn = { version = "1.0.67", features = ["proc-macro" ,"full", "extra-traits", "parsing"] } diff --git a/primitives/api/proc-macro/Cargo.toml b/primitives/api/proc-macro/Cargo.toml index 98ca45081c1e3..7800b2bd9b541 100644 --- a/primitives/api/proc-macro/Cargo.toml +++ b/primitives/api/proc-macro/Cargo.toml @@ -18,7 +18,7 @@ proc-macro = true [dependencies] quote = "1.0.3" -syn = { version = "1.0.58", features = ["full", "fold", "extra-traits", "visit"] } +syn = { version = "1.0.67", features = ["full", "fold", "extra-traits", "visit"] } proc-macro2 = "1.0.6" blake2-rfc = { version = "0.2.18", default-features = false } proc-macro-crate = "0.1.4" diff --git a/primitives/debug-derive/Cargo.toml b/primitives/debug-derive/Cargo.toml index f72842b19615e..2ef6c7ff58efd 100644 --- a/primitives/debug-derive/Cargo.toml +++ b/primitives/debug-derive/Cargo.toml @@ -18,7 +18,7 @@ proc-macro = true [dependencies] quote = "1.0.3" -syn = "1.0.58" +syn = "1.0.67" proc-macro2 = "1.0" [features] diff --git a/primitives/npos-elections/compact/Cargo.toml b/primitives/npos-elections/compact/Cargo.toml index 7383dd67d5939..358cd93dedef9 100644 --- a/primitives/npos-elections/compact/Cargo.toml +++ b/primitives/npos-elections/compact/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] proc-macro = true [dependencies] -syn = { version = "1.0.58", features = ["full", "visit"] } +syn = { version = "1.0.67", features = ["full", "visit"] } quote = "1.0" proc-macro2 = "1.0.6" proc-macro-crate = "0.1.4" diff --git a/primitives/runtime-interface/proc-macro/Cargo.toml b/primitives/runtime-interface/proc-macro/Cargo.toml index a63247758c3a0..6f47fd4b9c80d 100644 --- a/primitives/runtime-interface/proc-macro/Cargo.toml +++ b/primitives/runtime-interface/proc-macro/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] proc-macro = true [dependencies] -syn = { version = "1.0.58", features = ["full", "visit", "fold", "extra-traits"] } +syn = { version = "1.0.67", features = ["full", "visit", "fold", "extra-traits"] } quote = "1.0.3" proc-macro2 = "1.0.3" Inflector = "0.11.4" diff --git a/test-utils/derive/Cargo.toml b/test-utils/derive/Cargo.toml index 1fb1db555f490..ec069263ab6cb 100644 --- a/test-utils/derive/Cargo.toml +++ b/test-utils/derive/Cargo.toml @@ -10,7 +10,7 @@ description = "Substrate test utilities macros" [dependencies] quote = "1.0.6" -syn = { version = "1.0.58", features = ["full"] } +syn = { version = "1.0.67", features = ["full"] } proc-macro-crate = "0.1.4" [lib]