params

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: GPL-3.0, GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// These are the multipliers for ether denominations.
	// Example: To get the wei value of an amount in 'douglas', use
	//
	//    new(big.Int).Mul(value, big.NewInt(params.Douglas))
	//
	Wei      = 1
	Ada      = 1e3
	Babbage  = 1e6
	Shannon  = 1e9
	Szabo    = 1e12
	Finney   = 1e15
	Ether    = 1e18
	Einstein = 1e21
	Douglas  = 1e42
)
View Source
const (
	GasLimitBoundDivisor uint64 = 64       //1024    // The bound divisor of the gas limit, used in update calculations.
	MinGasLimit          uint64 = 500000   //5000    // Minimum the gas limit may ever be.
	GenesisGasLimit      uint64 = 50000000 //5000000 // Gas limit of the Genesis block.

	MaximumExtraDataSize  uint64 = 32    // Maximum size extra data may be after Genesis.
	ExpByteGas            uint64 = 10    // Times ceil(log256(exponent)) for the EXP instruction.
	SloadGas              uint64 = 50    // Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added.
	CallValueTransferGas  uint64 = 9000  // Paid for CALL when the value transfer is non-zero.
	CallNewAccountGas     uint64 = 25000 // Paid for CALL when the destination address didn't exist prior.
	TxGas                 uint64 = 21000 // Per transaction not creating a contract. NOTE: Not payable on data of calls between transactions.
	TxGasContractCreation uint64 = 53000 // Per transaction that creates a contract. NOTE: Not payable on data of calls between transactions.
	TxDataZeroGas         uint64 = 4     // Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions.
	QuadCoeffDiv          uint64 = 512   // Divisor for the quadratic particle of the memory cost equation.
	SstoreSetGas          uint64 = 20000 // Once per SLOAD operation.
	LogDataGas            uint64 = 8     // Per byte in a LOG* operation's data.
	CallStipend           uint64 = 2300  // Free gas given at beginning of call.

	Sha3Gas          uint64 = 30    // Once per SHA3 operation.
	Sha3WordGas      uint64 = 6     // Once per word of the SHA3 operation's data.
	SstoreResetGas   uint64 = 5000  // Once per SSTORE operation if the zeroness changes from zero.
	SstoreClearGas   uint64 = 5000  // Once per SSTORE operation if the zeroness doesn't change.
	SstoreRefundGas  uint64 = 15000 // Once per SSTORE operation if the zeroness changes to zero.
	JumpdestGas      uint64 = 1     // Refunded gas, once per SSTORE operation if the zeroness changes to zero.
	EpochDuration    uint64 = 30000 // Duration between proof-of-work epochs.
	CallGas          uint64 = 40    // Once per CALL operation & message call transaction.
	CreateDataGas    uint64 = 200   //
	CallCreateDepth  uint64 = 1024  // Maximum depth of call/create stack.
	ExpGas           uint64 = 10    // Once per EXP instruction
	LogGas           uint64 = 375   // Per LOG* operation.
	CopyGas          uint64 = 3     //
	StackLimit       uint64 = 1024  // Maximum size of VM stack allowed.
	TierStepGas      uint64 = 0     // Once per operation, for a selection of them.
	LogTopicGas      uint64 = 375   // Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas.
	CreateGas        uint64 = 32000 // Once per CREATE operation & contract-creation transaction.
	SuicideRefundGas uint64 = 24000 // Refunded following a suicide operation.
	MemoryGas        uint64 = 3     // Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL.
	TxDataNonZeroGas uint64 = 68    // Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions.

	MaxCodeSize = 24576 // Maximum bytecode to permit for a contract

	EcrecoverGas            uint64 = 3000   // Elliptic curve sender recovery gas price
	Sha256BaseGas           uint64 = 60     // Base price for a SHA256 operation
	Sha256PerWordGas        uint64 = 12     // Per-word price for a SHA256 operation
	Ripemd160BaseGas        uint64 = 600    // Base price for a RIPEMD160 operation
	Ripemd160PerWordGas     uint64 = 120    // Per-word price for a RIPEMD160 operation
	IdentityBaseGas         uint64 = 15     // Base price for a data copy operation
	IdentityPerWordGas      uint64 = 3      // Per-work price for a data copy operation
	ModExpQuadCoeffDiv      uint64 = 20     // Divisor for the quadratic particle of the big int modular exponentiation
	Bn256AddGas             uint64 = 500    // Gas needed for an elliptic curve addition
	Bn256ScalarMulGas       uint64 = 40000  // Gas needed for an elliptic curve scalar multiplication
	Bn256PairingBaseGas     uint64 = 100000 // Base price for an elliptic curve pairing check
	Bn256PairingPerPointGas uint64 = 80000  // Per-point price for an elliptic curve pairing check
)
View Source
const (
	VersionMajor = 0        // Major version component of the current release
	VersionMinor = 2        // Minor version component of the current release
	VersionPatch = 5        // Patch version component of the current release
	VersionMeta  = "stable" // Version metadata to append to the version string
)
View Source
const (
	// BloomBitsBlocks is the number of blocks a single bloom bit section vector
	// contains.
	BloomBitsBlocks uint64 = 4096
)

