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
- func BlockchainSettingsByTypeName(networkType string) (*BlockchainSettings, error)
- func MustDefaultCustomSettings() *BlockchainSettings
- func MustMainNetSettings() *BlockchainSettings
- func MustStageNetSettings() *BlockchainSettings
- func MustTestNetSettings() *BlockchainSettings
- func ReadBlockchainSettings(r io.Reader) (*BlockchainSettings, error)
- type BlockchainType
- type Feature
- type FeatureInfo
- type FunctionalitySettings
- func (f *FunctionalitySettings) ActivationWindowSize(height uint64) uint64
- func (f *FunctionalitySettings) BlockRewardVotingThreshold() uint64
- func (f *FunctionalitySettings) CanReissueNonReissueablePeriod(currentTimestamp uint64) bool
- func (f *FunctionalitySettings) CurrentBlockRewardTerm(isCappedRewardActivated bool) uint64
- func (f *FunctionalitySettings) CurrentRewardAddresses(isXTNBuyBackCessationActivated bool) []proto.WavesAddress
- func (f *FunctionalitySettings) DAOAddress(isXTNBuyBackCessationActivated bool) (proto.WavesAddress, bool)
- func (f *FunctionalitySettings) RangeForGeneratingBalanceByHeight(height proto.Height) (uint64, uint64)
- func (f *FunctionalitySettings) VotesForFeatureElection(height uint64) uint64
- func (f *FunctionalitySettings) XTNBuybackAddress(isXTNBuyBackCessationActivated bool) (proto.WavesAddress, bool)
- type NodeSettings
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MainNetSettings is a set of settings for main network. // // Deprecated: use MustMainNetSettings instead. MainNetSettings = MustMainNetSettings() //nolint:gochecknoglobals // Deprecated, left for compatibility // TestNetSettings is a set of settings for test network. // // Deprecated: use MustTestNetSettings instead. TestNetSettings = MustTestNetSettings() //nolint:gochecknoglobals // Deprecated, left for compatibility // StageNetSettings is a set of settings for stage network. // // Deprecated: use MustStageNetSettings instead. StageNetSettings = MustStageNetSettings() //nolint:gochecknoglobals // Deprecated, left for compatibility // DefaultCustomSettings is a set of settings for custom blockchain. // // Deprecated: use MustDefaultCustomSettings instead. DefaultCustomSettings = MustDefaultCustomSettings() //nolint:gochecknoglobals // Deprecated, left for compatibility )
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"}, LightNode: {true, "Light Node"}, BoostBlockReward: {true, "Boost Block Reward"}, DeterministicFinality: {true, "Deterministic Finality and Ride V9"}, InvokeExpression: {false, "InvokeExpression"}, // contains filtered or unexported fields }
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 MustDefaultCustomSettings ¶ added in v0.11.0
func MustDefaultCustomSettings() *BlockchainSettings
func MustMainNetSettings ¶ added in v0.11.0
func MustMainNetSettings() *BlockchainSettings
func MustStageNetSettings ¶ added in v0.11.0
func MustStageNetSettings() *BlockchainSettings
func MustTestNetSettings ¶ added in v0.11.0
func MustTestNetSettings() *BlockchainSettings
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 LightNode // 22 BoostBlockReward // 23 DeterministicFinality // 25 Deterministic Finality and RideV9 InvokeExpression // 26 )
Feature IDs. Order is important, do not change implemented features IDs.
func LastFeature ¶ added in v0.11.0
func LastFeature() Feature
LastFeature returns the last implemented feature.
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"`
// PaymentsFixAfterHeight == 'paymentsCheckHeight' in scala node - reject any invoke tx
// after this height if account balance become negative
PaymentsFixAfterHeight uint64 `json:"payments_fix_after_height"`
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"`
BlockRewardBoostPeriod uint64 `json:"block_reward_boost_period"`
MinUpdateAssetInfoInterval uint64 `json:"min_update_asset_info_interval"`
LightNodeBlockFieldsAbsenceInterval uint64 `json:"light_node_block_fields_absence_interval"`
GenerationPeriod uint64 `json:"generation_period"`
MaxEndorsements int `json:"max_endorsements"`
}
func (*FunctionalitySettings) ActivationWindowSize ¶
func (f *FunctionalitySettings) ActivationWindowSize(height uint64) uint64
func (*FunctionalitySettings) BlockRewardVotingThreshold ¶ added in v0.11.0
func (f *FunctionalitySettings) BlockRewardVotingThreshold() uint64
func (*FunctionalitySettings) CanReissueNonReissueablePeriod ¶ added in v0.11.0
func (f *FunctionalitySettings) CanReissueNonReissueablePeriod(currentTimestamp uint64) bool
func (*FunctionalitySettings) CurrentBlockRewardTerm ¶ added in v0.11.0
func (f *FunctionalitySettings) CurrentBlockRewardTerm(isCappedRewardActivated bool) uint64
func (*FunctionalitySettings) CurrentRewardAddresses ¶ added in v0.11.0
func (f *FunctionalitySettings) CurrentRewardAddresses(isXTNBuyBackCessationActivated bool) []proto.WavesAddress
func (*FunctionalitySettings) DAOAddress ¶ added in v0.11.0
func (f *FunctionalitySettings) DAOAddress(isXTNBuyBackCessationActivated bool) (proto.WavesAddress, bool)
func (*FunctionalitySettings) RangeForGeneratingBalanceByHeight ¶ added in v0.11.0
func (f *FunctionalitySettings) RangeForGeneratingBalanceByHeight(height proto.Height) (uint64, uint64)
func (*FunctionalitySettings) VotesForFeatureElection ¶
func (f *FunctionalitySettings) VotesForFeatureElection(height uint64) uint64
func (*FunctionalitySettings) XTNBuybackAddress ¶ added in v0.11.0
func (f *FunctionalitySettings) XTNBuybackAddress(isXTNBuyBackCessationActivated bool) (proto.WavesAddress, bool)
Click to show internal directories.
Click to hide internal directories.