Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StateRegisterOnce can be election only once StateRegisterOnce uint8 = 1 << iota // StateResgisterAuto can be election in every epoch StateResgisterAuto // StateRedeem can be redeem real time (after MaxRedeemHeight block) StateRedeem // StateRedeemed flag the asset which is staking in the height is redeemed StateRedeemed )
View Source
const ( OpQueryRegister uint8 = 1 << iota OpQueryLocked OpQueryUnlocking OpQueryReward OpQueryFine )
View Source
const ( StateUnusedFlag = 0xa0 StateUsedFlag = 0xa1 StateSwitchingFlag = 0xa2 StateRemovedFlag = 0xa3 StateAppendFlag = 0xa4 // health enter type TypeFixed = 0xa1 TypeWorked = 0xa2 TypeBack = 0xa3 )
View Source
const ( MainNetChainID uint64 = 211 TestNetChainID uint64 = 212 DevNetChainID uint64 = 213 SingleNodeChainID uint64 = 214 )
View Source
const ( VersionMajor = 0 // Major version component of the current release VersionMinor = 1 // Minor version component of the current release VersionPatch = 0 // Patch version component of the current release VersionMeta = "stable" // Version metadata to append to the version string )
View Source
const HeaderStoreABIJSON = `` /* 1168-byte string literal not displayed */
View Source
const RelayerABIJSON = `` /* 3372-byte string literal not displayed */
Variables ¶
View Source
var ( FbaseUnit = new(big.Float).SetFloat64(float64(baseUnit.Int64())) Base = new(big.Int).SetUint64(10000) InvalidFee = big.NewInt(65535) RelayerAddress = common.BytesToAddress([]byte("RelayerAddress")) HeaderStoreAddress = common.BytesToAddress([]byte("headerstoreAddress")) )
View Source
var ( CountInEpoch = 100 MaxRedeemHeight uint64 = 10000 NewEpochLength uint64 = 10000 ElectionPoint uint64 = 200 FirstNewEpochID uint64 = 1 PowForkPoint uint64 = 0 ElectionMinLimitForRegister = new(big.Int).Mul(big.NewInt(100000), big.NewInt(1e18)) MinWorkEfficiency uint64 = 1000 //every relayer sync 1000 block at least )
View Source
var ( ErrInvalidParam = errors.New("Invalid Param") ErrOverEpochID = errors.New("Over epoch id") ErrNotSequential = errors.New("epoch id not sequential") ErrInvalidEpochInfo = errors.New("Invalid epoch info") ErrNotFoundEpoch = errors.New("cann't found the epoch info") ErrInvalidRegister = errors.New("Invalid register account") ErrMatchEpochID = errors.New("wrong match epoch id in a reward block") ErrNotRegister = errors.New("Not match the register account") ErrNotDelegation = errors.New("Not match the account") ErrNotMatchEpochInfo = errors.New("the epoch info is not match with accounts") ErrNotElectionTime = errors.New("not time to election the next relayer") ErrAmountOver = errors.New("the amount more than register amount") ErrDelegationSelf = errors.New("wrong") ErrRedeemAmount = errors.New("wrong redeem amount") ErrForbidAddress = errors.New("Forbidding Address") ErrRepeatPk = errors.New("repeat PK on staking tx") )
View Source
var ( MainnetGenesisHash = common.HexToHash("0xf6285fd285d6c15aae581220e9b13f4d0ac75428ee90076e737f4e6125d31723") TestnetGenesisHash = common.HexToHash("0x63f425f4a8362103c2be5089223d8823cad0baf5827eeecd20ee4adbe7dec063") DevnetGenesisHash = common.HexToHash("0x1c00a47a70d32300cf336207d290ccc2838d3ea03b2ba73c07bafdd6070ff23a") )
Genesis hashes to enforce below configs on.
View Source
var ( MainnetChainConfig = ¶ms.ChainConfig{ ChainID: big.NewInt(211), HomesteadBlock: big.NewInt(0), DAOForkBlock: big.NewInt(0), DAOForkSupport: true, EIP150Block: big.NewInt(0), EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), MuirGlacierBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), Ethash: new(params.EthashConfig), } TestnetConfig = ¶ms.ChainConfig{ ChainID: big.NewInt(212), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: true, EIP150Block: big.NewInt(0), EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), MuirGlacierBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), Ethash: new(params.EthashConfig), } DevnetConfig = ¶ms.ChainConfig{ ChainID: big.NewInt(213), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: true, EIP150Block: big.NewInt(0), EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), MuirGlacierBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), Ethash: new(params.EthashConfig), } MainnetNetWorkID uint64 = 211 TestnetWorkID uint64 = 212 DevnetWorkID uint64 = 213 SingleWorkID uint64 = 214 //under params in cmd/node/defaults.go //DefaultHTTPPort = 7445 //DefaultWSPort = 7446 //ListenAddr = 20201 SingleChainID = big.NewInt(214) SingleNetConfig = ¶ms.ChainConfig{ ChainID: SingleChainID, HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: false, EIP150Block: big.NewInt(0), EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), MuirGlacierBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), YoloV3Block: nil, EWASMBlock: nil, CatalystBlock: nil, Ethash: new(params.EthashConfig), Clique: nil, } )
View Source
var MainnetBootnodes = []string{
"enode://38e41f93168c16f672841015930583d07ea8075c42ad5ca2ba7adddd9f793f131792a308960ee5515039ab3aaa8858551bc80e414ddf98f54916e4dc9839d19b@159.138.90.210:20101",
}
MainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the main network.
View Source
var RelayerGas = map[string]uint64{
"getBalance": 450000,
"register": 2400000,
"append": 2400000,
"withdraw": 2520000,
"getPeriodHeight": 450000,
"getRelayers": 450000,
}
View Source
var TestnetBootnodes = []string{
"enode://8ff2e770fdfab6234cd2cd31147c69faaf69daf0c0473e2033ee532a77db1c3838616183f9c53f212ffaeae151f96d847c184f29371829b281087979fd7f7db4@119.8.165.158:20101",
}
TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the test network.
View Source
var Version = func() string { return fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch) }()
Version holds the textual version string.
View Source
var VersionWithMeta = func() string { v := Version if VersionMeta != "" { v += "-" + VersionMeta } return v }()
VersionWithMeta holds the textual version string including the metadata.
Functions ¶
func ArchiveVersion ¶
ArchiveVersion holds the textual version string used for Atlas archives. e.g. "1.8.11-dea1ce05" for stable releases, or
"1.8.13-unstable-21c059b6" for unstable releases
func KnownDNSNetwork ¶
KnownDNSNetwork returns the address of a public DNS-based node list for the given genesis hash and protocol. See https://github.com/ethereum/discv4-dns-lists for more information.
func VersionWithCommit ¶
Types ¶
type CallMsg ¶
type CallMsg struct { From common.Address // the sender of the 'transaction' To *common.Address // the destination contract (nil for contract creation) Gas uint64 // if 0, the call executes with near-infinite gas GasPrice *big.Int // wei <-> gas exchange ratio Value *big.Int // amount of wei sent along with the call Data []byte // input data, usually an ABI-encoded contract method invocation AccessList types.AccessList // EIP-2930 access list. }
type RelayerMember ¶
type RelayerMember struct { Coinbase common.Address `json:"coinbase` RelayerBase common.Address `json:"relayerbase` Publickey []byte Flag uint32 MType uint32 }
func (*RelayerMember) Compared ¶
func (c *RelayerMember) Compared(d *RelayerMember) bool
func (*RelayerMember) String ¶
func (c *RelayerMember) String() string
func (*RelayerMember) UnmarshalJSON ¶
func (c *RelayerMember) UnmarshalJSON(input []byte) error
Click to show internal directories.
Click to hide internal directories.