Variables

View Source
var (
	MainnetGenesisHash = common.HexToHash("t0c6f20167950874a396ca06b717df8cd96597bc849b4935003cda98598c5e98be") // Mainnet genesis hash to enforce below configs on
	TestnetGenesisHash = common.HexToHash("t01fa3701d9164c47b587e335e9d4c2a34360dd77c84859c818ba7ea684bdf6ee1") // Testnet genesis hash to enforce below configs on
)
View Source
var (
	// MainnetChainConfig is the chain parameters to run a node on the main network.
	MainnetChainConfig = &ChainConfig{
		ChainId:             big.NewInt(8848),
		HomesteadBlock:      big.NewInt(1),
		EIP150Block:         big.NewInt(2),
		EIP150Hash:          common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
		EIP155Block:         big.NewInt(3),
		EIP158Block:         big.NewInt(3),
		ByzantiumBlock:      big.NewInt(4),
		ConstantinopleBlock: nil,
		Alien: &AlienConfig{
			Period:           3,
			Epoch:            201600,
			MaxSignerCount:   21,
			TrantorBlock:     new(big.Int).SetUint64(2968888),
			MinVoterBalance:  new(big.Int).Mul(big.NewInt(100), big.NewInt(1e+18)),
			GenesisTimestamp: 1554004800,
			SelfVoteSigners: []common.UnprefixedAddress{
				common.UnprefixedAddress(common.HexToAddress("t06e83430ca56ee33a26e5ce87239cb251981ccc2b")),
				common.UnprefixedAddress(common.HexToAddress("t01807efcb4dc252ff6958eaab770c8b3936a5378f")),
				common.UnprefixedAddress(common.HexToAddress("t0350fccf36124cecd26318e9931414ce872bdb68c")),
				common.UnprefixedAddress(common.HexToAddress("t009cbad80e089754f610cb8771d9eca05e4e22bdb")),
				common.UnprefixedAddress(common.HexToAddress("t09d507c10960531c9adc0ffdc9d9c735167275caf")),
				common.UnprefixedAddress(common.HexToAddress("t0c252c0f4d460554c679532072c8dbecd8d9ee89b")),
				common.UnprefixedAddress(common.HexToAddress("t0d8f68e2af8a061f0ea5e57ab7aca1b7fa96dab8a")),
				common.UnprefixedAddress(common.HexToAddress("t00c58019b9c8e293e3be8d3fd50f77af5f2e84bb7")),
				common.UnprefixedAddress(common.HexToAddress("t065dd958f7433cbe8353401d131c925e0424330b6")),
				common.UnprefixedAddress(common.HexToAddress("t0076c15f06f36b15544f1e97b4aacbd358d60cdf0")),
				common.UnprefixedAddress(common.HexToAddress("t0ecfd032885b4b9e69ab732e800c72296733165d7")),
				common.UnprefixedAddress(common.HexToAddress("t01a7910fe43b49b8bc33c04cb138cb2a8e1842f32")),
				common.UnprefixedAddress(common.HexToAddress("t0f52fe2e8decbbb3b00ebec7a1a50a41055d784ea")),
				common.UnprefixedAddress(common.HexToAddress("t035ef874a0f12581fd01fd2b178da7472475e253c")),
				common.UnprefixedAddress(common.HexToAddress("t090d4a9e77bf64b58f7c07d3bc19f8bb5e9d49031")),
				common.UnprefixedAddress(common.HexToAddress("t07bd38c427c685fbecbbe0daf49cda466b6475cc6")),
				common.UnprefixedAddress(common.HexToAddress("t0db1f586092917033e15298663594abb01eb98e39")),
				common.UnprefixedAddress(common.HexToAddress("t049574ad7832ff9a9214eb462cce2accf35f9118c")),
				common.UnprefixedAddress(common.HexToAddress("t0c8a7ca612be71d84c82c2c1fefbd035517df6745")),
				common.UnprefixedAddress(common.HexToAddress("t07e13706bab4bfae1f856d75e96676ab27eeea083")),
				common.UnprefixedAddress(common.HexToAddress("t0c5981e7fb6726be96345a732de6206bb1d66b963")),
				common.UnprefixedAddress(common.HexToAddress("t0ba99e0bb3fb9537db76a8ac1e76ebca5177954c9")),
				common.UnprefixedAddress(common.HexToAddress("t0d039d1feb6b13c3abe5089da9157fd41104c1aee")),
				common.UnprefixedAddress(common.HexToAddress("t0532c8772925e4b55a6bc99e954aa4cacc7d152b3")),
				common.UnprefixedAddress(common.HexToAddress("t0b464963fcb52b4666577987538a45e68876dc4e7")),
				common.UnprefixedAddress(common.HexToAddress("t08967f6d04ce36683ebe08c55caa15a177447f983")),
				common.UnprefixedAddress(common.HexToAddress("t005f39bfe9588f9297b8f3b019a3ee336efe47c47")),
				common.UnprefixedAddress(common.HexToAddress("t00c59dd1a15c3d5db4b4297cd79bfe72b60affc3e")),
				common.UnprefixedAddress(common.HexToAddress("t08f05387c4d637288dd197e26d5bdd3cb7087793c")),
				common.UnprefixedAddress(common.HexToAddress("t002289f35b60c97e27141c6aeb2691d25b531c755")),
				common.UnprefixedAddress(common.HexToAddress("t039e18521278e5121fdb0b691e84869bd4c645241")),
				common.UnprefixedAddress(common.HexToAddress("t04b4a0c8cb17b50d8d22610b307c349b63560ca4b")),
				common.UnprefixedAddress(common.HexToAddress("t09b25f97fa4e3892d9a86ac035a338b36dace5c4b")),
				common.UnprefixedAddress(common.HexToAddress("t0c520c15d943603dc333ebf6b5e39eb4d509fc1f8")),
				common.UnprefixedAddress(common.HexToAddress("t0da863ba260a36a11e3ea953b61de4a0eeffaa6f5")),
				common.UnprefixedAddress(common.HexToAddress("t03692048ef49479294bcfe9ee7e97508633756f3f")),
				common.UnprefixedAddress(common.HexToAddress("t027f7fcf7938618dfb0fc3668cd6fe7c1f7315870")),
				common.UnprefixedAddress(common.HexToAddress("t0f34961e5654a76335e0480bd7c7d370ad41ac74f")),
				common.UnprefixedAddress(common.HexToAddress("t092918ee96f529fdabab1a1ffda627c3d6b442ad9")),
				common.UnprefixedAddress(common.HexToAddress("t02024cc8d89f7cbd09a4085fbc729e3b9ee92c1be")),
				common.UnprefixedAddress(common.HexToAddress("t01b5887157beff2e2eff9ea9b8409f3ca1b6a052f")),
				common.UnprefixedAddress(common.HexToAddress("t0ad11612be2d9811ffe80f9e9ec1bbdc0ff34067c")),
				common.UnprefixedAddress(common.HexToAddress("t04e3011ab5b261cff133f4e8fb597dd0980814a94")),
				common.UnprefixedAddress(common.HexToAddress("t02834dc6b4b054fcf9cb206df4cce17fa0044826b")),
				common.UnprefixedAddress(common.HexToAddress("t07a2da45fd12d9bd44227ec58a5f0c3085ef18bf1")),
				common.UnprefixedAddress(common.HexToAddress("t0e8ae4d470fb87381f34a77c992a1de53fc2d2a3c")),
				common.UnprefixedAddress(common.HexToAddress("t0777689118d95751e1d709d7134adddd387226ac3")),
				common.UnprefixedAddress(common.HexToAddress("t00d6556b96b2b7cd095bf42aa2c287df99f22fc87")),
				common.UnprefixedAddress(common.HexToAddress("t0b97b279af3aa97655e6592b320e94505b41631ec")),
				common.UnprefixedAddress(common.HexToAddress("t0bce13d77339971d1f5f00c38f523ba7ee44c95ed")),
			},
		},
	}

	// TestnetChainConfig contains the chain parameters to run a node on the Ropsten test network.
	TestnetChainConfig = &ChainConfig{
		ChainId:             big.NewInt(8341),
		HomesteadBlock:      big.NewInt(1),
		EIP150Block:         big.NewInt(2),
		EIP150Hash:          common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
		EIP155Block:         big.NewInt(3),
		EIP158Block:         big.NewInt(3),
		ByzantiumBlock:      big.NewInt(4),
		ConstantinopleBlock: nil,
		Alien: &AlienConfig{
			Period:           3,
			Epoch:            201600,
			MaxSignerCount:   21,
			MinVoterBalance:  new(big.Int).Mul(big.NewInt(100), big.NewInt(1e+18)),
			TrantorBlock:     big.NewInt(695000),
			GenesisTimestamp: 1554004800,
			SelfVoteSigners: []common.UnprefixedAddress{
				common.UnprefixedAddress(common.HexToAddress("t0be6865ffcbbe5f9746bef5c84b912f2ad9e52075")),
				common.UnprefixedAddress(common.HexToAddress("t04909b4e54395de9e313ad8a2254fe2dcda99e91c")),
				common.UnprefixedAddress(common.HexToAddress("t0a034350c8e80eb4d15ac62310657b29c711bb3d5")),
			},
		},
	}

	// SideChainConfig contains the chain parameters to run a node on the Ropsten test network.
	SideChainConfig = &ChainConfig{
		ChainId:             big.NewInt(8123),
		HomesteadBlock:      big.NewInt(1),
		EIP150Block:         big.NewInt(2),
		EIP150Hash:          common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
		EIP155Block:         big.NewInt(3),
		EIP158Block:         big.NewInt(3),
		ByzantiumBlock:      big.NewInt(4),
		ConstantinopleBlock: nil,
		Alien: &AlienConfig{
			Period:           1,
			Epoch:            201600,
			MaxSignerCount:   21,
			TrantorBlock:     big.NewInt(5),
			MinVoterBalance:  new(big.Int).Mul(big.NewInt(100), big.NewInt(1e+18)),
			GenesisTimestamp: 1554004800,
			SelfVoteSigners:  []common.UnprefixedAddress{},
		},
	}

	// RinkebyChainConfig contains the chain parameters to run a node on the Rinkeby test network.
	RinkebyChainConfig = &ChainConfig{
		ChainId:             big.NewInt(4),
		HomesteadBlock:      big.NewInt(1),
		EIP150Block:         big.NewInt(2),
		EIP150Hash:          common.HexToHash("0x9b095b36c15eaf13044373aef8ee0bd3a382a5abb92e402afa44b8249c3a90e9"),
		EIP155Block:         big.NewInt(3),
		EIP158Block:         big.NewInt(3),
		ByzantiumBlock:      big.NewInt(1035301),
		ConstantinopleBlock: nil,
		Clique: &CliqueConfig{
			Period: 15,
			Epoch:  30000,
		},
	}

	// AllEthashProtocolChanges contains every protocol change (EIPs) introduced
	// and accepted by the Ethereum core developers into the Ethash consensus.
	//
	// This configuration is intentionally not using keyed fields to force anyone
	// adding flags to the config to also have to set these fields.
	AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil}

	// AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
	// and accepted by the Ethereum core developers into the Clique consensus.
	//
	// This configuration is intentionally not using keyed fields to force anyone
	// adding flags to the config to also have to set these fields.
	AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil}

	// AllAlienProtocolChanges contains every protocol change (EIPs) introduced
	// and accepted by the Ethereum core developers into the Alien consensus.
	//
	// This configuration is intentionally not using keyed fields to force anyone
	// adding flags to the config to also have to set these fields.
	AllAlienProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, &AlienConfig{Period: 3, Epoch: 30000, MaxSignerCount: 21, MinVoterBalance: new(big.Int).Mul(big.NewInt(10000), big.NewInt(1000000000000000000)), GenesisTimestamp: 0, SelfVoteSigners: []common.UnprefixedAddress{}}}

	TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil}
	TestRules       = TestChainConfig.Rules(new(big.Int))
)
View Source
var (
	// GasTableHomestead contain the gas prices for
	// the homestead phase.
	GasTableHomestead = GasTable{
		ExtcodeSize: 20,
		ExtcodeCopy: 20,
		Balance:     20,
		SLoad:       50,
		Calls:       40,
		Suicide:     0,
		ExpByte:     10,
	}

	// GasTableHomestead contain the gas re-prices for
	// the homestead phase.
	GasTableEIP150 = GasTable{
		ExtcodeSize: 700,
		ExtcodeCopy: 700,
		Balance:     400,
		SLoad:       200,
		Calls:       700,
		Suicide:     5000,
		ExpByte:     10,

		CreateBySuicide: 25000,
	}

	GasTableEIP158 = GasTable{
		ExtcodeSize: 700,
		ExtcodeCopy: 700,
		Balance:     400,
		SLoad:       200,
		Calls:       700,
		Suicide:     5000,
		ExpByte:     50,

		CreateBySuicide: 25000,
	}
)
View Source
var (
	DifficultyBoundDivisor = big.NewInt(2048)   // The bound divisor of the difficulty, used in the update calculations.
	GenesisDifficulty      = big.NewInt(131072) // Difficulty of the Genesis block.
	MinimumDifficulty      = big.NewInt(131072) // The minimum that the difficulty may ever be.
	DurationLimit          = big.NewInt(13)     // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not.
)
View Source
var DiscoveryV5Bootnodes = []string{
	"enode://06051a5573c81934c9554ef2898eb13b33a34b94cf36b202b69fde139ca17a85051979867720d4bdae4323d4943ddf9aeeb6643633aa656e0be843659795007a@35.177.226.168:30303",
	"enode://0cc5f5ffb5d9098c8b8c62325f3797f56509bff942704687b6530992ac706e2cb946b90a34f1f19548cd3c7baccbcaea354531e5983c7d1bc0dee16ce4b6440b@40.118.3.223:30304",
	"enode://1c7a64d76c0334b0418c004af2f67c50e36a3be60b5e4790bdac0439d21603469a85fad36f2473c9a80eb043ae60936df905fa28f1ff614c3e5dc34f15dcd2dc@40.118.3.223:30306",
	"enode://85c85d7143ae8bb96924f2b54f1b3e70d8c4d367af305325d30a61385a432f247d2c75c45c6b4a60335060d072d7f5b35dd1d4c45f76941f62a4f83b6e75daaf@40.118.3.223:30307",
}

DiscoveryV5Bootnodes are the enode URLs of the P2P bootstrap nodes for the experimental RLPx v5 topic-discovery network.

View Source
var MainnetBootnodes = []string{

	"enode://94268dca1403ceaaad778913953134d572e59810e4aa2c208938fceae8315d51963d51ca1ec903332179e34921cfd51e4dca6508e85756f624e1c28fc8d5f613@35.195.13.217:30313",
	"enode://00c9ac313b53b22f0639d7609ae343bb01b3a594503f8e9887f46130771c78536969b52968560828881c7dad3adb0acead5e5c95644cc15da2976acd7bd72e13@35.231.35.71:30311",
	"enode://eb227d3ade864eade034d69a02d46c37a215c25616f5c79a21a131e46c1e47deb1868151d7b4af6e0fa076a43fac6ae9ba0a0937dbf0214e8814945985f0a258@35.231.35.71:30313",
	"enode://1ff1e9e6707b87d674ac2300c949cfa249906e46eaceb6d58d43dd44f8d8f62d75e097b78f5040f22ddd7473831cb70842841fba2a52cea26701b47f69ab7e62@35.228.112.210:30311",
	"enode://26aa260b2dd45392816bf29f3f01532f282f4bd98e1d42fcb1a20d7bc45c48809f87c4f94719207631083e985d88cfbecb5bb98a002f59514c18e64aad282d30@35.228.112.210:30312",
	"enode://6f983c38ab7b34360760668bb032e5c0968ad967c631c5decaee087adb88497a9b5c76bbd61b4dbeb218faa6ffe1a0f77288e5fb8a7a032e975f7cf42d6fce47@35.230.128.59:30311",
	"enode://fcb0c9b8c375b973011a27f1d2ddc2df34d56080c1d8b2daa961542912e90224d650ce38a2c6f61f24189018f960f80123e402d6d40a70fa2dff42b90b995ce7@35.230.128.59:30312",
	"enode://5652b8cb4c5ae8f9ef004fc7eebc3a409e2a3421ad6bda95090a46c3cbcae82324981d0bac8836558f09741d459850452300145085675c87a1e84753b5730474@35.243.91.57:30311",
	"enode://e0fe630505fa7ec17178bdf816018e1b6c566804d1eaad5a6ba50d29522f796b82518b0b168da3a5b222b2ec6be9f651c6a4e321247144d15d0288bff4864a32@35.243.118.24:30311",
	"enode://de741dcc7474645790c1890eea02c1e6dc14689dcbaa8e12a0cba6a0dc96d9c84dfcd3b7a001e9eae1dfc1ce3efabcc0a6b70bfe2d0491347367d2524f684000@35.190.239.155:30303",
	"enode://80b6e1b753e4b662db6c4fc53bd58c51cd3ed549c062e3743c5bd6ce9f7042b0b3152a093fc535c19960a7625aaad4f6e77d88220ad4aa676f2cefb4dce03956@35.190.239.155:30312",
	"enode://0843721927af5ac58a2bdaf3b8c0783c452762788fc578261401c54caac3b6c751804a91d183db806bd9a45012b0000d703c9024ec6920f7c4ba037be44f8965@35.190.239.155:30314",
	"enode://67e7ee1779f6165a8c93df0b7aa281448031660f3301fb59a6a0acfbffa0ea44a4bba3d02008c6c76b8b1218fe8f941d70e431b243d91c3e5e38a6b5bdae6158@34.74.182.148:30303",
	"enode://4c3e8d3ba2c174df4f93eaaac3073d62d5ef49f3d993721c72325add9785ac7290e8c84551a5418884021e993d00df20fc7c05ce486faf189af40768aaaa34dd@34.74.182.148:30312",
	"enode://2bc058f435aeb40f289bb8bb0033c25546abbba90a6691a0337e4adec31a22ab87972800424aafecca4cb37481419e13c40dc228a13ff7821d1585aeed9fc779@34.77.28.121:30303",
	"enode://ea18e7b08e9b7b6951f08bae369616968264b7338a3f3194c2c5e38c0d2ef2fc7ea4d0dbd717c14008204f2e18b5212525013f4c409a00c5663c1ca4266d3aa1@34.77.28.121:30312",
	"enode://76b30846780ae7d2f296877a67f1bb39da646c92a96d9e13f0a2de4f5305d8dcbe2b07d16b2863b9e280c1cee496332bacaae2ed3949e9734f75dcb9f59f684f@35.241.177.70:30312",
	"enode://81ab2cb3fd0b5298a2d63b4cdb866af824720bce46d69ffe596c32131bd1e94e13f9662b3c06c8c7f5697931012cf806e4fe890d39babd8416a9a9382cbd8765@35.241.177.70:30313",
	"enode://8583f990f2b40fc20e3c4c779b5cdd301071f5bcd1cc32edd7efac566efe0ddf3a7ad8ecad4072f966c56bff913928275918079a26bea8a8f35c5ade72ff5caa@35.241.177.70:30314",
	"enode://c4b924871aa8706a9a07da15bdf450bfb8fbea29a376d26c5649ce2ff9ededa0a2e18ba9ecf8c1f72e626fe274a441cddeb1e831f9e72bb38b4c208405ef5f21@35.243.190.93:30311",
	"enode://461a358b6bde98f6a29db00f63a552df9e6e72241343c3190380231e551308296f1f875e39109c90796a5cb7551cf505131fa4d317dd44f5bb17f8b1704b09a9@35.243.190.93:30314",
	"enode://83d248abd03c311bba6c998b1d265bd5313ba11ee617a5978e90c5051bdf08cfd91e998f81a1515ffc08b4d6c63cd3cdaafe9d6bdf435e3b4350d2441e06b59c@35.195.84.56:30311",
	"enode://a1e8c3d3a9dd56ca9bac501cdaa217c544e9450a64b1504866069bb4eabffd78cef31477f768a4d37610b7b23a6c21b2099c999e11669830853253ccc7ee75c6@35.195.84.56:30314",
}

MainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the main Ethereum network.

View Source
var MainnetRPCnodes = []string{

	"47.111.177.215:8511",
	"47.111.178.14:8511",
	"47.111.177.154:8511",
}

MainnetRPCnodes are the RPC URLs of TTC main network.

View Source
var RinkebyBootnodes = []string{
	"enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303",
	"enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30303",
	"enode://b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6@159.89.28.211:30303",
}

RinkebyBootnodes are the enode URLs of the P2P bootstrap nodes running on the Rinkeby test network.

View Source
var SidechainBootnodes = []string{

	"enode://1a4cc9c8512256ff475990c4ab03636ac7771315a42432a240c6161befa162324be5af0f65828f0b7ec468b3d2183c430fb4a33d88ba5057eaa35b36a3af4b56@127.0.0.1:30510",
}

SidechainBootnodes are the enode URLs of the P2P bootstrap nodes running on the TTC sidechain network.

View Source
var (
	TargetGasLimit uint64 = GenesisGasLimit // The artificial target
)
View Source
var TestnetBootnodes = []string{

	"enode://b9487401a29c9c2b6f58ad96d080c22ed5c93a037d5cbd3412dc310837081ce6aa2b43910c3f1e8c94e072d56ddd2741941a04ae889f9119ab3bcfde8172fff8@47.111.177.215:30310",
	"enode://b52b9dec747cada8e4697544d857ab4b7e4298dce707f0591166cb3fedc07de86daffe73c49a23fd8e2b911b2246ea81a6ef709f42eab01c6d61b49c6f2b89c8@47.111.177.215:30311",
	"enode://f70bc22fc68fa25de65d365926deecb961b33165cba4078236d83e05259d6082979c2a0c5eb436351f49ddec2150e20b1425ca2c288512db5eeb2702b43f0d94@47.111.178.14:30312",
	"enode://bfbdf7ecb9be785ea0105a28db115dbdb61f6e486d6310859985974f05555d10e531290bd821a962efafdec087c075f6e5d15efd94937fb00d10c053b2bd56ed@47.111.177.154:30313",
	"enode://8327d9c22125b548fe9bf6ea463d011a87774974f7178847931d9ff4ca1b01151a4ef2a6c3a2626e7c2132d5e39f4f59437ab47feee8f3b9c5fd32cef118eb6b@47.111.178.14:30314",
	"enode://d72b636e208ad90cf46da4b6c04b2bf2e9a5a7a240655ea0dd8162e9f59bf734b12a8e4770c9e1f9eef11f2308241c49ffce62fef86fb78fc48d92fcbd72cace@47.111.178.14:30315",
	"enode://c8712027f2351bc59d0f5e8d8d278c645d4e6f91875a706684a20677e2695f20e29903d7ee679831e1bad7550b65cccc34b8c23abf3d09749ee556dce7415047@47.111.178.14:30316",
	"enode://082b1d3068ca66dc35c2439b64ce5b43c67585f0bb140fe15c4acf9db6a2cf821c0ab399bfa0f850cc2f30b71179ede9687a81e9d406cac52134386d8838224d@47.111.177.154:30318",
	"enode://2ee5103c7ce3b3cfda3ac081d0541903ebd834cba75907e4612dc825e37e2d83deb3ce579bc4bc64322f68ebdc7fa0b8181d00852aa92d5df6735030aff9fd53@47.111.177.154:30319",
}

TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the TTC test network.

View Source
var Version = func() string {
	v := fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch)
	if VersionMeta != "" {
		v += "-" + VersionMeta
	}
	return v
}()

Version holds the textual version string.

Functions

func VersionWithCommit

func VersionWithCommit(gitCommit string) string

Types

type AlienConfig

type AlienConfig struct {
	Period           uint64                     `json:"period"`           // Number of seconds between blocks to enforce
	Epoch            uint64                     `json:"epoch"`            // Epoch length to reset votes and checkpoint
	MaxSignerCount   uint64                     `json:"maxSignersCount"`  // Max count of signers
	MinVoterBalance  *big.Int                   `json:"minVoterBalance"`  // Min voter balance to valid this vote
	GenesisTimestamp uint64                     `json:"genesisTimestamp"` // The LoopStartTime of first Block
	SelfVoteSigners  []common.UnprefixedAddress `json:"signers"`          // Signers vote by themselves to seal the block, make sure the signer accounts are pre-funded
	SideChain        bool                       `json:"sideChain"`        // If side chain or not
	MCRPCClient      *rpc.Client                // Main chain rpc client for side chain
	PBFTEnable       bool                       `json:"pbft"` //

	TrantorBlock  *big.Int          `json:"trantorBlock,omitempty"`  // Trantor switch block (nil = no fork)
	TerminusBlock *big.Int          `json:"terminusBlock,omitempty"` // Terminus switch block (nil = no fork)
	LightConfig   *AlienLightConfig `json:"lightConfig,omitempty"`
}

