Merge branch 'master' of github.com:harmony-one/harmony into rj_fork

pull/1024/head
Rongjian Lan 5 years ago
commit 6bca4dfb42
  1. 4
      cmd/harmony/main.go
  2. 176
      internal/genesis/foundational.go
  3. 84
      scripts/node.sh
  4. 8
      test/crypto/bls/main.go

@ -242,7 +242,7 @@ func createGlobalConfig() *nodeconfig.ConfigType {
if *isGenesis {
err := consensusPriKey.DeserializeHexStr(genesisAccount.BlsPriKey)
if err != nil {
panic(fmt.Errorf("generate key error"))
panic(fmt.Errorf("Failed to parse BLS private key: %s, %s", genesisAccount.BlsPriKey, err))
}
} else {
// NewNode won't work
@ -263,7 +263,7 @@ func createGlobalConfig() *nodeconfig.ConfigType {
// Consensus keys are the BLS12-381 keys used to sign consensus messages
nodeConfig.ConsensusPriKey, nodeConfig.ConsensusPubKey = consensusPriKey, consensusPriKey.GetPublicKey()
if nodeConfig.ConsensusPriKey == nil || nodeConfig.ConsensusPubKey == nil {
panic(fmt.Errorf("generate key error"))
panic(fmt.Errorf("Failed to initialize BLS keys: %s", consensusPriKey.SerializeToHexStr()))
}
// Key Setup ================= [End]

@ -3,108 +3,108 @@ package genesis
// GenesisFNAccounts are the ECSDA accounts for the foundational nodes.
var GenesisFNAccounts = [...]DeployAccount{
// 0 - 9
{Address: "one1djwg5f0l3ccnscupqz6htcqsjnl85jt8xvpwhc", BlsPriKey: "ff889b96e38934c08ea158ce32fb94ec605180a4f665ed378aea9b9ac1c39320"},
{Address: "0x053515CC2CAae77F7e2F0A9C48A27c8f6D76E99d", BlsPriKey: "aedc22d8d56a316ae67b05605deaa4981cdd0cd1aacbe5b7a0bf1b7caa23146d"},
{Address: "0x04c3636dF766ad2d3E74424c016842f5704FAE3A", BlsPriKey: "556fcff9cc94c9f1d6bb22438e97b5c1c3f1f5ffc6d6268803dded1127e4ba3c"},
{Address: "0x08aB87F3A8EB0b69a833575B6400670f3F330302", BlsPriKey: "99b6aa347e721aadfad46862ed69aeb1c98520b172e8f9cc27b4320fbbfda047"},
{Address: "0xfb577b50441e7ba769e30af0920be95b4e984ca9", BlsPriKey: "50d376eb002d63978ce57bd1cf05fb9d14c9848b050349d72d6a91387a40c270"},
{Address: "0x144B2Fd168147311f749B0f9573664676C333e2A", BlsPriKey: "93ae6e013464d4c735212bd53449d96686e64c8555e5196ac9ca86cc00899052"},
{Address: "0x22117D26611161b1b1f4EBB06C441aeeA102261c", BlsPriKey: "266a3235097fe6e4bd62c50c6e0c7254489815c1d66a3669d5385f80968a3217"},
{Address: "0x133a0075287cd9B32E0c1581Dfe23F147c703a92", BlsPriKey: "94d892425e444df361a55b6b1d1da422f345d69fc3a28d70d5e8923de182234b"},
{Address: "0x25347d09373B2644191f1DC4beDEFEBE26a5b2d1", BlsPriKey: "dbd4292efae96e3754fb4033ea071967505874527aeea7a49f046ad5b8fdfc33"},
{Address: "0x25441821ecA41DEc79578aAB866d3627A2e9BB9f", BlsPriKey: "a2f17bab1b77c816280ffdab1f5eed93a07f2f12533b60c16ac46019fc10496a"},
{Address: "one1djwg5f0l3ccnscupqz6htcqsjnl85jt8xvpwhc", BlsPriKey: "8aa6f004ebcad760786f40db57c03b78a7d900592a1924bf432d086cac8ca70d"},
{Address: "0x053515CC2CAae77F7e2F0A9C48A27c8f6D76E99d", BlsPriKey: "ab7bacb618d8153eac3fbe97e5b06c9ac3980af12659ce37392771de85c1b36a"},
{Address: "0x04c3636dF766ad2d3E74424c016842f5704FAE3A", BlsPriKey: "1206de176f084343714a3dd77777b30ecffeccf4bd80cdb97b30b1f6cf5a5d39"},
{Address: "0x08aB87F3A8EB0b69a833575B6400670f3F330302", BlsPriKey: "4d5a65fe77301924ac56f591ef59bef1578f9fbdde98e5f3d54e43a5a1f7f76b"},
{Address: "0xfb577b50441e7ba769e30af0920be95b4e984ca9", BlsPriKey: "9923a30374a16d12e59c8431500cab38b672dec68d0dc024ea873a41707a7c36"},
{Address: "0x144B2Fd168147311f749B0f9573664676C333e2A", BlsPriKey: "e0731ed35d334fddd7dc347520025b00df3490dc3e796065da4cf11d51dc1602"},
{Address: "0x22117D26611161b1b1f4EBB06C441aeeA102261c", BlsPriKey: "2b1c8cc86afdd7b78b02a44693949433731e7fc4e44b125cdb27db24e12b7024"},
{Address: "0x133a0075287cd9B32E0c1581Dfe23F147c703a92", BlsPriKey: "c129ecdd4a66e67cfd5b51199c8383adef8d23f718e85e1882e389d5e78f625f"},
{Address: "0x25347d09373B2644191f1DC4beDEFEBE26a5b2d1", BlsPriKey: "56a84cb496c6f616f30ea82682996da188da6a40e8ec897bd36d5c8a7ff32d47"},
{Address: "0x25441821ecA41DEc79578aAB866d3627A2e9BB9f", BlsPriKey: "373dcdfc1824dec533b2f76eafa7254ebda9348b6fd6ee6841bc22655fb3a93e"},
// 10 - 19
{Address: "0x27930D539fA8B118B5547a81Fd4cd0f0Fd295503", BlsPriKey: "ba87900f76922f4a1d2b92ec0e926b2d88569e1e7d5984c0911757a951169003"},
{Address: "0x28085D40501df849246040Ea815fbD71F08c2fc4", BlsPriKey: "73e6ba60b0ff0532edda429254e4b4bb2c5fb16efe3c20d57b8226e1b24a603f"},
{Address: "0x28dA1beF8F5361863DcD427B6264f9DdF05B5D14", BlsPriKey: "f3959feb13ed9e067255f563cdf634e771dc5798ace447bd3abff4c38dd69b2a"},
{Address: "0x50b3f01fa68DAA75A45fa0851f4Db698F3B06b9b", BlsPriKey: "e0ecefd475748154e05a2fcd176c6246f656fcc9dbc64d2d10d131203883683f"},
{Address: "0x2b3234Ee92270A486a1598c5Bd74e739EC26fd9b", BlsPriKey: "9a10ab54809b631f6bb883936e98a858562b78fcca65624063c1ffd6a4764344"},
{Address: "0x2bC858D0967384C0093e12824Bb3d6486d51c30D", BlsPriKey: "06b61ea63b79ea06f2348ca228f8e81e1254f27c258071f4864f13859880eb49"},
{Address: "0x324c741430F5B970b61E398434B4F3957a6BC6E0", BlsPriKey: "0287afb975f206d113ad390cd69bd10b40c90e741d0a2ea436de917f1920bd01"},
{Address: "0x3413e7e39eE7394b692FB04c12f5671d5Bb43e0b", BlsPriKey: "37e7ece9845538d6da54cbdd81c780f60ca94dc55662329e47617bfaa1c9ef3d"},
{Address: "0x3c102B2F844000064bc369b94E42E47f674ab176", BlsPriKey: "7b7cf3a71e9380a402739bf2f70f0d710b22d32a77ef1b82aafb4206dc036139"},
{Address: "0x3BF69655b3cE5212A3d56f0D78064Cb6F124a60B", BlsPriKey: "02588dbcabdb4c5acf70d63a29f5c4e479bd9d3d373528f132411a2a9884cc59"},
{Address: "0x27930D539fA8B118B5547a81Fd4cd0f0Fd295503", BlsPriKey: "e79a37317e6f27909ac65b19726165e59f676f06a94a487b5c46821e0f30273e"},
{Address: "0x28085D40501df849246040Ea815fbD71F08c2fc4", BlsPriKey: "335a2cc6851d8f64bb06c41e619e924e3f9f75fe715782a33e4017387e9e7a12"},
{Address: "0x28dA1beF8F5361863DcD427B6264f9DdF05B5D14", BlsPriKey: "22fe4ec2e86ad1f181233734f0e2364a029b5cfde28cf0013fe20c0ea567cf46"},
{Address: "0x50b3f01fa68DAA75A45fa0851f4Db698F3B06b9b", BlsPriKey: "38406f54995917aaee1387b228f4d14ecaa7e0b94b59ca41f6caf6364fb8a92d"},
{Address: "0x2b3234Ee92270A486a1598c5Bd74e739EC26fd9b", BlsPriKey: "1b4054a787c7be928b3d479b18698dc131e14d51b059eee29e573b9673ab6a0d"},
{Address: "0x2bC858D0967384C0093e12824Bb3d6486d51c30D", BlsPriKey: "db3d204469d35d5d5643b04891e949da47211815be38272a5508d5130cb33b19"},
{Address: "0x324c741430F5B970b61E398434B4F3957a6BC6E0", BlsPriKey: "026217bf9c1f3407be9908d9e2d5552974d0a71f6bf8bed798934c9e38e7040b"},
{Address: "0x3413e7e39eE7394b692FB04c12f5671d5Bb43e0b", BlsPriKey: "40a449d4e3257db51fc6f96aad817fcf183f73196c0863e65da5a93d22bc4404"},
{Address: "0x3c102B2F844000064bc369b94E42E47f674ab176", BlsPriKey: "c4cd2b4ac8dfec644c18d48b3336fac36cabe42681ca092dc8fa0a6cc56f7838"},
{Address: "0x3BF69655b3cE5212A3d56f0D78064Cb6F124a60B", BlsPriKey: "5d8d7b2d0927ca11f875b64f4e2ba03765bd1a32c1e4ba15dcddcb835d3bd142"},
// 20 - 29
{Address: "0x3D88FF444D18F7bcC530F5f5171048e725AEc79C", BlsPriKey: "93649cc817c7d430b7a8e5897bf406619ee2fc78e0fa78509378f2c35750e40b"},
{Address: "0x40d6f48c7b27BA7544b04456445Cf19B680F5484", BlsPriKey: "b49ae8ad8f6633590c947696e2450e1990a7c3a505ffa664d955a1645d37420a"},
{Address: "0x43bcBa1c3c3Bf76790d04cad7357229ECD71BDAD", BlsPriKey: "87bb88febe2ffaa04ce2285a7459bd57b5a265bbdd0837e6e572f97ddbbb4536"},
{Address: "0x52D77E90caE790ad2bA9DE138Ea8B65cCC5EF652", BlsPriKey: "fed900228f6a9537de84a28d593345937eb7ea5b4fe9d73197a6bb91f1ccf209"},
{Address: "0x583B5d4a45E2ce2E29F2Dc6c0645344Bad901755", BlsPriKey: "63e7fbd3fdc7f6a178a47c1e1df687b300a61333e2961d0743fc354546b8060e"},
{Address: "0x6EAe9438B240EdD83f454cc5EcDcbB10719E4e51", BlsPriKey: "51c18cd21102919157db972f2bb7e6a2409359e0d9340829f58da6d5937c633e"},
{Address: "0x59ebA70c8D8B3d4157432815c2A2DA774bA63aa8", BlsPriKey: "aeec4383a72ae86d60806fb211ba291bacabb9e421f6c7f91f0d446d89df5753"},
{Address: "0x5E49BB8be4e199e8ddDe3A09E67D3c23239AC16c", BlsPriKey: "4707bc077bf10f471ee13aebf1f6d76c20315b8aacaa124b8f62fbbcaa7e213f"},
{Address: "0x5dc4D61A44EBEb41549021342a290bd726623A38", BlsPriKey: "e1723649c8391386c27ee824b8272e00b33b4ffca8ae817e3889fbfd9714933f"},
{Address: "0x543A3e5e6c2A751682FcEB6408b2e0Dc66e2395d", BlsPriKey: "eb0c8944a1c71d2b0fa2e71ae54269065e30ae1af3f6be5b0afa37221f814624"},
{Address: "0x3D88FF444D18F7bcC530F5f5171048e725AEc79C", BlsPriKey: "21eb5e459af4edcaba6115dd33bf6cc54e254e084ed996f5628103232daece35"},
{Address: "0x40d6f48c7b27BA7544b04456445Cf19B680F5484", BlsPriKey: "94b5e20b507cdf0dd83b45b39aa5ca43d0d9c50cae98c4d0d03630cc89c6186b"},
{Address: "0x43bcBa1c3c3Bf76790d04cad7357229ECD71BDAD", BlsPriKey: "0875674d61ae1998354c2b5c83e2658d520fea36ec72c4d9270bab4521e1786a"},
{Address: "0x52D77E90caE790ad2bA9DE138Ea8B65cCC5EF652", BlsPriKey: "dfca5c00c1e74eaf2bb0cac9fad1ea8b6b98f9076268781c2e15bbe4fece3c55"},
{Address: "0x583B5d4a45E2ce2E29F2Dc6c0645344Bad901755", BlsPriKey: "fe1ea84a83b79f878d06ee8d85c05acd4219d6c12c3dd7f7f52893d2bfe24440"},
{Address: "0x6EAe9438B240EdD83f454cc5EcDcbB10719E4e51", BlsPriKey: "e89647432ff31ed7e14e153c233c896f0e10d726038f9802651a01631de26652"},
{Address: "0x59ebA70c8D8B3d4157432815c2A2DA774bA63aa8", BlsPriKey: "8994215377f865b6669b7542d80c2bf3df8aee632c6392e3fcc1ba60ac97dd38"},
{Address: "0x5E49BB8be4e199e8ddDe3A09E67D3c23239AC16c", BlsPriKey: "0164833a1e8f2447c415d971494bd9ece1b07e87b2b436edaae2b9ee29901c6b"},
{Address: "0x5dc4D61A44EBEb41549021342a290bd726623A38", BlsPriKey: "a428e56b14b2f8c7d3638a394d84915a21f529dcc77caead3e11867db3c79329"},
{Address: "0x543A3e5e6c2A751682FcEB6408b2e0Dc66e2395d", BlsPriKey: "2402ff7eb99d84e84a8f1fcfbc6e158e02314afa6780e4d9a9f135bdda6ec956"},
// 30 - 39
{Address: "0x638Ff0c3c291eA08c2653Bb993E3360D63038678", BlsPriKey: "df05f4cf396113df0dba76db551376c0393c28d2a9ef4546eed6d4ab2a806f16"},
{Address: "0xD61e36c14D6679D6c93baB5Dc754EdA20Ebc64DA", BlsPriKey: "7ae51f7e896107d4ad7ba4d3cb675b92a45a78164190f84d636ddc2f389db872"},
{Address: "0x689a35324d6B8DDDfa3bF5E7b26A23E704dD0100", BlsPriKey: "331ff92b2b15572baea16f48eace71aac2458fb20a9ba08c6726fc8e5a4eda1d"},
{Address: "0x6A6A5FBfA9923EBB76f9E42013e7C4f3CfDC145C", BlsPriKey: "e02a9898a456d4107f3808d892b6183d8a518e1f34cfbbd49800a421f9461617"},
{Address: "0x7DC5fc1d4dbe23498bd480F8B1dC16B798C61253", BlsPriKey: "52bd07e13d1559c7784fb82c10089320ae60d32926621f1dfd101f8dae359e1a"},
{Address: "0x6c11b83856804D1eae8823beB697d09569fE87A0", BlsPriKey: "398a6bd069f18715865464eaeb97b0be3c5f0c4223ba5adaeea7a5a1fab5006f"},
{Address: "0x72B6aefe8aC9B8873Ab854e6f4fD4801A3F4B2f0", BlsPriKey: "9b9f85208903cf0913e2e75122970de7040e705ce7894820ecf5e5d12cd74956"},
{Address: "0x76f8d12F6624f713B2D8894A749ad926F7812350", BlsPriKey: "418f1c60d037440a24d746dcf66038e3307ba1fb729b4f6fbe5fee073fd6000a"},
{Address: "0x78A8D29D81dD02c13a2a6077d887CF661B67E2c0", BlsPriKey: "ae7d770f8ac1201bfa1023bdba4fe76ac4970a8a24a1f2c51a67ecf04d59b948"},
{Address: "0x79f8E1B732bA63987873d5eB86C81364C2cF5021", BlsPriKey: "0a0f7e214dd04b4963970aeefe6e59ab9678acfd101cb2486a0addd81a891137"},
{Address: "0x638Ff0c3c291eA08c2653Bb993E3360D63038678", BlsPriKey: "89da0b21b3efa371b70fb4507c14d995830fd6c46a341cf613ef56df0990ac42"},
{Address: "0xD61e36c14D6679D6c93baB5Dc754EdA20Ebc64DA", BlsPriKey: "e349accc8cca63eee46e242241707ce34f59d97d453861cc946fd50f1a9fe842"},
{Address: "0x689a35324d6B8DDDfa3bF5E7b26A23E704dD0100", BlsPriKey: "1ca6cc7ccdee0975f420075e6215f98816a45644cae26007f62e39a4bff0e760"},
{Address: "0x6A6A5FBfA9923EBB76f9E42013e7C4f3CfDC145C", BlsPriKey: "536af6cc234a36482073734262ddf8661a88ab4683d1536bf9018b1b99a1ca71"},
{Address: "0x7DC5fc1d4dbe23498bd480F8B1dC16B798C61253", BlsPriKey: "aceda23c7d4c6b1b2b3ee68956e372fc71076b1676b9fc3b59f378a2831d7107"},
{Address: "0x6c11b83856804D1eae8823beB697d09569fE87A0", BlsPriKey: "60b72c9e631238352bb9441af0f0e5fad4b206a9ae50c407c07aebad48bd182e"},
{Address: "0x72B6aefe8aC9B8873Ab854e6f4fD4801A3F4B2f0", BlsPriKey: "1d75c858647419a303c193c5548757769c683c3e308b0da06e00a9137bb94d2d"},
{Address: "0x76f8d12F6624f713B2D8894A749ad926F7812350", BlsPriKey: "a1babfcf9487ea8ec9e54aabd804c197b75af986b48e8049329141e71bf7e43d"},
{Address: "0x78A8D29D81dD02c13a2a6077d887CF661B67E2c0", BlsPriKey: "d5d39dba1ac122d4493834612b0a667a9643c9b4e668928a067f64d809263c2e"},
{Address: "0x79f8E1B732bA63987873d5eB86C81364C2cF5021", BlsPriKey: "a557632723207ebd0046f42edab745f1e8c47ad7e5fbd3633b6d8ecef8e9f751"},
// 40 - 49
{Address: "0x7A4306d4D0A4f15A5fA54486cE4e6403E313805A", BlsPriKey: "f0c85ec2f9bce31731b0a0d936b1974890411e9b3ffe892652aa66a738d47251"},
{Address: "0x7ACDCB2BAcA2911BdcE98e308515A289ac60b7d2", BlsPriKey: "69b6a1ac0b665d11b6c5acefbd92c3aee3b79225295dd7d07d3a40c812cf6973"},
{Address: "0x7f42f7a4d66f0387AE77A219d0742E8a706231CA", BlsPriKey: "f336a59595fbd8f0a81e8ece411f60983adcfb7dc7581cc7ed067fa525db7c3d"},
{Address: "one1zjjul68lhv8hef7angwvakmc37evv8gppraft0", BlsPriKey: "831e13190c4e1b46e87fb825ee3a364fa7502f044a52e2f61c86a29d8bdc7c02"},
{Address: "0x82301962Afa7328FDC34e3610B48D899F031e15F", BlsPriKey: "cb26ea4242d59183f0fb6dbf546e4c8c96f3a65b49a246b077fd3818ca81ad05"},
{Address: "one10746sav20n8h4gm3sevj3vfydtpv6vpksv2065", BlsPriKey: "32af10834aa6c8216b99eff59314df1699055018c54002938b62420448721d3c"},
{Address: "0x87a157db95dc3517Eb578d4cedee92a5ab275BD5", BlsPriKey: "09dac13c3e140f036b6ba82915b9ce207b99d74ec4a862627be3fd3804180538"},
{Address: "0x880D5c6aD4117D26126543Af48f2f9bCDd4DaA0A", BlsPriKey: "0c93bcb39c821c8c83415f9147c4b7ff006c8f89d527c355b52aca900054e04f"},
{Address: "one1rfaajrvn5zdfxydf5wkvrwsyylza6205xap9x0", BlsPriKey: "ecb310216ffa14d546c8c820dcb3def75a491e5e3289bf063f084564802a0a07"},
{Address: "0x8dc63cCA875eAd38d9554bB97171a4f18AbE92E7", BlsPriKey: "bf9d280162fb51198d13eb4a2d77b99ea9ebf851cf4ef936cefdf643b0323961"},
{Address: "0x7A4306d4D0A4f15A5fA54486cE4e6403E313805A", BlsPriKey: "85ec67510eda7cbfe6d48b2471d3f4a8466ee419e7f098d1447a2064d9feaa3e"},
{Address: "0x7ACDCB2BAcA2911BdcE98e308515A289ac60b7d2", BlsPriKey: "a417d5eb94a995ab5458e509bb9015668c7c46fcf903ab896ad44dcbfd523031"},
{Address: "0x7f42f7a4d66f0387AE77A219d0742E8a706231CA", BlsPriKey: "bd197680b9a4d8e38cd5b393be386736dad334fde8761c6ced18f8901bc14051"},
{Address: "one1zjjul68lhv8hef7angwvakmc37evv8gppraft0", BlsPriKey: "f7cc5bf3fde6f20cc9462a5da9332bc2a7d276cc330baf371a37a72477f8fd37"},
{Address: "0x82301962Afa7328FDC34e3610B48D899F031e15F", BlsPriKey: "d811e24a6a46dece952d04cfc6ea6a3ef736cca8ca8c5125c07cf5ae626ff364"},
{Address: "one10746sav20n8h4gm3sevj3vfydtpv6vpksv2065", BlsPriKey: "d71db7ef78e1d2e5b89ab5834f8cad74393c96554cb388006b5c0063fbc2184c"},
{Address: "0x87a157db95dc3517Eb578d4cedee92a5ab275BD5", BlsPriKey: "917929a073714aa2a9bf5776b14bee7d116967241d1c01711ea3c2f62d830f41"},
{Address: "0x880D5c6aD4117D26126543Af48f2f9bCDd4DaA0A", BlsPriKey: "aa6599d626b55a3e0f818ee83d728003030f8214181092717f03681b0afcf355"},
{Address: "one18683c2vyr4xdv4wd3ley8wd250pnmxn346s4qq", BlsPriKey: "ccf9344200b12a4ed9c6c4b37ce854c0cbad4cbfffeed18dfe7c46efaf2a300f"},
{Address: "0x8dc63cCA875eAd38d9554bB97171a4f18AbE92E7", BlsPriKey: "a49c1af4dcc1b9845c46f97304eda460e1f76f7a602c471f8471cda544de474e"},
// 50 - 59
{Address: "0x93570Dcb1Bf1a0bD1d476a542309754a6dbCE632", BlsPriKey: "6c02a5c98f5701bb1509b17baedf20671acfff38006d02d740412d157e82824f"},
{Address: "one1srnk0ekhuljsvsqykg6f9s067xfg6gaytle3rn", BlsPriKey: "82a090f4a3fd113ea14ec46c46fc40e7d70afc46d8fef84100859520f171a115"},
{Address: "0x97b834277538e4517f43f9E11fa0BbebaD7c0d3e", BlsPriKey: "3c87e18e45b4f659cc5801e5bf4d82574614cbd742200ba989a04bb3fe90170f"},
{Address: "0xB88AB7A6678c87aeBE7b753459258012eb2Cc76c", BlsPriKey: "15f9a467aaf80abe0471c317b490902d174c9b498c456d67bdcfba22f593be60"},
{Address: "0xA28e6f8D23cc3Fe77D531c7D60bd73F8fD71C5c7", BlsPriKey: "f0fb598b4becc13127c060302b5938915777b2b9c96028ae4bace6fed312923b"},
{Address: "0xA41F4dDd1b11A6107f1973037D070869495e71E4", BlsPriKey: "973641a9a2f31572f38f789d772e698833da413d4234ca10fd82976b2ff68d6f"},
{Address: "0x5a22c7ec1579C0d87760F4C8ec32fBE24d40E1Dc", BlsPriKey: "78c2d7215e63bfe22fb3f8052bf2607dc2b01815dbc7ae30fcc540a75aeaf01b"},
{Address: "0xD499fAC5afa17b5705B91838753Bfbf2e20138e4", BlsPriKey: "788b18e4b3480e4e22a7612a5bba18a07c1ce2ca63d98473c50c8ef0bcfe2b22"},
{Address: "0xfF86Ff1FF457c3eBc18D71ffA30cfedd0860559c", BlsPriKey: "0fb470757299aa687196bb09d7bdb3d65b991cff679aeeac282d02b01ec9b22b"},
{Address: "0xB4018FF5B888e902bD952D6e55A5cDbd8C73Ac1A", BlsPriKey: "356fe79d613c2cb90d8f4617d803153e3f4c30727afec45ddaadd790a87a5d14"},
{Address: "0x93570Dcb1Bf1a0bD1d476a542309754a6dbCE632", BlsPriKey: "630f6bcd3d7efa1e634565c6702d9cbceb7de22ea6bd1aab8189fec8347ad22b"},
{Address: "one1srnk0ekhuljsvsqykg6f9s067xfg6gaytle3rn", BlsPriKey: "ef2a01ab5838a13933d9ec45537c0eb548dcf238ce678eb27419ba72cbcce025"},
{Address: "0x97b834277538e4517f43f9E11fa0BbebaD7c0d3e", BlsPriKey: "1a6a7f82aefcd737cf44016d8ba20bde1bd96f1392f6bd798f2cd1d097be911c"},
{Address: "0xB88AB7A6678c87aeBE7b753459258012eb2Cc76c", BlsPriKey: "1ba26ee04ecd1f56487daff9b719de07cef181f534c892df2c6a7e0cbca60822"},
{Address: "0xA28e6f8D23cc3Fe77D531c7D60bd73F8fD71C5c7", BlsPriKey: "363bb667ea68487660260888eb574be7ba602eab22d2eb18c764077ae7cca529"},
{Address: "0xA41F4dDd1b11A6107f1973037D070869495e71E4", BlsPriKey: "b6b563928e8fbb96a92f06797ab5cdcd12b859cdc0f57091cd4f1110aa36cd0b"},
{Address: "0x5a22c7ec1579C0d87760F4C8ec32fBE24d40E1Dc", BlsPriKey: "08420fd6c409523527f47fed73877b7eac2be8009709da983a8a16636b6e3438"},
{Address: "0xD499fAC5afa17b5705B91838753Bfbf2e20138e4", BlsPriKey: "20617e9a2fc71c05dffe53f75fbc9b98bb9c0e121926218be73946fc63e23763"},
{Address: "0xfF86Ff1FF457c3eBc18D71ffA30cfedd0860559c", BlsPriKey: "6200ef5ff6f5b8c456bf0b32ed710457c6b5b55c8902b4860134aaaffcff5962"},
{Address: "0xB4018FF5B888e902bD952D6e55A5cDbd8C73Ac1A", BlsPriKey: "7d224cdacbcf76cacbf4eaaeb660cb2c677acff80fdab6afa802fc735d267d2a"},
// 60 - 69
{Address: "0xB68751A436f287CE3DA347277259af5c7bA84e38", BlsPriKey: "c143e92cef9db63f81d6b9d79cb8da5c9ecba5cfebf4b832b3f156d62d1ba22a"},
{Address: "0xEd677E021df3542998e407970E1127d334Be0285", BlsPriKey: "bc0936a0f0f7ff841381dd184cae4096698316aacef5e8dd8f3e65095c924a1e"},
{Address: "0xB99Ad8B391eDD1F15c51f773F4bc23Bba7dF45F3", BlsPriKey: "72ad8fd13e5c6a0a06f1f94fe362518f06f3849b9fb68bad53b14809d8e6e03c"},
{Address: "0xC3FBdE6a171aCc0466614D09b58E013058e7c0d2", BlsPriKey: "c75d17225c65c42c2e569698d3ad3cb91a4d93472f639ef59bd2866d704d4a4c"},
{Address: "0xC6b6a71d6f0C5b98E25FCf14b5378c807B0d475a", BlsPriKey: "e7928dcef4f288bccae4fbc57300f80bf170a72ed707fcb9dc16e167c8c8e238"},
{Address: "0xeaD1fAa7E5Fdb6136057d4BfCa1f05D220D1441f", BlsPriKey: "4630be86ee6858c573202468c722d63e864383893315ac9f28d2f731b256fe5c"},
{Address: "0xD0F9AD2b60792fAff02f8Bd0F2D9cE2790722706", BlsPriKey: "e4159dec12820b44d0e1118c2bc3a2260eba2755855a54f05af74604a92cd232"},
{Address: "0xD28B4bC96020De252A0ee817767B6Cdb26A47d73", BlsPriKey: "afc343c1cad50194dbb4dbc5c010daf3fb50b0c3ef3b3279c08be7b3243ce924"},
{Address: "0xD31095BE15D4b0b16657EEB72e0cc81e24EAc101", BlsPriKey: "c15dfd4eaffa5f7174747b6887a05b5ecdca62847ea54cca8d5f19188c414f08"},
{Address: "0x35D29200aFC9A4cDC05166096059a042078CB53e", BlsPriKey: "d54f56fd7bbef9b3e73de868a9414884c2617da2bc5f314ea0c36fc821848312"},
{Address: "0xB68751A436f287CE3DA347277259af5c7bA84e38", BlsPriKey: "ec9f87381837363000db4ec207745beaa6e50b30ae9269146888a5c2f2520d08"},
{Address: "0xEd677E021df3542998e407970E1127d334Be0285", BlsPriKey: "ed2f6756ed0d065e8fbe61ace2536ee98b28ea7c2aed1b7bad9ce33fab675b2a"},
{Address: "0xB99Ad8B391eDD1F15c51f773F4bc23Bba7dF45F3", BlsPriKey: "187a5e4bbd28c60ba251885ac351b66bdba9d258ec9dc10183fd319d9f9a210b"},
{Address: "0xC3FBdE6a171aCc0466614D09b58E013058e7c0d2", BlsPriKey: "4c703161308485e6c88410ca6250faae4be99e4d1dc58142807a1fe8e1cd286d"},
{Address: "0xC6b6a71d6f0C5b98E25FCf14b5378c807B0d475a", BlsPriKey: "e0d5153033ef7636eef27ec2506afc370213a7da628b2d84e44d5e2c4ceb5d3f"},
{Address: "0xeaD1fAa7E5Fdb6136057d4BfCa1f05D220D1441f", BlsPriKey: "a2dd773288472148761292b08d3460f8ac1ee5bf38b5953d6eba957be73e776e"},
{Address: "0xD0F9AD2b60792fAff02f8Bd0F2D9cE2790722706", BlsPriKey: "2f9b236c721e0eba0e8177ef935129bfa21c65e626c2587f46c4d93a33940c3a"},
{Address: "0xD28B4bC96020De252A0ee817767B6Cdb26A47d73", BlsPriKey: "51e302006744d8cf4e182593cdd77e01999c60ff87bc30ff6235b8f456ad9834"},
{Address: "0xD31095BE15D4b0b16657EEB72e0cc81e24EAc101", BlsPriKey: "6139c6b5f11b12d0438cbfa0f4ef2fa65b9819190941913b70d7b5bcc829ec2c"},
{Address: "0x35D29200aFC9A4cDC05166096059a042078CB53e", BlsPriKey: "7c35fcdf02e86a32018c51661d1e72d01fd4158a3f8c48205f93ed6bab03e83e"},
// 70 - 79
{Address: "0xe4a69826534aD3f6ec6E432474B0380E7F9a9C3d", BlsPriKey: "2b1830345d134ea5d1b9cdf9d93af3abca5d90a86dbfc4beed98a749a9254332"},
{Address: "0xE2ab78ecf325084485957B2599d53Bcf944Cbca8", BlsPriKey: "080fde81e06a194228eadcb573edeb0e3c445295435d32401c404934ea58cb09"},
{Address: "0xEC7C495866689d6b7E335D810645F440f16F86d0", BlsPriKey: "1ec4cac69876c5339c16c5c48c31ac32164574007dc4d674f8f6fee6735b6f4d"},
{Address: "0xcb0A6c1914d2AD10855cC8cD70B040b7Dc6573a8", BlsPriKey: "ad0cc9631a98e5f527cee84f7daa2d24faa8d3714fd28c5d73c4e21c6ba3c13f"},
{Address: "0xf10f63f5Bd46c58d2e9530E7F8cb6b4336D05d4E", BlsPriKey: "672ccacc49f216aec996eceb74f63ff8beb1e53361146963452859b0dcafb728"},
{Address: "0xff1bE0eAC9B6053CD656947F0CcE7d277FF720Ec", BlsPriKey: "b393c776a159098e0acdf67ba63f1d1a26760b9bcfe9f656da5aa85cd02fc43a"},
{Address: "0xa3B34f4E21C6c44A603E3c53abbF8b10C7BdaF59", BlsPriKey: "fbc7a2efb93e3fdd87136aa9a87e59040e2af25ae176e1519af92aff35d6570f"},
{Address: "0xfdc963E875Ea99E434e4B815b7d8Bf506dAA9222", BlsPriKey: "51a79e8fdce95c39fc33a8ec890783746f56e3700a8b2cc3f98e94248d07103a"},
{Address: "0xa61CA9f1EB26787EEd89dAEE4A326C4e1cb5eCdB", BlsPriKey: "a514163c7b2778321ec8499799408ea438bb03d9a315919b8d280ee88ba4bf16"},
{Address: "0xa714cd269A0ca23131C8cD5aeFC49F450578C4B4", BlsPriKey: "469d183b6f7caf5960a013d3a3b08c46c245fedf4ab2d835192a09b4c6d37231"},
{Address: "0xe4a69826534aD3f6ec6E432474B0380E7F9a9C3d", BlsPriKey: "70931311c44fe590478333abc4cf9118c394d6a7556e355e29778e68e9a18465"},
{Address: "0xE2ab78ecf325084485957B2599d53Bcf944Cbca8", BlsPriKey: "869278ffd4dc0505ef2b4c15bc359545369c81e19295d03fe4b872240b7a145a"},
{Address: "0xEC7C495866689d6b7E335D810645F440f16F86d0", BlsPriKey: "f124164641b0d2497e2e37101b8aa298c2def5d9020050c6b3b12cf0caec4706"},
{Address: "0xcb0A6c1914d2AD10855cC8cD70B040b7Dc6573a8", BlsPriKey: "dd03e6f10bcd8c6673474d20080c4f80ec8b39faf147566eff86e4f0bea9e705"},
{Address: "0xf10f63f5Bd46c58d2e9530E7F8cb6b4336D05d4E", BlsPriKey: "d2ae1195433f32723f4b0989629b3fa26a4263296fad6b874660a10fac32f462"},
{Address: "0xff1bE0eAC9B6053CD656947F0CcE7d277FF720Ec", BlsPriKey: "60e2078a527b2c6de83e4145128b59d2a7d639a73e1b43ee6f2f92306e33f72e"},
{Address: "0xa3B34f4E21C6c44A603E3c53abbF8b10C7BdaF59", BlsPriKey: "78cbefbaac0f578c0f3ad12e3a6d015dd29b58e890bdc7237353bf65dd6d4645"},
{Address: "0xfdc963E875Ea99E434e4B815b7d8Bf506dAA9222", BlsPriKey: "c6f7bba48d3d846204970166be886c52d6ad13ab387121635bc9a0bfe485f502"},
{Address: "0xa61CA9f1EB26787EEd89dAEE4A326C4e1cb5eCdB", BlsPriKey: "79f012d0ee2a0d2c99d137ff28a5976f88de6a57bb846345ed776e83f3a94916"},
{Address: "0xa714cd269A0ca23131C8cD5aeFC49F450578C4B4", BlsPriKey: "082f550873e394bafea3b80b1982ef21479a3d0ec8ff71a2b9b9b1bfe0cf9b3f"},
// 80 - 89
{Address: "0xb108BF4945Bd7975cF974f47476e689ACd542F23", BlsPriKey: "25f293cfd3139282db8438047f28b886d12ab2602ba87323b7fd2a975d66671a"},
{Address: "0xdA1DF648bC047546326D05dF370ec0ee3D84642A", BlsPriKey: "00723137f8118612feca54cdc558dddad18aefb05f6dbb05a50eba172a77f33f"},
{Address: "0xc55c56F661eD185103839FdFeFd80DC38938913b", BlsPriKey: "432dd6844c07c4745b34d65c6c2aebc5b8b69597a9ad7e668f248d2f22ab5070"},
{Address: "0x74e0014c9899c82f05F6AC110583F9f7dCC36508", BlsPriKey: "00a3cb66218c2cd3efa31bcbe783ff920fb356ad31f14683ca8ceb131d774d0b"},
{Address: "0x0C787285e1accdD9520dC19f053d14E17B134b18", BlsPriKey: "e39faff302fc6e8cbb664881118ebe6670b6d7be109d32dc6b5d8d9e9b185542"},
{Address: "0xfC9802AECC486878885F3D36895e209325c4cF8e", BlsPriKey: "e34a2accd094b584b488e2381601e48146139897319bd419cda9d6abbb881107"},
{Address: "0x56151Cda1F9574543d0f5F0b2c33384dbfDf0fb7", BlsPriKey: "1d40d553a71d0ca1fe58ae46855b45a89564af07836ddfc0d6076b059d6bce20"},
{Address: "0x2fCb9070db07EB2b63B73a2a9D019dF45530f65D", BlsPriKey: "ff39a1f31adafd76a12c7d000a4beb3e8885988352f53f4f8f20f6fab04ecc58"},
{Address: "0xb108BF4945Bd7975cF974f47476e689ACd542F23", BlsPriKey: "6debedc1f96458b0e7985184b8d3f7537d0a12c16c38ca2c87f9aa1c00036b22"},
{Address: "0xdA1DF648bC047546326D05dF370ec0ee3D84642A", BlsPriKey: "a452ecc8a6fc6b1064a0b548cd015c2041c565f10608cba458e8656cd9dc5f41"},
{Address: "0xc55c56F661eD185103839FdFeFd80DC38938913b", BlsPriKey: "ffb217a1d17290a00ba7f15a1baa9f3350cf75062e2cebf2bef524db4aacc115"},
{Address: "0x74e0014c9899c82f05F6AC110583F9f7dCC36508", BlsPriKey: "8f2208dfa1bd8ab0565458854eefc8081532b75858141bd5e59ed1a74879e141"},
{Address: "0x0C787285e1accdD9520dC19f053d14E17B134b18", BlsPriKey: "885a052f3199c74155032e331e689107b1a6575058e28323b17052ae6995a53a"},
{Address: "0xfC9802AECC486878885F3D36895e209325c4cF8e", BlsPriKey: "6f4de7047da5349a6eb78dd27342ef70c7a20dcfc5a6abb6682cb858e700fd18"},
{Address: "0x56151Cda1F9574543d0f5F0b2c33384dbfDf0fb7", BlsPriKey: "d69892c1bf461a46d2132dd2f55de7cb39927080dea56e2c1a38b5cc6cdfc73c"},
{Address: "0x2fCb9070db07EB2b63B73a2a9D019dF45530f65D", BlsPriKey: "7355f51383eb59b8fdca818fc74a573de64ab0381c526b46a83599dc8026230a"},
}

@ -1,5 +1,26 @@
#!/bin/bash
unset -v progname
progname="${0##*/}"
unset -f msg err
msg() {
case $# in
[1-9]*)
echo "${progname}: $*" >&2
;;
esac
}
err() {
local code
code="${1}"
shift 1
msg "$@"
exit "${code}"
}
function killnode() {
local port=$1
@ -84,21 +105,50 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi
if [ -z "$1" ]; then
echo "Usage: $0 account_address"
echo
echo "Please provide account address."
echo "For foundational nodes, please follow the instructions in discord #foundational-nodes channel"
echo "to generate and register your account address with <genesis at harmony dot one>"
echo
exit 1
fi
usage() {
msg "$@"
cat <<- ENDEND
usage: ${progname} [-b] account_address
-c back up database/logs and start clean
ENDEND
exit 64 # EX_USAGE
}
IDX=$1
unset start_clean
start_clean=false
unset OPTIND OPTARG opt
OPTIND=1
while getopts :c opt
do
case "${opt}" in
'?') usage "unrecognized option -${OPTARG}";;
':') usage "missing argument for -${OPTARG}";;
c) start_clean=true;;
*) err 70 "unhandled option -${OPTARG}";; # EX_SOFTWARE
esac
done
shift $((${OPTIND} - 1))
case $# in
0)
usage "Please provide account address." \
"For foundational nodes, please follow the instructions in Discord #foundational-nodes channel" \
"to generate and register your account address with <genesis at harmony dot one>."
;;
esac
IDX="${1}"
shift 1
case $# in
[1-9]*)
usage "extra arguments at the end ($*)"
;;
esac
killnode
mkdir -p latest
BUCKET=pub.harmony.one
OS=$(uname -s)
REL=drum
@ -138,6 +188,18 @@ myip
# public boot node multiaddress
BN_MA=/ip4/100.26.90.187/tcp/9874/p2p/Qmdfjtk6hPoyrH1zVD9PEH4zfWLo38dP2mDvvKXfh3tnEv,/ip4/54.213.43.194/tcp/9874/p2p/QmZJJx6AdaoEkGLrYG4JeLCKeCKDjnFz2wfHNHxAqFSGA9
if ${start_clean}
then
msg "backing up old database/logs (-c)"
unset -v backup_dir now
now=$(date -u +%Y-%m-%dT%H:%M:%SZ)
mkdir -p backups
backup_dir=$(mktemp -d "backups/${now}.XXXXXX")
mv harmony_db_* latest "${backup_dir}/" || :
rm -rf latest
fi
mkdir -p latest
echo "############### Running Harmony Process ###############"
if [ "$OS" == "Linux" ]; then
# Run Harmony Node

@ -23,6 +23,14 @@ func main() {
for i := 0; i < len(genesis.NewNodeAccounts); i++ {
var sec bls.SecretKey
sec.SetByCSPRNG()
err := sec.DeserializeHexStr(sec.SerializeToHexStr())
if err != nil {
fmt.Println(err)
}
if i%10 == 0 {
fmt.Println()
fmt.Printf("// %d - %d\n", i, i+9)
}
fmt.Printf("{Address: \"%s\", BlsPriKey: \"%s\"},\n", genesis.NewNodeAccounts[i].Address, sec.SerializeToHexStr())
if i == 0 {
aggSig = sec.Sign(m)

Loading…
Cancel
Save