Documentation
¶
Index ¶
- Variables
- func ApplySettings(settings *NodeSettings, f ...func(*NodeSettings) error) error
- func FromJavaEnviron(settings *NodeSettings) error
- func FromJavaEnvironString(settings *NodeSettings, s string)
- type BlockchainSettings
- type BlockchainType
- type Feature
- type FeatureInfo
- type FunctionalitySettings
- type NodeSettings
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MainNetSettings = mustLoadEmbeddedSettings(MainNet) TestNetSettings = mustLoadEmbeddedSettings(TestNet) StageNetSettings = mustLoadEmbeddedSettings(StageNet) DefaultCustomSettings = BlockchainSettings{ Type: Custom, FunctionalitySettings: FunctionalitySettings{ FeaturesVotingPeriod: 5000, VotesForFeatureActivation: 4000, MaxTxTimeBackOffset: 120 * 60000, MaxTxTimeForwardOffset: 90 * 60000, AddressSchemeCharacter: proto.CustomNetScheme, AverageBlockDelaySeconds: 60, MaxBaseTarget: math.MaxUint64, MinUpdateAssetInfoInterval: 100000, BlockRewardTerm: 100000, BlockRewardTermAfter20: 50000, }, } )
View Source
var FeaturesInfo = map[Feature]FeatureInfo{ SmallerMinimalGeneratingBalance: {true, "Minimum Generating Balance of 1000 WAVES"}, NG: {true, "NG Protocol"}, MassTransfer: {true, "Mass Transfer Transaction"}, SmartAccounts: {true, "Smart Accounts"}, DataTransaction: {true, "Data Transaction"}, BurnAnyTokens: {true, "Burn Any Tokens"}, FeeSponsorship: {true, "Fee Sponsorship"}, FairPoS: {true, "Fair PoS"}, SmartAssets: {true, "Smart Assets"}, SmartAccountTrading: {true, "Smart Account Trading"}, Ride4DApps: {true, "Ride For DApp"}, OrderV3: {true, "Order Version 3"}, ReducedNFTFee: {true, "Reduced NFT Fee"}, BlockReward: {true, "Block Reward and Community Driven Monetary Policy"}, BlockV5: {true, "Ride V4, VRF, Protobuf, Failed Transactions"}, RideV5: {true, "Ride V5, DApp-to-DApp Invocations"}, RideV6: {true, "Ride V6, MetaMask Support"}, ConsensusImprovements: {true, "Consensus and MetaMask Updates"}, BlockRewardDistribution: {true, "Block Reward Distribution"}, CappedRewards: {true, "Capped XTN Buy-back and DAO Amounts"}, XTNBuyBackCessation: {true, "XTN Buy-back cessation"}, InvokeExpression: {false, "InvokeExpression"}, }
Functions ¶
func ApplySettings ¶
func ApplySettings(settings *NodeSettings, f ...func(*NodeSettings) error) error
func FromJavaEnviron ¶
func FromJavaEnviron(settings *NodeSettings) error
func FromJavaEnvironString ¶
func FromJavaEnvironString(settings *NodeSettings, s string)
Types ¶
type BlockchainSettings ¶
type BlockchainSettings struct {
FunctionalitySettings
Type BlockchainType `json:"type"`
Genesis proto.Block `json:"genesis"`
}
func BlockchainSettingsByTypeName ¶ added in v0.5.0
func BlockchainSettingsByTypeName(networkType string) (*BlockchainSettings, error)
func ReadBlockchainSettings ¶ added in v0.5.0
func ReadBlockchainSettings(r io.Reader) (*BlockchainSettings, error)
func (*BlockchainSettings) UnmarshalJSON ¶ added in v0.10.6
func (s *BlockchainSettings) UnmarshalJSON(bytes []byte) error
type BlockchainType ¶
type BlockchainType byte
const ( MainNet BlockchainType = iota TestNet StageNet Custom )
type Feature ¶
type Feature int16
const ( SmallerMinimalGeneratingBalance Feature = iota + 1 NG MassTransfer SmartAccounts DataTransaction BurnAnyTokens FeeSponsorship FairPoS SmartAssets SmartAccountTrading Ride4DApps // RIDE V3 OrderV3 ReducedNFTFee BlockReward // 14 BlockV5 // 15 RideV5 // 16 RideV6 // 17 ConsensusImprovements // 18 BlockRewardDistribution // 19 CappedRewards // 20 XTNBuyBackCessation // 21 InvokeExpression // 22 )
type FeatureInfo ¶
type FunctionalitySettings ¶
type FunctionalitySettings struct {
// Features.
FeaturesVotingPeriod uint64 `json:"features_voting_period"`
VotesForFeatureActivation uint64 `json:"votes_for_feature_activation"`
PreactivatedFeatures []int16 `json:"preactivated_features"`
DoubleFeaturesPeriodsAfterHeight uint64 `json:"double_features_periods_after_height"`
SponsorshipSingleActivationPeriod bool `json:"sponsorship_single_activation_period"`
// Heights when some rules change.
GenerationBalanceDepthFrom50To1000AfterHeight uint64 `json:"generation_balance_depth_from_50_to_1000_after_height"`
BlockVersion3AfterHeight uint64 `json:"block_version_3_after_height"`
// Lease cancellation.
ResetEffectiveBalanceAtHeight uint64 `json:"reset_effective_balance_at_height"`
// Window when stolen aliases are valid.
StolenAliasesWindowTimeStart uint64 `json:"stolen_aliases_window_time_start"`
StolenAliasesWindowTimeEnd uint64 `json:"stolen_aliases_window_time_end"`
// Window when non-reissuable assets can be reissued.
ReissueBugWindowTimeStart uint64 `json:"reissue_bug_window_time_start"`
ReissueBugWindowTimeEnd uint64 `json:"reissue_bug_window_time_end"`
AllowMultipleLeaseCancelUntilTime uint64 `json:"allow_multiple_lease_cancel_until_time"`
AllowLeasedBalanceTransferUntilTime uint64 `json:"allow_leased_balance_transfer_until_time"`
// Timestamps when different kinds of checks become relevant.
CheckTempNegativeAfterTime uint64 `json:"check_temp_negative_after_time"`
TxChangesSortedCheckAfterTime uint64 `json:"tx_changes_sorted_check_after_time"`
TxFromFutureCheckAfterTime uint64 `json:"tx_from_future_check_after_time"`
UnissuedAssetUntilTime uint64 `json:"unissued_asset_until_time"`
InvalidReissueInSameBlockUntilTime uint64 `json:"invalid_reissue_in_same_block_until_time"`
MinimalGeneratingBalanceCheckAfterTime uint64 `json:"minimal_generating_balance_check_after_time"`
InternalInvokePaymentsValidationAfterHeight uint64 `json:"internal_invoke_payments_validation_after_height"`
InternalInvokeCorrectFailRejectBehaviourAfterHeight uint64 `json:"internal_invoke_correct_fail_reject_behaviour_after_height"`
InvokeNoZeroPaymentsAfterHeight uint64 `json:"invoke_no_zero_payments_after_height"`
// Diff in milliseconds.
MaxTxTimeBackOffset uint64 `json:"max_tx_time_back_offset"`
MaxTxTimeForwardOffset uint64 `json:"max_tx_time_forward_offset"`
AddressSchemeCharacter proto.Scheme `json:"address_scheme_character"`
AverageBlockDelaySeconds uint64 `json:"average_block_delay_seconds"`
// FairPosCalculator
DelayDelta uint64 `json:"delay_delta"`
// In Milliseconds.
MinBlockTime float64 `json:"min_block_time"`
// Configurable.
MaxBaseTarget uint64 `json:"max_base_target"`
// Block Reward
BlockRewardTerm uint64 `json:"block_reward_term"`
BlockRewardTermAfter20 uint64 `json:"block_reward_term_after_20"`
InitialBlockReward uint64 `json:"initial_block_reward"`
BlockRewardIncrement uint64 `json:"block_reward_increment"`
BlockRewardVotingPeriod uint64 `json:"block_reward_voting_period"`
RewardAddresses []proto.WavesAddress `json:"reward_addresses"`
RewardAddressesAfter21 []proto.WavesAddress `json:"reward_addresses_after_21"`
MinXTNBuyBackPeriod uint64 `json:"min_xtn_buy_back_period"`
MinUpdateAssetInfoInterval uint64 `json:"min_update_asset_info_interval"`
}
func (*FunctionalitySettings) ActivationWindowSize ¶
func (f *FunctionalitySettings) ActivationWindowSize(height uint64) uint64
func (*FunctionalitySettings) VotesForFeatureElection ¶
func (f *FunctionalitySettings) VotesForFeatureElection(height uint64) uint64
Click to show internal directories.
Click to hide internal directories.