constants

package
v0.0.1-rc-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MilliCents        = Cents / 1000
	Cents             = Dollar / 100
	Dollar            = Units
	Units      uint64 = 10_000_000_000
)
View Source
const AuthoringVersion = 1
View Source
const BlockHashCount = sc.U32(2400)
View Source
const FiveMbPerBlockPerExtrinsic sc.U32 = 5 * 1024 * 1024
View Source
const ImplName = "node-template"
View Source
const ImplVersion = 1
View Source
const SpecName = "node-template"
View Source
const SpecVersion = 100
View Source
const StateVersion = 1
View Source
const StorageVersion = 0
View Source
const TransactionVersion = 1
View Source
const WeightRefTimePerNanos sc.U64 = 1_000
View Source
const WeightRefTimePerSecond sc.U64 = 1_000_000_000_000

Variables

View Source
var (
	KeySystem             = []byte("System")
	KeyAccount            = []byte("Account")
	KeyAllExtrinsicsLen   = []byte("AllExtrinsicsLen")
	KeyAura               = []byte("Aura")
	KeyAuthorities        = []byte("Authorities")
	KeyBalances           = []byte("Balances")
	KeyBlockHash          = []byte("BlockHash")
	KeyBlockWeight        = []byte("BlockWeight")
	KeyCurrentSlot        = []byte("CurrentSlot")
	KeyDidUpdate          = []byte("DidUpdate")
	KeyDigest             = []byte("Digest")
	KeyEventCount         = []byte("EventCount")
	KeyEvents             = []byte("Events")
	KeyEventTopics        = []byte("EventTopics")
	KeyExecutionPhase     = []byte("ExecutionPhase")
	KeyExtrinsicCount     = []byte("ExtrinsicCount")
	KeyExtrinsicData      = []byte("ExtrinsicData")
	KeyExtrinsicIndex     = []byte(":extrinsic_index")
	KeyGrandpaAuthorities = []byte(":grandpa_authorities")
	KeyLastRuntimeUpgrade = []byte("LastRuntimeUpgrade")
	KeyNextFeeMultiplier  = []byte("NextFeeMultiplier")
	KeyNow                = []byte("Now")
	KeyNumber             = []byte("Number")
	KeyParentHash         = []byte("ParentHash")
	KeyTimestamp          = []byte("Timestamp")
	KeyTotalIssuance      = []byte("TotalIssuance")
	KeyTransactionPayment = []byte("TransactionPayment")
	TransactionLevelKey   = []byte(":transaction_level:")
)
View Source
var AverageOnInitializeRatio types.Perbill = types.Perbill{Percentage: 10}

We assume that ~10% of the block weight is consumed by `on_initialize` handlers. This is used to limit the maximal weight of a single extrinsic.

View Source
var BlockExecutionWeight types.Weight = types.WeightFromParts(WeightRefTimePerNanos.SaturatingMul(412_772), 0)

Time to execute an empty block. Calculated by multiplying the *Average* with `1.0` and adding `0`.

Stats nanoseconds:

Min, Max: 402_748, 458_228
Average:  412_772
Median:   406_151
Std-Dev:  13480.33

Percentiles nanoseconds:

99th: 450_080
95th: 445_111
75th: 414_170

DbWeight for RocksDB, used throughout the runtime.

View Source
var ExtrinsicBaseWeight types.Weight = types.WeightFromParts(WeightRefTimePerNanos.SaturatingMul(110_536), 0)

ExtrinsicBaseWeight is the time to execute a NO-OP extrinsic, for example `System::remark`. Calculated by multiplying the *Average* with `1.0` and adding `0`.

Stats nanoseconds:

Min, Max: 109_595, 114_170
Average:  110_536
Median:   110_233
Std-Dev:  933.39

Percentiles nanoseconds:

99th: 114_120
95th: 112_680
75th: 110_858
View Source
var MaximumBlockWeight types.Weight = types.WeightFromParts(WeightRefTimePerSecond.SaturatingMul(2), math.MaxUint64)

MaximumBlockWeight is the maximum weight 2 seconds of compute with a 6 second average block time, with maximum proof size.

View Source
var NormalDispatchRatio types.Perbill = types.Perbill{Percentage: 75}

We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by Operational extrinsics.

View Source
var RuntimeVersion = types.RuntimeVersion{
	SpecName:         sc.Str(SpecName),
	ImplName:         sc.Str(ImplName),
	AuthoringVersion: sc.U32(AuthoringVersion),
	SpecVersion:      sc.U32(SpecVersion),
	ImplVersion:      sc.U32(ImplVersion),

	Apis: sc.Sequence[types.ApiItem]{
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 223, 106, 203, 104, 153, 7, 96, 155),
			Version: sc.U32(4),
		},
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 55, 227, 151, 252, 124, 145, 245, 228),
			Version: sc.U32(1),
		},
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 64, 254, 58, 212, 1, 248, 149, 154),
			Version: sc.U32(6),
		},
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 210, 188, 152, 151, 238, 208, 143, 21),
			Version: sc.U32(3),
		},
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 247, 139, 39, 139, 229, 63, 69, 76),
			Version: sc.U32(2),
		},
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 221, 113, 141, 92, 197, 50, 98, 212),
			Version: sc.U32(1),
		},
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 171, 60, 5, 114, 41, 31, 235, 139),
			Version: sc.U32(1),
		},
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 237, 153, 197, 172, 178, 94, 237, 245),
			Version: sc.U32(3),
		},
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 188, 157, 137, 144, 79, 91, 146, 63),
			Version: sc.U32(1),
		},
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 55, 200, 187, 19, 80, 169, 162, 168),
			Version: sc.U32(3),
		},
		{
			Name:    sc.NewFixedSequence[sc.U8](8, 243, 255, 20, 213, 171, 82, 112, 89),
			Version: sc.U32(3),
		},
	},
	TransactionVersion: sc.U32(TransactionVersion),
	StateVersion:       sc.U8(StateVersion),
}

RuntimeVersion contains the version identifiers of the Runtime.

View Source
var (
	Zero = big.NewInt(0)
)

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL