Skip to content

Commit

Permalink
reduce tx fee and skip key checks in dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
1xstj committed Oct 13, 2023
1 parent b9bab1f commit 7c1a4aa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
12 changes: 8 additions & 4 deletions standalone/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use sc_consensus_aura::ImportQueueParams;
use sc_consensus_grandpa::SharedVoterState;
pub use sc_executor::NativeElseWasmExecutor;
use sc_network::NetworkStateInfo;
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
use sc_service::{error::Error as ServiceError, ChainType, Configuration, TaskManager};
use sc_telemetry::{Telemetry, TelemetryWorker};
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use sp_api::{ProvideRuntimeApi, TransactionFor};
Expand Down Expand Up @@ -343,15 +343,19 @@ pub async fn new_full(
}

// finally check if keys are inserted correctly
if crate::utils::ensure_all_keys_exist_in_keystore(keystore_container.keystore()).is_err() {
println!("
if config.chain_spec.chain_type() != ChainType::Development {
if crate::utils::ensure_all_keys_exist_in_keystore(keystore_container.keystore())
.is_err()
{
println!("
++++++++++++++++++++++++++++++++++++++++++++++++
Validator keys not found, validator keys are essential to run a validator on
Tangle Network, refer to https://docs.webb.tools/docs/ecosystem-roles/validator/required-keys/ on
how to generate and insert keys. OR start the node with --auto-insert-keys to automatically generate the keys.
++++++++++++++++++++++++++++++++++++++++++++++++
\n");
panic!("Keys not detected!")
panic!("Keys not detected!")
}
}
}

Expand Down
7 changes: 1 addition & 6 deletions standalone/node/src/signer_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,10 @@
// limitations under the License.

//! Signer module to sign data with wdkg keytype in keystore
use parity_scale_codec::{Decode, Encode};
use sc_cli::{
utils, with_crypto_scheme, CryptoScheme, Error, KeystoreParams, Result as CliResult,
SharedParams, SubstrateCli,
};
use sc_cli::{Error, KeystoreParams, SharedParams, SubstrateCli};
use sc_keystore::LocalKeystore;
use sc_service::{config::KeystoreConfig, BasePath};
use sp_keystore::KeystorePtr;
use sp_runtime::traits::{Block as BlockT, Header as HeaderT};
use std::fmt::Debug;

/// The `chain-info` subcommand used to output db meta columns information.
Expand Down
4 changes: 2 additions & 2 deletions standalone/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("tangle-standalone"),
impl_name: create_runtime_str!("tangle-standalone"),
authoring_version: 1,
spec_version: 409, // v0.4.9
spec_version: 500, // v0.5.0
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -256,7 +256,7 @@ impl pallet_balances::Config for Runtime {
}

parameter_types! {
pub const TransactionByteFee: Balance = 10 * MILLIUNIT;
pub const TransactionByteFee: Balance = MILLIUNIT;
pub const OperationalFeeMultiplier: u8 = 5;
pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25);
pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(1, 100_000);
Expand Down

0 comments on commit 7c1a4aa

Please sign in to comment.