Skip to content

Commit

Permalink
Merge branch 'master' into scan-result-blob-robonode-server
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrylavrenov authored Aug 10, 2024
2 parents 2ae9bc7 + 552338d commit 5dac068
Show file tree
Hide file tree
Showing 19 changed files with 2,422 additions and 1,139 deletions.
2,301 changes: 1,604 additions & 697 deletions Cargo.lock

Large diffs are not rendered by default.

187 changes: 95 additions & 92 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
doc-valid-idents = ["FaceTec", "MetaMask", ".."]
doc-valid-idents = ["FaceScan", "FaceMap", "FaceTec", "MetaMask", "WebSocket", ".."]
2 changes: 1 addition & 1 deletion crates/author-ext-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use sp_std::prelude::*;
pub enum CreateSignedSetKeysExtrinsicError {
/// Unable to decode session keys.
SessionKeysDecoding(String),
/// Unable to create signed set_keys extrinsic.
/// Unable to create signed `set_keys` extrinsic.
SignedExtrinsicCreation,
}

Expand Down
6 changes: 3 additions & 3 deletions crates/humanode-peer/src/cli/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ pub struct EthereumRpcParams {

/// A multiplier to allow larger gas limit in non-transactional execution.
///
/// When using eth_call/eth_estimateGas, the maximum allowed gas limit will be
/// block.gas_limit * execute_gas_limit_multiplier.
/// When using `eth_call/eth_estimateGas`, the maximum allowed gas limit will be
/// `block.gas_limit` * `execute_gas_limit_multiplier`.
#[arg(long, default_value = "10")]
pub execute_gas_limit_multiplier: u64,
}

/// Shared CLI parameters used to configure Frontier backend.
#[derive(Debug, Default, clap::Parser, Clone)]
pub struct FrontierBackendParams {
/// Sets the frontier backend type (KeyValue or Sql).
/// Sets the frontier backend type (`KeyValue` or Sql).
#[arg(long, value_enum, ignore_case = true, default_value_t = FrontierBackendType::default())]
pub frontier_backend_type: FrontierBackendType,

Expand Down
8 changes: 4 additions & 4 deletions crates/humanode-peer/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ pub struct EthereumRpc {

/// A multiplier to allow larger gas limit in non-transactional execution.
///
/// When using eth_call/eth_estimateGas, the maximum allowed gas limit will be
/// block.gas_limit * execute_gas_limit_multiplier.
/// When using `eth_call/eth_estimateGas`, the maximum allowed gas limit will be
/// `block.gas_limit` * `execute_gas_limit_multiplier`.
pub execute_gas_limit_multiplier: u64,
}

/// Frontier backend configuration parameters.
pub struct FrontierBackend {
/// Sets the frontier backend type (KeyValue or Sql).
/// Sets the frontier backend type (`KeyValue` or Sql).
pub frontier_backend_type: FrontierBackendType,

/// Sets the SQL backend's pool size.
Expand All @@ -99,7 +99,7 @@ pub struct FrontierBackend {
/// Avalailable frontier backend types.
#[derive(Default, Debug, Copy, Clone, clap::ValueEnum)]
pub enum FrontierBackendType {
/// Either RocksDb or ParityDb as per inherited from the global backend settings.
/// Either `RocksDb` or `ParityDb` as per inherited from the global backend settings.
#[default]
KeyValue,
/// Sql database with custom log indexing.
Expand Down
5 changes: 4 additions & 1 deletion crates/humanode-peer/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,10 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
link: grandpa_link,
network: Arc::clone(&network),
sync: Arc::clone(&sync_service),
voting_rule: sc_consensus_grandpa::VotingRulesBuilder::default().build(),
voting_rule: sc_consensus_grandpa::VotingRulesBuilder::new()
.add(sc_consensus_grandpa::BeforeBestBlockBy(7u32))
.add(sc_consensus_grandpa::ThreeQuartersOfTheUnfinalizedChain)
.build(),
prometheus_registry,
shared_voter_state: grandpa_shared_voter_state_cloned,
telemetry: telemetry.as_ref().map(|x| x.handle()),
Expand Down
12 changes: 6 additions & 6 deletions crates/humanode-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub struct GrandpaDeps<BE> {

/// Extra EVM related dependencies.
pub struct EvmDeps {
/// EthFilterApi pool.
/// On-memory stored filters created through the `eth_newFilter` RPC.
pub eth_filter_pool: Option<FilterPool>,
/// Maximum number of stored filters.
pub eth_max_stored_filters: usize,
Expand All @@ -100,15 +100,15 @@ pub struct EvmDeps {
pub eth_block_data_cache: Arc<EthBlockDataCacheTask<Block>>,
/// A multiplier to allow larger gas limit in non-transactional execution.
///
/// When using eth_call/eth_estimateGas, the maximum allowed gas limit will be
/// block.gas_limit * execute_gas_limit_multiplier.
/// When using `eth_call/eth_estimateGas`, the maximum allowed gas limit will be
/// `block.gas_limit` * `execute_gas_limit_multiplier`.
pub eth_execute_gas_limit_multiplier: u64,
/// Mandated parent hashes for a given block hash.
pub eth_forced_parent_hashes: Option<BTreeMap<H256, H256>>,
/// Sinks for pubsub notifications.
///
/// Everytime a new subscription is created, a new mpsc channel is added to the sink pool.
/// The MappingSyncWorker sends through the channel on block import and the subscription
/// The `MappingSyncWorker` sends through the channel on block import and the subscription
/// emits a notification to the subscriber on receiving a message through this channel.
pub eth_pubsub_notification_sinks: Arc<
fc_mapping_sync::EthereumBlockNotificationSinks<
Expand All @@ -133,7 +133,7 @@ pub struct Deps<C, P, BE, VKE, VSF, A: ChainApi, SC> {
pub sync: Arc<SyncingService<Block>>,
/// A copy of the chain spec.
pub chain_spec: Box<dyn sc_chain_spec::ChainSpec>,
/// AuthorExt specific dependencies.
/// `AuthorExt` specific dependencies.
pub author_ext: AuthorExtDeps<VKE>,
/// Is the node in authority role.
pub is_authority: bool,
Expand All @@ -143,7 +143,7 @@ pub struct Deps<C, P, BE, VKE, VSF, A: ChainApi, SC> {
pub babe: BabeDeps,
/// GRANDPA specific dependencies.
pub grandpa: GrandpaDeps<BE>,
/// The SelectChain Strategy
/// The `SelectChain` strategy.
pub select_chain: SC,
/// EVM specific dependencies.
pub evm: EvmDeps,
Expand Down
2 changes: 2 additions & 0 deletions crates/humanode-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,8 @@ impl_runtime_apis! {
(list, storage_info)
}

// Allow non local definitions lint for benchmark related code.
#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
Expand Down
3 changes: 3 additions & 0 deletions crates/robonode-server/src/logic/op_authenticate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ pub struct Response {
}

/// Errors for the authenticate operation.
///
/// Allow dead code to explicitly control errors data.
#[allow(dead_code)]
#[derive(Debug)]
pub enum Error {
/// The provided opaque liveness data could not be decoded.
Expand Down
3 changes: 3 additions & 0 deletions crates/robonode-server/src/logic/op_enroll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ pub struct Response {
}

/// The errors on the enroll operation.
///
/// Allow dead code to explicitly control errors data.
#[allow(dead_code)]
#[derive(Debug)]
pub enum Error {
/// The provided public key failed to load because it was invalid.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ pub struct Response {
}

/// Errors for the get facetec session token operation.
///
/// Allow dead code to explicitly control errors data.
#[allow(dead_code)]
#[derive(Debug)]
pub enum Error {
/// Internal error at session token retrieval due to the underlying request
Expand Down
6 changes: 6 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ unmaintained = "allow"
yanked = "allow"
notice = "deny"
ignore = [
# TODO(#1118): update the curve25519-dalek internal dependency to 4.1.3+
"RUSTSEC-2024-0344",
# TODO(#723): update the ed25519-dalek 1 internal dependency to 2.0.0+
"RUSTSEC-2022-0093",
# TODO(#742): vulnerable webpki.
"RUSTSEC-2023-0052",
# TODO(#1013): vulnerable rustls.
"RUSTSEC-2024-0336",
]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2024-02-08"
channel = "nightly-2024-05-10"
components = ["rustfmt", "clippy"]
targets = ["wasm32-unknown-unknown"]
profile = "minimal"
Loading

0 comments on commit 5dac068

Please sign in to comment.