Skip to main content

ChainConfig

Struct ChainConfig 

Source
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: PublicKey

nemesisSignerPublicKey。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: usize

1つのアカウントが持てるモザイクの種類(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: FinalizationConfig

Implementations§

Source§

impl ChainConfig

Source

pub fn mainnet() -> Self

メインネットの、決め打ちの設定

Source

pub fn testnet() -> Self

テストネットの、決め打ちの設定

Source

pub fn load(resources: &Path) -> Result<Self, ConfigError>

ノードの resources フォルダーの3つのファイルから読む。

Source

pub fn parse( network: &str, inflation: &str, finalization: &str, ) -> Result<Self, ConfigError>

config-network.properties、config-inflation.properties、config-finalization.properties のテキストから読む。

Source

pub fn inflation_at(&self, height: u64) -> u64

height のブロックのインフレ。catapult の InflationCalculator::getSpotAmount。

Source

pub fn blocks_for_restart(&self) -> u64

height が入る importance の区切りの高さ。catapult の ConvertToImportanceHeight。 再開するとき(node::chain::load)に読み直すかもしれない、実行した高さより前のブロックの数の見積もり。 トランザクションの期限(ボンデッドを含む)の2倍のブロック数に、importance ブロックまでの数を足す。 これより前のブロックは、刈り込んでも再開に困らない

Source

pub fn importance_height(&self, height: u64) -> u64

Trait Implementations§

Source§

impl Clone for ChainConfig

Source§

fn clone(&self) -> ChainConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ChainConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.