package
0.0.0-20220616152218-3da4c06c590a
Repository: https://github.com/astra-net/astra-network.git
Documentation: pkg.go.dev
# Functions
IsEthCompatible returns whether the chainID is for ethereum compatible txn or not.
UpdateEthChainIDByShard update the ethChainID based on shard ID.
# Constants
The cost of a BALANCE operation after Tangerine.
The cost of a BALANCE operation after EIP 1884 (part of Istanbul).
The cost of a BALANCE operation.
Byzantium gas needed for an elliptic curve addition.
Gas needed for an elliptic curve addition.
Byzantium base price for an elliptic curve pairing check.
Base price for an elliptic curve pairing check.
Byzantium per-point price for an elliptic curve pairing check.
Per-point price for an elliptic curve pairing check.
Byzantium gas needed for an elliptic curve scalar multiplication.
Gas needed for an elliptic curve scalar multiplication.
Maximum depth of call/create stack.
Once per CALL operation & message call transaction.
Static portion of gas for CALL-derivates after EIP 150 (Tangerine).
Once per CALL operation & message call transaction.
Paid for CALL when the destination address didn't exist prior.
Free gas given at beginning of call.
Paid for CALL when the value transfer is non-zero.
.
Once per CREATE2 operation.
CreateBySelfdestructGas is used when the refunded account is one that does not exist.
.
Once per CREATE operation & contract-creation transaction.
Elliptic curve sender recovery gas price.
Duration between proof-of-work epochs.
was raised to 50 during Eip158 (Spurious Dragon).
was set to 10 in Frontier.
Times ceil(log256(exponent)) for the EXP instruction.
Once per EXP instruction.
nolint.
Extcodecopy has a dynamic AND a static cost.
Cost of EXTCODEHASH (introduced in Constantinople).
Cost of EXTCODEHASH after EIP 1884 (part in Istanbul).
Cost of EXTCODESIZE after EIP 150 (Tangerine).
Cost of EXTCODESIZE before EIP 150 (Tangerine).
The bound divisor of the gas limit, used in update calculations.
Gas limit of the Genesis block.
Base price for a data copy operation.
Per-work price for a data copy operation.
Refunded gas, once per SSTORE operation if the zeroness changes to zero.
Per byte in a LOG* operation's data.
Per LOG* operation.
Multiplied by the * of the LOG*, per LOG transaction.
Maximum bytecode to permit for a contract.
Maximum size extra data may be after Genesis.
Times the address of the (highest referenced byte in memory + 1).
Minimum the gas limit may ever be.
Divisor for the quadratic particle of the big int modular exponentiation.
Once per SSTORE operation from clean non-zero.
Once per SSTORE operation for clearing an originally existing storage slot.
Once per SSTORE operation from dirty.
Once per SSTORE operation from clean zero.
Once per SSTORE operation if the value doesn't change.
Once per SSTORE operation for resetting to the original zero value.
Once per SSTORE operation for resetting to the original non-zero value.
Divisor for the quadratic particle of the memory cost equation.
Base price for a RIPEMD160 operation.
Per-word price for a RIPEMD160 operation.
Cost of SELFDESTRUCT post EIP 150 (Tangerine).
Refunded following a selfdestruct operation.
Base price for a SHA256 operation.
Per-word price for a SHA256 operation.
Once per SHA3-256 operation.
Once per word of the SHA3-256 operation's data.
Once per SHA3 operation.
Once per word of the SHA3 operation's data.
Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added.
nolint.
Cost of SLOAD after EIP 1884 (part of Istanbul).
nolint.
Once per SSTORE operation from clean non-zero to something else.
Once per SSTORE operation for resetting to the original non-zero value.
Once per SSTORE operation if the zeroness doesn't change.
Once per SSTORE operation for clearing an originally existing storage slot.
Once per SSTORE operation if a dirty value is changed.
Once per SSTORE operation from clean zero to non-zero.
Once per SSTORE operation for resetting to the original zero value.
Once per SSTORE operation if the value doesn't change.
Once per SSTORE operation if the zeroness changes to zero.
Once per SSTORE operation if the zeroness changes from zero.
Minimum gas required to be present for an SSTORE call, not consumed.
Once per SLOAD operation.
Maximum size of VM stack allowed.
A Gas limit in testing of the Genesis block (set same as current mainnet).
Once per operation, for a selection of them.
Per byte of non zero data attached to a transaction after EIP 2028 (part in Istanbul).
Per byte of data attached to a transaction that is not equal to zero.
Per byte of data attached to a transaction that equals zero.
Per transaction not creating a contract.
Per transaction that creates a contract.
Per transaction that creates a new validator.
# Variables
AllProtocolChanges ..
not a real network.
The bound divisor of the difficulty, used in the update calculations.
The decision boundary on the blocktime duration used to determine whether difficulty should go up or not.
EpochTBD is a large, “not anytime soon” epoch.
not a real network.
EthMainnetShard0ChainID to be reserved unique chain ID for eth compatible chains.
Well-known chain IDs.
Well-known chain IDs.
Well-known chain IDs.
Well-known chain IDs.
not a real network.
GasTableR3 contain the gas prices for the r3 phase.
GasTableS3 contain the gas re-prices for the s3 phase.
Difficulty of the Genesis block.
LocalnetChainConfig contains the chain parameters to run for local development.
MainnetChainConfig is the chain parameters to run a node on the main network.
Well-known chain IDs.
The minimum that the difficulty may ever be.
PangaeaChainConfig contains the chain parameters for the Pangaea network.
Well-known chain IDs.
PartnerChainConfig contains the chain parameters for the Partner network.
Well-known chain IDs.
StressnetChainConfig contains the chain parameters for the Stress test network.
Well-known chain IDs.
TestChainConfig ..
not a real network.
TestnetChainConfig contains the chain parameters to run a node on the astra test network.
Well-known chain IDs.
TestRules ...
# Structs
ChainConfig is the core config which determines the blockchain settings.
GasTable organizes gas prices for different astra phases.
Rules wraps ChainConfig and is merely syntactic sugar or can be used for functions that do not have or require information about the block.
TrustedCheckpoint represents a set of post-processed trie roots (CHT and BloomTrie) associated with the appropriate section index and head hash.