AlienConfig is the consensus engine configs for delegated-proof-of-stake based sealing.

func (*AlienConfig) IsTerminus added in v0.0.7

func (a *AlienConfig) IsTerminus(num *big.Int) bool

IsTerminus returns whether num is either equal to the Terminus block or greater.

func (*AlienConfig) IsTrantor added in v0.0.7

func (a *AlienConfig) IsTrantor(num *big.Int) bool

IsTrantor returns whether num is either equal to the Trantor block or greater.

func (*AlienConfig) String

func (a *AlienConfig) String() string

String implements the stringer interface, returning the consensus engine details.

type AlienLightConfig added in v0.1.1

type AlienLightConfig struct {
	Alloc map[common.UnprefixedAddress]GenesisAccount `json:"alloc"`
}

AlienLightConfig is the config for light node of alien

type ChainConfig

type ChainConfig struct {
	ChainId *big.Int `json:"chainId"` // Chain id identifies the current chain and is used for replay protection

	HomesteadBlock *big.Int `json:"homesteadBlock,omitempty"` // Homestead switch block (nil = no fork, 0 = already homestead)

	// EIP150 implements the Gas price changes (https://github.com/ethereum/EIPs/issues/150)
	EIP150Block *big.Int    `json:"eip150Block,omitempty"` // EIP150 HF block (nil = no fork)
	EIP150Hash  common.Hash `json:"eip150Hash,omitempty"`  // EIP150 HF hash (needed for header only clients as only gas pricing changed)

	EIP155Block *big.Int `json:"eip155Block,omitempty"` // EIP155 HF block
	EIP158Block *big.Int `json:"eip158Block,omitempty"` // EIP158 HF block

	ByzantiumBlock      *big.Int `json:"byzantiumBlock,omitempty"`      // Byzantium switch block (nil = no fork, 0 = already on byzantium)
	ConstantinopleBlock *big.Int `json:"constantinopleBlock,omitempty"` // Constantinople switch block (nil = no fork, 0 = already activated)

	// Various consensus engines
	Ethash *EthashConfig `json:"ethash,omitempty"`
	Clique *CliqueConfig `json:"clique,omitempty"`
	Alien  *AlienConfig  `json:"alien,omitempty"`
}

