Documentation ¶
Index ¶
Constants ¶
View Source
const ( HomeFlag = "home" DbDir = "db" PrivKeysConfigFileName = "privKey.json" GenesisFileName = "genesis.json" LedgerConfigFileName = "config.json" NodeKeyFileName = "node_key.json" LedgerKeyStateFileName = "key_state.json" )
View Source
const ( DefaultBftOracleInNebulaCount = 5 PrivateRPCHostFlag = "rpc" NetworkFlag = "network" BootstrapUrlFlag = "bootstrap" Custom Network = "custom" DevNet Network = "devnet" DevNetId ChainId = "gravity-devnet" CustomId ChainId = "gravity-custom" DefaultBootstrapUrl = "http://104.248.255.124:26657" DefaultPrivateRpcHost = "127.0.0.1:2500" DefaultPersistentPeers = "" /* 247-byte string literal not displayed */ )
View Source
const ( ConfigFlag = "config" DefaultNebulaeDir = "nebulae" )
Variables ¶
View Source
var ( DevNetConfig = config.LedgerConfig{ Moniker: config.DefaultMoniker, RPC: cfg.DefaultRPCConfig(), IsFastSync: true, Mempool: cfg.DefaultMempoolConfig(), Details: (&config.ValidatorDetails{}).DefaultNew(), Adapters: map[string]config.AdaptorsConfig{ account.Ethereum.String(): { NodeUrl: "https://ropsten.infura.io/v3/598efca7168947c6a186e2f85b600be1", GravityContractAddress: "0x80C52beF8622cDF368Bf8AaD5ee4A78cB68E2a79", }, account.Waves.String(): { NodeUrl: "https://nodes-stagenet.wavesnodes.com", GravityContractAddress: "3MfrQBknYJSnifUxD86yMPTSHEhgcPe3NBq", ChainId: "S", }, }, } DevNetGenesis = config.Genesis{ ConsulsCount: 5, GenesisTime: time.Unix(1599142244, 0), ChainID: string(DevNetId), Block: types.BlockParams{ MaxBytes: 1048576, MaxGas: -1, TimeIotaMs: 1000, }, Evidence: types.EvidenceParams{ MaxAgeNumBlocks: 100000, MaxAgeDuration: 1728 * time.Second, }, InitScore: map[string]uint64{ "0xd7f746727e21ecf461bb8e8926a6aeb0931eb09311ed13d25a182d4f17339d1d": 100, "0x0e7f182e6d2a11bd5d8a34531243435e2aeaa0eed7cad3c5361a81328051fa02": 100, "0xe09b444f5c5f2fbdca58bdb37a2dcc90d370ff72f28a6d4b6a6ef732c44afa24": 100, "0xd70f6fcdac1a6f2292a330cc830db5e9041939ff79a87ff8536040b07378ca02": 100, }, OraclesAddressByValidator: map[string]map[string]string{ "0xd7f746727e21ecf461bb8e8926a6aeb0931eb09311ed13d25a182d4f17339d1d": { "ethereum": "0x038bf7253f2b3b78c7f8fbe856252373b0867098c6b3f7a6cabc6e73552be75697", "waves": "CNVJbuJubqLyTZ99Y8wwuFgiKqoCUvpYCnHQsezE3Qgk", }, "0x0e7f182e6d2a11bd5d8a34531243435e2aeaa0eed7cad3c5361a81328051fa02": { "ethereum": "0x03808de8b08ec39c720c04e7699783f1abefff809afc2a8f7e60e9dd59f039ffa8", "waves": "4QWcFszF3shvhReiU26Sj8Te2QqgsfsreEgiTQNeTgB5", }, "0xe09b444f5c5f2fbdca58bdb37a2dcc90d370ff72f28a6d4b6a6ef732c44afa24": { "ethereum": "0x0298644b29e125b1293446b3d5f5b6feb12eaf2e3245df08fe74682fe0ddce5c60", "waves": "CcdpQmNU9qc1uKyr2mmkYNiyadvQ3VHrcYCtLqDfrR9a", }, "0xd70f6fcdac1a6f2292a330cc830db5e9041939ff79a87ff8536040b07378ca02": { "ethereum": "0x026a6444ca6ad63e3fda46481d125f8fee07b9a5b5131a12393a654800956856b8", "waves": "E5gz7aTwjjbCbFMYmstvcvb6NvoZyZcQSt1wp68qMpBg", }, }, } CustomNetGenesis = config.Genesis{ GenesisTime: time.Now(), ChainID: string(CustomId), Block: types.BlockParams{ MaxBytes: 1048576, MaxGas: -1, TimeIotaMs: 1000, }, Evidence: types.EvidenceParams{ MaxAgeNumBlocks: 100000, MaxAgeDuration: 1728 * time.Second, }, } )
View Source
var ( LedgerCommand = &cli.Command{ Name: "ledger", Usage: "", Description: "Commands to control ledger", Subcommands: []*cli.Command{ { Name: "init", Usage: "Generate ledger config", Description: "", Action: initLedgerConfig, Flags: []cli.Flag{ &cli.StringFlag{ Name: NetworkFlag, Value: string(DevNet), }, }, }, { Name: "start", Usage: "Start ledger node", Description: "", Action: startLedger, Flags: []cli.Flag{ &cli.StringFlag{ Name: PrivateRPCHostFlag, Value: DefaultPrivateRpcHost, Usage: "RPC server host", }, &cli.StringFlag{ Name: BootstrapUrlFlag, Value: DefaultBootstrapUrl, }, }, }, }, Flags: []cli.Flag{ &cli.StringFlag{ Name: HomeFlag, Value: "./", Usage: "Home dir for gravity config and files", }, }, } )
View Source
var ( OracleCommand = &cli.Command{ Name: "oracle", Usage: "", Description: "Commands to control oracles", Subcommands: []*cli.Command{ { Name: "init", Usage: "Init oracle node config", Description: "", Action: initOracleConfig, ArgsUsage: "<nebulaId> <chainType> <gravityNodeUrl> <targetChainUrl> <extractorUrl>", }, { Name: "start", Usage: "Start oracle node", Description: "", Action: startOracle, ArgsUsage: "<nebulaId>", }, }, Flags: []cli.Flag{ &cli.StringFlag{ Name: HomeFlag, Value: "./", Usage: "Home dir for gravity config and files", }, }, } )
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.