pub struct ChainConfig {Show 48 fields
pub currency_mosaic_id: u64,
pub harvesting_mosaic_id: u64,
pub block_generation_target_time: u64,
pub importance_grouping: u64,
pub importance_activity_percentage: u64,
pub max_difficulty_blocks: u64,
pub default_dynamic_fee_multiplier: u32,
pub total_chain_importance: u64,
pub min_harvester_balance: u64,
pub max_harvester_balance: u64,
pub harvest_beneficiary_percentage: u64,
pub harvest_network_percentage: u64,
pub harvest_network_fee_sink: HeightDependentAddress,
pub mosaic_rental_fee: u64,
pub mosaic_rental_fee_sink: HeightDependentAddress,
pub root_namespace_rental_fee_per_block: u64,
pub child_namespace_rental_fee: u64,
pub namespace_rental_fee_sink: HeightDependentAddress,
pub namespace_grace_period: u64,
pub inflation: Vec<(u64, u64)>,
pub skip_secret_lock_uniqueness_checks: Vec<u64>,
pub skip_secret_lock_expirations: Vec<u64>,
pub force_secret_lock_expirations: Vec<u64>,
pub total_voting_balance_calculation_fix: u64,
pub vrf_gamma_subgroup_check: u64,
pub nemesis_signer_public_key: PublicKey,
pub treasury_reissuance_transaction_signatures: Vec<Signature>,
pub treasury_reissuance_height: u64,
pub max_block_future_time: u64,
pub max_transaction_lifetime: u64,
pub max_bonded_transaction_lifetime: u64,
pub min_proof_size: u64,
pub max_proof_size: u64,
pub max_mosaic_atomic_units: u64,
pub max_namespace_depth: usize,
pub max_child_namespaces: usize,
pub max_namespace_duration: u64,
pub reserved_root_namespace_ids: Vec<u64>,
pub max_mosaics_per_account: usize,
pub max_mosaic_duration: u64,
pub max_mosaic_divisibility: u8,
pub locked_funds_per_aggregate: u64,
pub max_multisig_depth: usize,
pub max_cosignatories_per_account: usize,
pub max_cosigned_accounts_per_account: usize,
pub max_account_restriction_values: usize,
pub max_mosaic_restriction_values: usize,
pub finalization: FinalizationConfig,
}Expand description
実行に要る、チェーンの設定。
Fields§
§currency_mosaic_id: u64§harvesting_mosaic_id: u64§block_generation_target_time: u64ブロックの間隔(秒)
importance_grouping: u64§importance_activity_percentage: u64§max_difficulty_blocks: u64§default_dynamic_fee_multiplier: u32§total_chain_importance: u64§min_harvester_balance: u64§max_harvester_balance: u64§harvest_beneficiary_percentage: u64§harvest_network_percentage: u64§harvest_network_fee_sink: HeightDependentAddress§mosaic_rental_fee: u64§mosaic_rental_fee_sink: HeightDependentAddress§root_namespace_rental_fee_per_block: u64§child_namespace_rental_fee: u64§namespace_rental_fee_sink: HeightDependentAddress§namespace_grace_period: u64ネームスペースの猶予(ブロック)
inflation: Vec<(u64, u64)>(この高さから、1ブロックあたりのインフレ)を高さの順に
skip_secret_lock_uniqueness_checks: Vec<u64>シークレットロックの重なりを確かめない高さ(skipSecretLockUniquenessChecks)
skip_secret_lock_expirations: Vec<u64>シークレットロックの期限切れを処理しない高さ(skipSecretLockExpirations)
force_secret_lock_expirations: Vec<u64>シークレットロックの期限切れを、終わりの高さでなくても処理する高さ(forceSecretLockExpirations)
total_voting_balance_calculation_fix: u64この高さから、importance ブロックの投票の残高の合計を、そのエポックに鍵のあるアカウントだけで数える
(totalVotingBalanceCalculationFix)
vrf_gamma_subgroup_check: u64この高さから、VRF の鍵に使えない公開鍵はリンクできない(vrfGammaSubgroupCheck、catapult 1.0.3.11 から。
設定に無ければフォークしない)
nemesis_signer_public_key: PublicKeynemesisSignerPublicKey。Nemesis のあとは、これで署名できない(NemesisSink)
treasury_reissuance_transaction_signatures: Vec<Signature>国庫の再発行の高さでだけ、Nemesis の鍵で署名してよい署名([treasury_reissuance_transaction_signatures])
treasury_reissuance_height: u64国庫の再発行の高さ(treasuryReissuance)。Revokable のモザイクもここから作れる
max_block_future_time: u64受け取った枝の最後のブロックの時刻の、今からの上限(ミリ秒、maxBlockFutureTime)
max_transaction_lifetime: u64トランザクションの期限の、ブロックの時刻からの上限(ミリ秒)。ボンデッドは別
max_bonded_transaction_lifetime: u64§min_proof_size: u64§max_proof_size: u64§max_mosaic_atomic_units: u64§max_namespace_depth: usize§max_child_namespaces: usizeルートの下に作れる子(孫も数える)の数(maxChildNamespaces)
max_namespace_duration: u64ネームスペースを持てる期間の、今の高さからの上限(ブロック、maxNamespaceDuration)
reserved_root_namespace_ids: Vec<u64>Nemesis のあとは取れないルートの ID と、その直下に子を作れないもの(reservedRootNamespaceNames)
max_mosaics_per_account: usize1つのアカウントが持てるモザイクの種類(maxMosaicsPerAccount)
max_mosaic_duration: u64モザイクを持てる期間の上限(ブロック、maxMosaicDuration)
max_mosaic_divisibility: u8§locked_funds_per_aggregate: u64ハッシュロックに預ける額(lockedFundsPerAggregate)
max_multisig_depth: usize§max_cosignatories_per_account: usizeマルチシグの連署者の数と、1つのアカウントが連署できるマルチシグの数
max_cosigned_accounts_per_account: usize§max_account_restriction_values: usizeアカウントの制限の値の数(maxAccountRestrictionValues)
max_mosaic_restriction_values: usizeモザイクの制限の値の数(maxMosaicRestrictionValues)
finalization: FinalizationConfigImplementations§
Source§impl ChainConfig
impl ChainConfig
Sourcepub fn load(resources: &Path) -> Result<Self, ConfigError>
pub fn load(resources: &Path) -> Result<Self, ConfigError>
ノードの resources フォルダーの3つのファイルから読む。
Sourcepub fn parse(
network: &str,
inflation: &str,
finalization: &str,
) -> Result<Self, ConfigError>
pub fn parse( network: &str, inflation: &str, finalization: &str, ) -> Result<Self, ConfigError>
config-network.properties、config-inflation.properties、config-finalization.properties のテキストから読む。
Sourcepub fn inflation_at(&self, height: u64) -> u64
pub fn inflation_at(&self, height: u64) -> u64
height のブロックのインフレ。catapult の InflationCalculator::getSpotAmount。
Sourcepub fn blocks_for_restart(&self) -> u64
pub fn blocks_for_restart(&self) -> u64
height が入る importance の区切りの高さ。catapult の ConvertToImportanceHeight。
再開するとき(node::chain::load)に読み直すかもしれない、実行した高さより前のブロックの数の見積もり。
トランザクションの期限(ボンデッドを含む)の2倍のブロック数に、importance ブロックまでの数を足す。
これより前のブロックは、刈り込んでも再開に困らない
pub fn importance_height(&self, height: u64) -> u64
Trait Implementations§
Source§impl Clone for ChainConfig
impl Clone for ChainConfig
Source§fn clone(&self) -> ChainConfig
fn clone(&self) -> ChainConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ChainConfig
impl RefUnwindSafe for ChainConfig
impl Send for ChainConfig
impl Sync for ChainConfig
impl Unpin for ChainConfig
impl UnsafeUnpin for ChainConfig
impl UnwindSafe for ChainConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more