ChainConfig is the core config which determines the blockchain settings.

ChainConfig is stored in the database on a per block basis. This means that any network, identified by its genesis block, can have its own set of configuration options.

func (*ChainConfig) CheckCompatible

func (c *ChainConfig) CheckCompatible(newcfg *ChainConfig, height uint64) *ConfigCompatError

CheckCompatible checks whether scheduled fork transitions have been imported with a mismatching chain configuration.

func (*ChainConfig) GasTable

func (c *ChainConfig) GasTable(num *big.Int) GasTable

GasTable returns the gas table corresponding to the current phase (homestead or homestead reprice).

The returned GasTable's fields shouldn't, under any circumstances, be changed.

func (*ChainConfig) IsByzantium

func (c *ChainConfig) IsByzantium(num *big.Int) bool

func (*ChainConfig) IsConstantinople

func (c *ChainConfig) IsConstantinople(num *big.Int) bool

func (*ChainConfig) IsEIP150

func (c *ChainConfig) IsEIP150(num *big.Int) bool

func (*ChainConfig) IsEIP155

func (c *ChainConfig) IsEIP155(num *big.Int) bool

func (*ChainConfig) IsEIP158

func (c *ChainConfig) IsEIP158(num *big.Int) bool

func (*ChainConfig) IsHomestead

func (c *ChainConfig) IsHomestead(num *big.Int) bool

IsHomestead returns whether num is either equal to the homestead block or greater.

func (*ChainConfig) Rules

func (c *ChainConfig) Rules(num *big.Int) Rules

func (*ChainConfig) String

func (c *ChainConfig) String() string

String implements the fmt.Stringer interface.

type CliqueConfig

type CliqueConfig struct {
	Period uint64 `json:"period"` // Number of seconds between blocks to enforce
	Epoch  uint64 `json:"epoch"`  // Epoch length to reset votes and checkpoint
}

CliqueConfig is the consensus engine configs for proof-of-authority based sealing.

func (*CliqueConfig) String

func (c *CliqueConfig) String() string

String implements the stringer interface, returning the consensus engine details.

type ConfigCompatError

type ConfigCompatError struct {
	What string
	// block numbers of the stored and new configurations
	StoredConfig, NewConfig *big.Int
	// the block number to which the local chain must be rewound to correct the error
	RewindTo uint64
}

ConfigCompatError is raised if the locally-stored blockchain is initialised with a ChainConfig that would alter the past.

func (*ConfigCompatError) Error

func (err *ConfigCompatError) Error() string

type EthashConfig

type EthashConfig struct{}

EthashConfig is the consensus engine configs for proof-of-work based sealing.

func (*EthashConfig) String

func (c *EthashConfig) String() string

String implements the stringer interface, returning the consensus engine details.

type GasTable

type GasTable struct {
	ExtcodeSize uint64
	ExtcodeCopy uint64
	Balance     uint64
	SLoad       uint64
	Calls       uint64
	Suicide     uint64

	ExpByte uint64

	// CreateBySuicide occurs when the
	// refunded account is one that does
	// not exist. This logic is similar
	// to call. May be left nil. Nil means
	// not charged.
	CreateBySuicide uint64
}

type GenesisAccount added in v0.1.1

type GenesisAccount struct {
	Balance string `json:"balance"`
}

type Rules

type Rules struct {
	ChainId                                   *big.Int
	IsHomestead, IsEIP150, IsEIP155, IsEIP158 bool
	IsByzantium                               bool
}

Rules wraps ChainConfig and is merely syntatic sugar or can be used for functions that do not have or require information about the block.

Rules is a one time interface meaning that it shouldn't be used in between transition phases.

Jump to

Keyboard shortcuts

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