From 6376d7f1dd0c094dabb0dead4a6fc023a748dcaf Mon Sep 17 00:00:00 2001 From: p0p3yee Date: Wed, 27 Dec 2023 10:32:31 -0500 Subject: [PATCH 1/6] Update denom & Add fairytest-3 --- .github/workflows/release.yml | 4 +- fairyring.yml | 6 +- go.mod | 2 +- go.sum | 29 ++ hermes_config.toml | 4 +- networks/testnets/fairytest-3/README.md | 245 +++++++++ networks/testnets/fairytest-3/genesis.json | 509 +++++++++++++++++++ networks/testnets/fairytest-3/peers-node.txt | 0 scripts/tests/keyshare.sh | 22 +- scripts/tests/keyshareSender.sh | 2 +- scripts/tests/pep.sh | 16 +- scripts/tests/start.sh | 20 +- scripts/tests/start_test_block_tx_limit.sh | 10 +- scripts/tests/submitNormalTx.sh | 2 +- x/pep/types/params.go | 2 +- 15 files changed, 828 insertions(+), 45 deletions(-) create mode 100644 networks/testnets/fairytest-3/README.md create mode 100644 networks/testnets/fairytest-3/genesis.json create mode 100644 networks/testnets/fairytest-3/peers-node.txt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5728ffa4..20ac2a08 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,10 +25,10 @@ jobs: - name: Prepare Release Variables id: vars - uses: ignite/cli/actions/release/vars@v0.25.2 + uses: ignite/cli/actions/release/vars@v0.27.2 - name: Issue Release Assets - uses: ignite/cli/actions/cli@v0.25.2 + uses: ignite/cli/actions/cli@v0.27.2 if: ${{ steps.vars.outputs.should_release == 'true' }} with: args: chain build --release --release.prefix ${{ steps.vars.outputs.tarball_prefix }} -t linux:amd64 -t darwin:amd64 -t darwin:arm64 diff --git a/fairyring.yml b/fairyring.yml index c052d031..33840541 100644 --- a/fairyring.yml +++ b/fairyring.yml @@ -8,16 +8,16 @@ build: accounts: - name: alice coins: - - 100000000frt + - 100000000ufairy - 100000000stake - name: bob coins: - - 100000000frt + - 100000000ufairy - 100000000stake faucet: name: bob coins: - - 100000frt + - 100000ufairy - 100000stake host: 0.0.0.0:4500 genesis: diff --git a/go.mod b/go.mod index 7a6428b2..7f01be34 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module fairyring -go 1.19 +go 1.21 require ( cosmossdk.io/api v0.3.1 diff --git a/go.sum b/go.sum index 525e432b..6945f829 100644 --- a/go.sum +++ b/go.sum @@ -282,6 +282,7 @@ github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBA github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= +github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -384,9 +385,11 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/buf v1.3.1/go.mod h1:CTRUb23N+zlm1U8ZIBKz0Sqluk++qQloB2i/MZNZHIs= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= @@ -410,6 +413,7 @@ github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4/go.mod h1:W8EnPSQ8 github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= @@ -439,6 +443,7 @@ github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= @@ -507,7 +512,9 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= +github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= +github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2EohgUadLkAbhoC4IyCFi89u/JQI= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/daixiang0/gci v0.4.2/go.mod h1:d0f+IJhr9loBtIq+ebwhRoTt1LGbPH96ih8bKlsRT9E= @@ -522,6 +529,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= @@ -557,6 +565,7 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/drand/kyber v1.2.0 h1:22SbBxsKbgQnJUoyYKIfG909PhBsj0vtANeu4BX5xgE= @@ -615,6 +624,7 @@ github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= @@ -624,6 +634,7 @@ github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbS github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= @@ -663,10 +674,13 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -694,6 +708,7 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -702,6 +717,7 @@ github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14j github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= +github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -795,12 +811,14 @@ github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -1009,6 +1027,7 @@ github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f/go.mod h1:qr2b5 github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= github.com/jhump/protoreflect v1.11.1-0.20220213155251-0c2aedc66cf4/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -1064,6 +1083,7 @@ github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQs github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -1077,6 +1097,7 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -1092,6 +1113,7 @@ github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3 github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -1275,6 +1297,7 @@ github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je4 github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1415,6 +1438,7 @@ github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqn github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= +github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= @@ -1589,6 +1613,7 @@ github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= @@ -1596,6 +1621,7 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1698,6 +1724,7 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1785,6 +1812,7 @@ golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2508,6 +2536,7 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81 gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/hermes_config.toml b/hermes_config.toml index 465a417c..294a29f5 100644 --- a/hermes_config.toml +++ b/hermes_config.toml @@ -53,7 +53,7 @@ denominator = '3' [chains.gas_price] price = 1 -denom = 'frt' +denom = 'ufairy' [chains.address_type] derivation = 'cosmos' @@ -85,7 +85,7 @@ denominator = '3' [chains.gas_price] price = 1 -denom = 'frt' +denom = 'ufairy' [chains.address_type] derivation = 'cosmos' \ No newline at end of file diff --git a/networks/testnets/fairytest-3/README.md b/networks/testnets/fairytest-3/README.md new file mode 100644 index 00000000..9a7c0c6f --- /dev/null +++ b/networks/testnets/fairytest-3/README.md @@ -0,0 +1,245 @@ +# fairytest-3 + +> This chain is a testnet. + +3rd testnet for FairyRing. + +## Hardware Requirements + +- **Minimal** + - 4 GB RAM + - 250 GB HDD + - 1.4 GHz x2 CPU +- **Recommended** + - 8 GB RAM + - 500 GB HDD + - 2.0 GHz x4 CPU + +--- + +## Operating System + +- Linux/Windows/MacOS(x86) +- **Recommended** + - Linux(x86_64) + - Ubuntu 20.04 LTS + +--- + +## Network + +- Sentry node architecture and secure firewall configurations are highly recommended [ref](https://forum.cosmos.network/t/sentry-node-architecture-overview/454) +- Port & Firewall settings (Ports Allowed) + - rpc port: 26657 + - p2p port: 26656 + - grpc port: 9090 + +--- + +## Installation Steps + +> Prerequisite: go1.21+ required [ref](https://golang.org/doc/install) + +```shell +sudo snap install --classic go +``` + +> Prerequisite: git [ref](https://github.com/git/git) + +```shell +sudo apt install -y git gcc make +``` + +> Prerequisite: Set environment variables + +```shell +sudo nano $HOME/.profile +# Add the following two lines at the end of the file +GOPATH=$HOME/go +PATH=$GOPATH/bin:$PATH +# Save the file and exit the editor +source $HOME/.profile +# Now you should be able to see your variables like this: +echo $GOPATH +/home/[your_username]/go +echo $PATH +/home/[your_username]/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin +``` + +> Recommended requirement: Increase 'number of open files' limit + +```shell +sudo nano /etc/security/limits.conf +# Before the end of the file, add: +[your_username] soft nofile 4096 +# Then reboot the instance for it to take effect and check with: +ulimit -Sn +``` + +> Optional requirement: GNU make [ref](https://www.gnu.org/software/make/manual/html_node/index.html) + +- Clone git repository + +```shell +git clone git@github.com:FairBlock/fairyring.git +``` + +- Checkout release tag + +```shell +cd fairyring +git fetch --tags +git checkout v0.3.0 +``` + +- Install + +```shell +cd fairyring +go mod tidy +make install +``` + +### Generate keys + +`fairyringd keys add [key_name]` + +or + +`fairyringd keys add [key_name] --recover` to regenerate keys with your [BIP39](https://github.com/bitcoin/bips/tree/master/bip-0039) mnemonic + +--- + +## Node start and validator setup + +### Upgrading from v0.2.1 to v0.3.0 + +### Prior to genesis creation and network launch + +- [Install](#installation-steps) FairyRing application +- Remove data from previous run of `fairyringd` + +```shell +fairyringd tendermint unsafe-reset-all +``` + +- Make a genesis transaction to become a validator + +```shell +fairyringd gentx \ + [account_key_name] \ + 100000000000ufairy \ + --commission-max-change-rate 0.01 \ + --commission-max-rate 0.2 \ + --commission-rate 0.05 \ + --min-self-delegation 1 \ + --details [optional-details] \ + --identity [optional-identity] \ + --security-contact "[optional-security@example.com]" \ + --website [optional.web.page.com] \ + --moniker [node_moniker] \ + --chain-id fairytest-3 +``` + +- Copy the contents of `${HOME}/.fairyring/config/gentx/gentx-XXXXXXXX.json` +- Clone the [fairyring repository](https://github.com/FairBlock/fairyring) and create a new branch +- Create a file `gentx-{{VALIDATOR_NAME}}.json` under the `networks/testnets/fairytest-3/gentxs` folder in the newly created branch, paste the copied text into the file (note: find reference file `gentx-examplexxxxxxxx.json` in the same folder) +- Run `fairyringd tendermint show-node-id` and copy your nodeID +- Run `ifconfig` or `curl ipinfo.io/ip` and copy your publicly reachable IP address +- Create a file `peers-{{VALIDATOR_NAME}}.json` under the `networks/testnets/fairytest-3/peers` folder in the new branch, paste the copied text from the last two steps into the file (note: find reference file `peers-examplexxxxxxxx.json` in the same folder) +- Create a Pull Request to the `main` branch of the [fairyring repository](https://github.com/FairBlock/fairyring) + > **NOTE:** the Pull Request will be merged by the maintainers to confirm the inclusion of the validator at the genesis. The final genesis file will be published under the file `networks/testnets/fairytest-3/genesis.json`. +- Once the submission process has closed and the genesis file has been created, replace the contents of your `${HOME}/.fairyring/config/genesis.json` with that of `networks/testnets/fairytest-3/genesis.json` +- Add the required `persistent_peers` or `seeds` in `${HOME}/.fairyring/config/config.toml` from `networks/testnets/fairytest-3/peers-nodes.txt` +- Update the `~/.fairyring/config/config.toml` file and make sure that the peer-port (26656) is publicly reachable. If you are running sentry nodes, make sure that the peer-port of your sentry is publicly reachable +- Start node + +```shell +fairyringd start +``` + +--- + +## After genesis creation and network launch + +### Step 1: Start a full node + +- [Install](#installation-steps) FairyRing application +- Initialize node + +```shell +fairyringd init {{NODE_NAME}} +``` + +- Replace the contents of your `${HOME}/.fairyring/config/genesis.json` with that of `networks/testnets/fairytest-3/genesis.json` from the `main` branch of [FairyRing repository](https://github.com/FairBlock/fairyring) + +```shell +curl https://github.com/FairBlock/blob/main/fairyring/networks/testnets/fairytest-3/genesis.json > $HOME/.fairyring/config/genesis.json +``` + +- Add `persistent_peers` or `seeds` in `${HOME}/.fairyring/config/config.toml` from `networks/testnets/fairytest-3/peers-nodes.txt` from the `main` branch of [FairyRing repository](https://github.com/FairBlock/fairyring) +- Start node + +```shell +fairyringd start +``` + +> Note: if you are only planning to run a full node, you can stop here + +### Step 2: Create a validator + +- Acquire FAIRY tokens (contact maintainers on telegram) +- Wait for your full node to catch up to the latest block +- Run `fairyringd tendermint show-validator` and copy your consensus public key +- Send a create-validator transaction + +```shell +fairyringd tx staking create-validator \ + --amount 100000000000ufairy \ + --commission-max-change-rate 0.01 \ + --commission-max-rate 0.2 \ + --commission-rate 0.1 \ + --from [account_key_name] \ + --fees 400000ufairy \ + --min-self-delegation 1 \ + --moniker [validator_moniker] \ + --pubkey $(fairyringd tendermint show-validator) \ + --chain-id fairytest-3 \ + -y +``` + +--- + +## Persistent Peers + +The `persistent_peers` needs a comma-separated list of trusted peers on the network, you can acquire it from the [peer-nodes.txt](https://github.com/FairBlock/blob/main/networks/testnets/fairytest-3/peer-nodes.txt) for example: + +```shell +dbe29963ccda90bb812a14359bbd2a4f3deba169@195.14.6.182:26656,525d605dc4cc1e92d6b1d9a6934b19066083e610@34.66.108.187:26656,cd1cbf64a3e85d511c2a40b9e3e7b2e9b40d5905@18.183.243.242:26656,fe0713ceb31b8a273b25bdd0fe0026778f781526@147.135.105.3:24756,24c65c37d4b4c4cd2688e28a8ea38c377dd0d7f6@65.21.163.231:26656,3cda3bebf7aaeeb0533734496158420dcd3da4ad@94.130.137.119:26656 +``` + +## Version + +This chain is currently running on fairyring [v0.3.0](https://github.com/FairBlock/fairyring/releases/tag/v0.3.0) +Commit Hash: [8e6f6deea6a04b260d190fcd5787bcc4ff85f149](https://github.com/FairBlock/fairyring/commit/8e6f6deea6a04b260d190fcd5787bcc4ff85f149) + +## Binary + +The binary can be downloaded from [here](https://github.com/FairBlock/fairyring/releases/tag/v0.3.0) + +## Explorer + +Coming Soon!! + + + +## Faucet + +Coming Soon!! + + +### RPC & API + +Coming Soon!! + + diff --git a/networks/testnets/fairytest-3/genesis.json b/networks/testnets/fairytest-3/genesis.json new file mode 100644 index 00000000..3eb9bafe --- /dev/null +++ b/networks/testnets/fairytest-3/genesis.json @@ -0,0 +1,509 @@ +{ + "genesis_time": "2024-01-05T19:00:00.0Z", + "chain_id": "fairytest-3", + "initial_height": "1", + "consensus_params": { + "block": { + "max_bytes": "22020096", + "max_gas": "-1" + }, + "evidence": { + "max_age_num_blocks": "100000", + "max_age_duration": "172800000000000", + "max_bytes": "1048576" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + }, + "version": { + "app": "0" + } + }, + "app_hash": "", + "app_state": { + "07-tendermint": null, + "auth": { + "params": { + "max_memo_characters": "256", + "tx_sig_limit": "7", + "tx_size_cost_per_byte": "10", + "sig_verify_cost_ed25519": "590", + "sig_verify_cost_secp256k1": "1000" + }, + "accounts": [ + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy1zrpp7dfav7kancgse2peh3k98u9ueajwvq4w4q", + "pub_key": null, + "account_number": "0", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy15davlswu3dfud5zushgp0yam70p5cnu6w5vcfd", + "pub_key": null, + "account_number": "1", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy1tqqpdxhvfftnpvj8w2zwumk69t0km7ca92m8zt", + "pub_key": null, + "account_number": "2", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy13sv36pmhz0ckvzwtvwgk4ecu6chuf6nmdssjvm", + "pub_key": null, + "account_number": "3", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy1ffm2sadwyurzkgtfhm3ctttc5qxjsgayex8prk", + "pub_key": null, + "account_number": "4", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy13sjf5svx0xvrtwq8g4l86qmpv0qs05zvrgq72v", + "pub_key": null, + "account_number": "5", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy1nwdhwx0nn7e8ltfwtlgn43gu59swd056qs7pj5", + "pub_key": null, + "account_number": "6", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy146p637nkum6sfjj0x9etzpa40qrfdv3c5ccnmz", + "pub_key": null, + "account_number": "7", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy1f6mx8wgea8xdxeswwavh9008uv6d7yga3qqtyv", + "pub_key": null, + "account_number": "8", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy1lw4mm6yzry2xg3tj7swp80cw4s6w6vzvxfqml5", + "pub_key": null, + "account_number": "9", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy1t5rvpy4aefapvsws2zhzgsfgl8d9actpmarwh7", + "pub_key": null, + "account_number": "10", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy1cmly8rn75tp4pmdwjae39t8h7ttmd6ld85je6f", + "pub_key": null, + "account_number": "11", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy14qekdkj2nmmwea4ufg9n002a3pud23y8tcf8aa", + "pub_key": null, + "account_number": "12", + "sequence": "0" + } + ] + }, + "authz": { + "authorization": [] + }, + "bank": { + "params": { + "send_enabled": [], + "default_send_enabled": true + }, + "balances": [ + { + "address": "fairy1zrpp7dfav7kancgse2peh3k98u9ueajwvq4w4q", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy1ffm2sadwyurzkgtfhm3ctttc5qxjsgayex8prk", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy1f6mx8wgea8xdxeswwavh9008uv6d7yga3qqtyv", + "coins": [ + { + "denom": "ufairy", + "amount": "50000000000000" + } + ] + }, + { + "address": "fairy1tqqpdxhvfftnpvj8w2zwumk69t0km7ca92m8zt", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy1t5rvpy4aefapvsws2zhzgsfgl8d9actpmarwh7", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy13sv36pmhz0ckvzwtvwgk4ecu6chuf6nmdssjvm", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy13sjf5svx0xvrtwq8g4l86qmpv0qs05zvrgq72v", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy1nwdhwx0nn7e8ltfwtlgn43gu59swd056qs7pj5", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy15davlswu3dfud5zushgp0yam70p5cnu6w5vcfd", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy14qekdkj2nmmwea4ufg9n002a3pud23y8tcf8aa", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy146p637nkum6sfjj0x9etzpa40qrfdv3c5ccnmz", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy1cmly8rn75tp4pmdwjae39t8h7ttmd6ld85je6f", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, + { + "address": "fairy1lw4mm6yzry2xg3tj7swp80cw4s6w6vzvxfqml5", + "coins": [ + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + } + ], + "supply": [], + "denom_metadata": [], + "send_enabled": [] + }, + "capability": { + "index": "1", + "owners": [] + }, + "consensus": null, + "crisis": { + "constant_fee": { + "denom": "ufairy", + "amount": "1000" + } + }, + "distribution": { + "params": { + "community_tax": "0.020000000000000000", + "base_proposer_reward": "0.010000000000000000", + "bonus_proposer_reward": "0.040000000000000000", + "withdraw_addr_enabled": true + }, + "fee_pool": { + "community_pool": [] + }, + "delegator_withdraw_infos": [], + "previous_proposer": "", + "outstanding_rewards": [], + "validator_accumulated_commissions": [], + "validator_historical_rewards": [], + "validator_current_rewards": [], + "delegator_starting_infos": [], + "validator_slash_events": [] + }, + "evidence": { + "evidence": [] + }, + "feegrant": { + "allowances": [] + }, + "genutil": { + "gen_txs": [] + }, + "gov": { + "starting_proposal_id": "1", + "deposits": [], + "votes": [], + "proposals": [], + "deposit_params": null, + "voting_params": null, + "tally_params": null, + "params": { + "min_deposit": [ + { + "denom": "ufairy", + "amount": "10000000" + } + ], + "max_deposit_period": "172800s", + "voting_period": "172800s", + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000", + "min_initial_deposit_ratio": "0.000000000000000000", + "burn_vote_quorum": false, + "burn_proposal_deposit_prevote": false, + "burn_vote_veto": true + } + }, + "group": { + "group_seq": "0", + "groups": [], + "group_members": [], + "group_policy_seq": "0", + "group_policies": [], + "proposal_seq": "0", + "proposals": [], + "votes": [] + }, + "ibc": { + "client_genesis": { + "clients": [], + "clients_consensus": [], + "clients_metadata": [], + "params": { + "allowed_clients": [ + "06-solomachine", + "07-tendermint", + "09-localhost" + ] + }, + "create_localhost": false, + "next_client_sequence": "0" + }, + "connection_genesis": { + "connections": [], + "client_connection_paths": [], + "next_connection_sequence": "0", + "params": { + "max_expected_time_per_block": "30000000000" + } + }, + "channel_genesis": { + "channels": [], + "acknowledgements": [], + "commitments": [], + "receipts": [], + "send_sequences": [], + "recv_sequences": [], + "ack_sequences": [], + "next_channel_sequence": "0" + } + }, + "interchainaccounts": { + "controller_genesis_state": { + "active_channels": [], + "interchain_accounts": [], + "ports": [], + "params": { + "controller_enabled": true + } + }, + "host_genesis_state": { + "active_channels": [], + "interchain_accounts": [], + "port": "icahost", + "params": { + "host_enabled": true, + "allow_messages": [ + "*" + ] + } + } + }, + "keyshare": { + "params": { + "key_expiry": "100", + "trusted_addresses": [ + "fairy1cmly8rn75tp4pmdwjae39t8h7ttmd6ld85je6f", + "fairy1t5rvpy4aefapvsws2zhzgsfgl8d9actpmarwh7", + "fairy1lw4mm6yzry2xg3tj7swp80cw4s6w6vzvxfqml5" + ], + "slash_fraction_no_keyshare": "0.00001000000000000", + "slash_fraction_wrong_keyshare": "0.00001000000000000", + "minimum_bonded": "10000000000", + "max_idled_block": "1000" + }, + "port_id": "", + "validatorSetList": [], + "keyShareList": [], + "aggregatedKeyShareList": [], + "activePubKey": { + "publicKey": "", + "creator": "", + "expiry": "0" + }, + "queuedPubKey": { + "publicKey": "", + "creator": "", + "expiry": "0" + }, + "authorizedAddressList": [], + "request_count": "0", + "generalKeyShareList": [] + }, + "mint": { + "minter": { + "inflation": "0.130000000000000000", + "annual_provisions": "0.000000000000000000" + }, + "params": { + "mint_denom": "ufairy", + "inflation_rate_change": "0.130000000000000000", + "inflation_max": "0.200000000000000000", + "inflation_min": "0.070000000000000000", + "goal_bonded": "0.670000000000000000", + "blocks_per_year": "6311520" + } + }, + "params": null, + "pep": { + "params": { + "trusted_counter_parties": [ + { + "client_id": "07-tendermint-0", + "connection_id": "connection-0", + "channel_id": "channel-0" + } + ], + "trusted_addresses": [ + "fairy1cmly8rn75tp4pmdwjae39t8h7ttmd6ld85je6f" + ], + "channel_id": "channel-0", + "minGasPrice": { + "denom": "ufairy", + "amount": "300000" + } + }, + "port_id": "", + "encryptedTxArray": [], + "pepNonceList": [], + "aggregatedKeyShareList": [], + "activePubKey": { + "publicKey": "", + "creator": "", + "expiry": "0" + }, + "queuedPubKey": { + "publicKey": "", + "creator": "", + "expiry": "0" + } + }, + "slashing": { + "params": { + "signed_blocks_window": "100", + "min_signed_per_window": "0.500000000000000000", + "downtime_jail_duration": "600s", + "slash_fraction_double_sign": "0.050000000000000000", + "slash_fraction_downtime": "0.010000000000000000" + }, + "signing_infos": [], + "missed_blocks": [] + }, + "staking": { + "params": { + "unbonding_time": "1814400s", + "max_validators": 100, + "max_entries": 7, + "historical_entries": 10000, + "bond_denom": "ufairy", + "min_commission_rate": "0.000000000000000000" + }, + "last_total_power": "0", + "last_validator_powers": [], + "validators": [], + "delegations": [], + "unbonding_delegations": [], + "redelegations": [], + "exported": false + }, + "transfer": { + "port_id": "transfer", + "denom_traces": [], + "params": { + "send_enabled": true, + "receive_enabled": true + }, + "total_escrowed": [] + }, + "upgrade": {}, + "vesting": {} + } +} \ No newline at end of file diff --git a/networks/testnets/fairytest-3/peers-node.txt b/networks/testnets/fairytest-3/peers-node.txt new file mode 100644 index 00000000..e69de29b diff --git a/scripts/tests/keyshare.sh b/scripts/tests/keyshare.sh index b61434a1..4fc5f2e7 100755 --- a/scripts/tests/keyshare.sh +++ b/scripts/tests/keyshare.sh @@ -38,7 +38,7 @@ wait_for_tx () { } echo "Staked account registering as a validator on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare register-validator --from $VALIDATOR_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare register-validator --from $VALIDATOR_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) VALIDATOR_ADDR=$(echo "$RESULT" | jq -r '.logs[0].events[1].attributes[0].value') @@ -50,7 +50,7 @@ fi echo "Non staking account registering as a validator on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare register-validator --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare register-validator --from $WALLET_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) RESULT=$(wait_for_tx $RESULT) ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') if [[ "$ERROR_MSG" != *"account is not staking"* ]]; then @@ -60,7 +60,7 @@ if [[ "$ERROR_MSG" != *"account is not staking"* ]]; then fi echo "Non validator account authorizing another address to submit key share on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare create-authorized-address $VALIDATOR_1 --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare create-authorized-address $VALIDATOR_1 --from $WALLET_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') @@ -77,7 +77,7 @@ PUB_KEY=$(echo "$GENERATED_RESULT" | jq -r '.MasterPublicKey') COMMITS=$(echo "$GENERATED_RESULT" | jq -r '.Commitments[0]') echo "Trusted address submit pub key on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare create-latest-pub-key $PUB_KEY $COMMITS --from $VALIDATOR_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare create-latest-pub-key $PUB_KEY $COMMITS --from $VALIDATOR_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) VALIDATOR_ADDR=$(echo "$RESULT" | jq -r '.logs[0].events[1].attributes[2].value') @@ -89,7 +89,7 @@ fi echo "Not trusted address submit pub key on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare create-latest-pub-key $PUB_KEY $COMMITS --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare create-latest-pub-key $PUB_KEY $COMMITS --from $WALLET_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') @@ -108,7 +108,7 @@ EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') echo "Not registered account submit key share on chain fairyring_test_1" CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node tcp://localhost:16657 | jq -r '.block.header.height') -RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $WALLET_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') @@ -120,7 +120,7 @@ fi echo "Registered validator authorize another address to submit key share on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare create-authorized-address $WALLET_1 --from $VALIDATOR_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare create-authorized-address $WALLET_1 --from $VALIDATOR_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) EVENT_ATR=$(echo "$RESULT" | jq -r '.logs[0].events[0].attributes[0].value') @@ -138,7 +138,7 @@ EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') echo "Authorized account submit key share on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $WALLET_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) KEYSHARE_HEIGHT=$(echo "$RESULT" | jq -r '.logs[0].events[1].attributes[1].value') @@ -150,7 +150,7 @@ fi echo "Registered validator remove authorized address to submit key share on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare delete-authorized-address $WALLET_1 --from $VALIDATOR_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare delete-authorized-address $WALLET_1 --from $VALIDATOR_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) EVENT_ATR=$(echo "$RESULT" | jq -r '.logs[0].events[0].attributes[0].value') @@ -168,7 +168,7 @@ EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') echo "Removed Authorized account tries submit key share on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $WALLET_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') @@ -186,7 +186,7 @@ EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') echo "Registered validator submit valid key share on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $VALIDATOR_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $VALIDATOR_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) RESULT_EVENT=$(echo "$RESULT" | jq -r '.logs[0].events[2].type') diff --git a/scripts/tests/keyshareSender.sh b/scripts/tests/keyshareSender.sh index 8c4a5817..53f7d5e0 100755 --- a/scripts/tests/keyshareSender.sh +++ b/scripts/tests/keyshareSender.sh @@ -32,7 +32,7 @@ do EXTRACTED_RESULT=$($GENERATOR derive $GENERATED_SHARE 1 $TARGET_HEIGHT) EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') #EXTRACTED_COMMITMENT=$(echo "$EXTRACTED_RESULT" | jq -r '.Commitment') - RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $FROM --gas-prices 1frt --home $HOME --chain-id $CHAINID --node $NODE --broadcast-mode sync --keyring-backend test -o json -y) + RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $FROM --gas-prices 1ufairy --home $HOME --chain-id $CHAINID --node $NODE --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) RESULT_EVENT=$(echo "$RESULT" | jq -r '.logs[0].events[2].type') diff --git a/scripts/tests/pep.sh b/scripts/tests/pep.sh index 20c1caa1..3965aad9 100755 --- a/scripts/tests/pep.sh +++ b/scripts/tests/pep.sh @@ -62,7 +62,7 @@ fi echo "Submit encrypted tx with invalid block height to pep module on chain fairyring_test_2" CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node tcp://localhost:16657 | jq -r '.block.header.height') -RESULT=$($BINARY tx pep submit-encrypted-tx 0000 $((CURRENT_BLOCK - 1)) --from $VALIDATOR_2 --gas-prices 1frt --gas 300000 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx pep submit-encrypted-tx 0000 $((CURRENT_BLOCK - 1)) --from $VALIDATOR_2 --gas-prices 1ufairy --gas 300000 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') @@ -92,8 +92,8 @@ echo "Target account has: $TARGET_BAL $TARGET_BAL_DENOM before encrypted bank se echo "Signing bank send tx with pep nonce: '$VALIDATOR_PEP_NONCE_BEFORE'" echo "Sending 1 $TARGET_BAL_DENOM to target address" -$BINARY tx bank send $VALIDATOR_2 $WALLET_2 1$TARGET_BAL_DENOM --from $VALIDATOR_2 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --keyring-backend test --generate-only -o json -y > unsigned.json -SIGNED_DATA=$($BINARY tx sign unsigned.json --from $VALIDATOR_2 --offline --account-number 0 --sequence $VALIDATOR_PEP_NONCE_BEFORE --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --keyring-backend test -y) +$BINARY tx bank send $VALIDATOR_2 $WALLET_2 1$TARGET_BAL_DENOM --from $VALIDATOR_2 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --keyring-backend test --generate-only -o json -y > unsigned.json +SIGNED_DATA=$($BINARY tx sign unsigned.json --from $VALIDATOR_2 --offline --account-number 0 --sequence $VALIDATOR_PEP_NONCE_BEFORE --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --keyring-backend test -y) PEP_NONCE_2ND=$(($VALIDATOR_PEP_NONCE_BEFORE+1)) @@ -116,7 +116,7 @@ fi CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_2 --node $CHAIN2_NODE | jq -r '.block.header.height') echo "Chain 2 Current Block: $CURRENT_BLOCK" echo "Submit valid aggregated key to pep module on chain fairyring_test_2 from address: $VALIDATOR_2" -RESULT=$($BINARY tx pep create-aggregated-key-share $AGG_KEY_HEIGHT $AGG_KEY --from $VALIDATOR_2 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx pep create-aggregated-key-share $AGG_KEY_HEIGHT $AGG_KEY --from $VALIDATOR_2 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) ACTION=$(echo "$RESULT" | jq -r '.logs[0].events[0].attributes[0].value') @@ -156,7 +156,7 @@ echo "Balance before submitting encrypted tx: $BAL_AMT$BAL_DENOM" echo "Submit encrypted tx to pep module on chain fairyring_test_2" -RESULT=$($BINARY tx pep submit-encrypted-tx $CIPHER $AGG_KEY_HEIGHT --from $VALIDATOR_2 --gas-prices 1frt --gas 300000 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx pep submit-encrypted-tx $CIPHER $AGG_KEY_HEIGHT --from $VALIDATOR_2 --gas-prices 1ufairy --gas 300000 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) EVENT_TYPE=$(echo "$RESULT" | jq -r '.logs[0].events[5].type') @@ -176,7 +176,7 @@ echo "Balance after submitting first encrypted tx: $BAL_AMT$BAL_DENOM" echo "Submit 2nd encrypted tx (without gas fee) to pep module on chain fairyring_test_2" -RESULT=$($BINARY tx pep submit-encrypted-tx $CIPHER_2 $AGG_KEY_HEIGHT --from $VALIDATOR_2 --gas-prices 1frt --gas 300000 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx pep submit-encrypted-tx $CIPHER_2 $AGG_KEY_HEIGHT --from $VALIDATOR_2 --gas-prices 1ufairy --gas 300000 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) EVENT_TYPE=$(echo "$RESULT" | jq -r '.logs[0].events[5].type') @@ -208,7 +208,7 @@ fi CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_2 --node $CHAIN2_NODE | jq -r '.block.header.height') echo "Chain 2 Current Block: $CURRENT_BLOCK" echo "Submit valid aggregated key to pep module on chain fairyring_test_2 from address: $VALIDATOR_2" -RESULT=$($BINARY tx pep create-aggregated-key-share $AGG_KEY_HEIGHT $AGG_KEY --from $VALIDATOR_2 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx pep create-aggregated-key-share $AGG_KEY_HEIGHT $AGG_KEY --from $VALIDATOR_2 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) ACTION=$(echo "$RESULT" | jq -r '.logs[0].events[0].attributes[0].value') @@ -256,7 +256,7 @@ BAL_AMT=$(echo "$RESULT" | jq -r '.balances[0].amount') echo "Balance after encrypted tx execution: $BAL_AMT$BAL_DENOM" echo "Submit invalid aggregated key to pep module on chain fairyring_test_2" -RESULT=$($BINARY tx pep create-aggregated-key-share $((AGG_KEY_HEIGHT+1)) 123123123 --from $VALIDATOR_2 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$($BINARY tx pep create-aggregated-key-share $((AGG_KEY_HEIGHT+1)) 123123123 --from $VALIDATOR_2 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) check_tx_code $RESULT RESULT=$(wait_for_tx $RESULT) if [[ "$RESULT" != *"input string length must be equal to 96 bytes"* ]]; then diff --git a/scripts/tests/start.sh b/scripts/tests/start.sh index 955ba3a1..3edf6dd5 100755 --- a/scripts/tests/start.sh +++ b/scripts/tests/start.sh @@ -83,14 +83,14 @@ WALLET4_ADDR=$($BINARY keys show wallet4 --home $CHAIN_DIR/$CHAINID_2 --keyring- RLY1_ADDR=$($BINARY keys show rly1 --home $CHAIN_DIR/$CHAINID_1 --keyring-backend test -a) RLY2_ADDR=$($BINARY keys show rly2 --home $CHAIN_DIR/$CHAINID_2 --keyring-backend test -a) -$BINARY add-genesis-account $VAL1_ADDR 1000000000000frt,1000000000000stake --home $CHAIN_DIR/$CHAINID_1 -$BINARY add-genesis-account $VAL2_ADDR 1000000000000frt,1000000000000stake --home $CHAIN_DIR/$CHAINID_2 -$BINARY add-genesis-account $WALLET1_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_1 -$BINARY add-genesis-account $WALLET2_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_2 -$BINARY add-genesis-account $WALLET3_ADDR 1000000000000frt --vesting-amount 100000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_1 -$BINARY add-genesis-account $WALLET4_ADDR 1000000000000frt --vesting-amount 100000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_2 -$BINARY add-genesis-account $RLY1_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_1 -$BINARY add-genesis-account $RLY2_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_2 +$BINARY add-genesis-account $VAL1_ADDR 1000000000000ufairy,1000000000000stake --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $VAL2_ADDR 1000000000000ufairy,1000000000000stake --home $CHAIN_DIR/$CHAINID_2 +$BINARY add-genesis-account $WALLET1_ADDR 1000000000000ufairy --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $WALLET2_ADDR 1000000000000ufairy --home $CHAIN_DIR/$CHAINID_2 +$BINARY add-genesis-account $WALLET3_ADDR 1000000000000ufairy --vesting-amount 100000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $WALLET4_ADDR 1000000000000ufairy --vesting-amount 100000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_2 +$BINARY add-genesis-account $RLY1_ADDR 1000000000000ufairy --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $RLY2_ADDR 1000000000000ufairy --home $CHAIN_DIR/$CHAINID_2 echo "Creating and collecting gentx..." $BINARY gentx val1 100000000000stake --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --keyring-backend test @@ -108,7 +108,7 @@ sed -i -e 's/enable = false/enable = true/g' $CHAIN_DIR/$CHAINID_1/config/app.to sed -i -e 's/swagger = false/swagger = true/g' $CHAIN_DIR/$CHAINID_1/config/app.toml sed -i -e 's#"tcp://localhost:1317"#"tcp://localhost:'"$RESTPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml sed -i -e 's#":8080"#":'"$ROSETTA_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml -sed -i -e 's/minimum-gas-prices = "0stake"/minimum-gas-prices = "1frt"/g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e 's/minimum-gas-prices = "0stake"/minimum-gas-prices = "1ufairy"/g' $CHAIN_DIR/$CHAINID_1/config/app.toml sed -i -e 's#"tcp://0.0.0.0:26656"#"tcp://0.0.0.0:'"$P2PPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/config.toml sed -i -e 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:'"$RPCPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/config.toml @@ -120,7 +120,7 @@ sed -i -e 's/0.0.0.0:9090/0.0.0.0:'"$GRPCPORT_2"'/g' $CHAIN_DIR/$CHAINID_2/confi sed -i -e 's/swagger = false/swagger = true/g' $CHAIN_DIR/$CHAINID_2/config/app.toml sed -i -e 's#"tcp://localhost:1317"#"tcp://localhost:'"$RESTPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/app.toml sed -i -e 's#":8080"#":'"$ROSETTA_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/app.toml -sed -i -e 's/minimum-gas-prices = "0stake"/minimum-gas-prices = "1frt"/g' $CHAIN_DIR/$CHAINID_2/config/app.toml +sed -i -e 's/minimum-gas-prices = "0stake"/minimum-gas-prices = "1ufairy"/g' $CHAIN_DIR/$CHAINID_2/config/app.toml echo "Changing genesis.json..." sed -i -e 's/"voting_period": "172800s"/"voting_period": "10s"/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json diff --git a/scripts/tests/start_test_block_tx_limit.sh b/scripts/tests/start_test_block_tx_limit.sh index 22f77745..156360bd 100755 --- a/scripts/tests/start_test_block_tx_limit.sh +++ b/scripts/tests/start_test_block_tx_limit.sh @@ -61,18 +61,18 @@ WALLET3_ADDR=$($BINARY keys show wallet3 --home $CHAIN_DIR/$CHAINID_1 --keyring- for i in $(seq 0 $(($TOTAL_TEST_ACC_NUM-1))) do - $BINARY add-genesis-account "test$i" 1000000000000frt --home $CHAIN_DIR/$CHAINID_1 + $BINARY add-genesis-account "test$i" 1000000000000ufairy --home $CHAIN_DIR/$CHAINID_1 done $BINARY keys add "normaltxacc" --home $CHAIN_DIR/$CHAINID_1 --keyring-backend=test NORMALTXACC_ADDR=$($BINARY keys show normaltxacc --home $CHAIN_DIR/$CHAINID_1 --keyring-backend test -a) -$BINARY add-genesis-account $NORMALTXACC_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $NORMALTXACC_ADDR 1000000000000ufairy --home $CHAIN_DIR/$CHAINID_1 -$BINARY add-genesis-account $VAL1_ADDR 1000000000000frt,1000000000000stake --home $CHAIN_DIR/$CHAINID_1 -$BINARY add-genesis-account $WALLET1_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_1 -$BINARY add-genesis-account $WALLET3_ADDR 1000000000000frt --vesting-amount 10000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $VAL1_ADDR 1000000000000ufairy,1000000000000stake --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $WALLET1_ADDR 1000000000000ufairy --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $WALLET3_ADDR 1000000000000ufairy --vesting-amount 10000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_1 echo "Creating and collecting gentx..." $BINARY gentx val1 10000000000stake --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --keyring-backend test diff --git a/scripts/tests/submitNormalTx.sh b/scripts/tests/submitNormalTx.sh index 2b0ca136..ec756aa9 100755 --- a/scripts/tests/submitNormalTx.sh +++ b/scripts/tests/submitNormalTx.sh @@ -66,7 +66,7 @@ NEXT_BLOCK_CONFIRMED=0 for i in $(seq 1 $TX_AMOUNT) do - RESULT=$($BINARY tx bank send $FROM_ADDR $WALLET1_ADDR 1frt --from $FROM_ADDR --offline --account-number $ACCOUNT_NUMBER --sequence $ACCOUNT_SEQ --gas 600000 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode async --keyring-backend test -o json -y) + RESULT=$($BINARY tx bank send $FROM_ADDR $WALLET1_ADDR 1ufairy --from $FROM_ADDR --offline --account-number $ACCOUNT_NUMBER --sequence $ACCOUNT_SEQ --gas 600000 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode async --keyring-backend test -o json -y) TX_CODE=$(echo "$RESULT" | jq -r '.code') TX_HASH=$(echo "$RESULT" | jq -r '.txhash') diff --git a/x/pep/types/params.go b/x/pep/types/params.go index c7558ea5..1575ab02 100644 --- a/x/pep/types/params.go +++ b/x/pep/types/params.go @@ -25,7 +25,7 @@ var ( KeyChannelID = []byte("ChannelID") DefaultChannelID = ChannelID KeyMinGasPrice = []byte("MinGasPrice") - DefaultMinGasPrice = sdk.NewCoin("frt", cosmosmath.NewInt(300000)) + DefaultMinGasPrice = sdk.NewCoin("ufairy", cosmosmath.NewInt(300000)) ) // ParamKeyTable the param key table for launch module From b97bda8863ce9fe111bcb8f69c891b91f5db4caa Mon Sep 17 00:00:00 2001 From: p0p3yee Date: Wed, 27 Dec 2023 14:37:24 -0500 Subject: [PATCH 2/6] Update genesis file to use stake denom for staking --- networks/testnets/fairytest-3/genesis.json | 60 ++++++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/networks/testnets/fairytest-3/genesis.json b/networks/testnets/fairytest-3/genesis.json index 3eb9bafe..5080e2f1 100644 --- a/networks/testnets/fairytest-3/genesis.json +++ b/networks/testnets/fairytest-3/genesis.json @@ -138,6 +138,10 @@ { "address": "fairy1zrpp7dfav7kancgse2peh3k98u9ueajwvq4w4q", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -147,6 +151,10 @@ { "address": "fairy1ffm2sadwyurzkgtfhm3ctttc5qxjsgayex8prk", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -156,6 +164,10 @@ { "address": "fairy1f6mx8wgea8xdxeswwavh9008uv6d7yga3qqtyv", "coins": [ + { + "denom": "stake", + "amount": "50000000000000" + }, { "denom": "ufairy", "amount": "50000000000000" @@ -165,6 +177,10 @@ { "address": "fairy1tqqpdxhvfftnpvj8w2zwumk69t0km7ca92m8zt", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -174,6 +190,10 @@ { "address": "fairy1t5rvpy4aefapvsws2zhzgsfgl8d9actpmarwh7", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -183,6 +203,10 @@ { "address": "fairy13sv36pmhz0ckvzwtvwgk4ecu6chuf6nmdssjvm", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -192,6 +216,10 @@ { "address": "fairy13sjf5svx0xvrtwq8g4l86qmpv0qs05zvrgq72v", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -201,6 +229,10 @@ { "address": "fairy1nwdhwx0nn7e8ltfwtlgn43gu59swd056qs7pj5", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -210,6 +242,10 @@ { "address": "fairy15davlswu3dfud5zushgp0yam70p5cnu6w5vcfd", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -219,6 +255,10 @@ { "address": "fairy14qekdkj2nmmwea4ufg9n002a3pud23y8tcf8aa", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -228,6 +268,10 @@ { "address": "fairy146p637nkum6sfjj0x9etzpa40qrfdv3c5ccnmz", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -237,6 +281,10 @@ { "address": "fairy1cmly8rn75tp4pmdwjae39t8h7ttmd6ld85je6f", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -246,6 +294,10 @@ { "address": "fairy1lw4mm6yzry2xg3tj7swp80cw4s6w6vzvxfqml5", "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, { "denom": "ufairy", "amount": "500000000000" @@ -264,7 +316,7 @@ "consensus": null, "crisis": { "constant_fee": { - "denom": "ufairy", + "denom": "stake", "amount": "1000" } }, @@ -307,7 +359,7 @@ "params": { "min_deposit": [ { - "denom": "ufairy", + "denom": "stake", "amount": "10000000" } ], @@ -424,7 +476,7 @@ "annual_provisions": "0.000000000000000000" }, "params": { - "mint_denom": "ufairy", + "mint_denom": "stake", "inflation_rate_change": "0.130000000000000000", "inflation_max": "0.200000000000000000", "inflation_min": "0.070000000000000000", @@ -483,7 +535,7 @@ "max_validators": 100, "max_entries": 7, "historical_entries": 10000, - "bond_denom": "ufairy", + "bond_denom": "stake", "min_commission_rate": "0.000000000000000000" }, "last_total_power": "0", From 4d5d6d1394168b66dede2034c46bbc6e34b438a5 Mon Sep 17 00:00:00 2001 From: p0p3yee Date: Wed, 27 Dec 2023 14:38:17 -0500 Subject: [PATCH 3/6] Update readme --- networks/testnets/fairytest-3/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/networks/testnets/fairytest-3/README.md b/networks/testnets/fairytest-3/README.md index 9a7c0c6f..cf204d03 100644 --- a/networks/testnets/fairytest-3/README.md +++ b/networks/testnets/fairytest-3/README.md @@ -128,7 +128,7 @@ fairyringd tendermint unsafe-reset-all ```shell fairyringd gentx \ [account_key_name] \ - 100000000000ufairy \ + 100000000000stake \ --commission-max-change-rate 0.01 \ --commission-max-rate 0.2 \ --commission-rate 0.05 \ @@ -195,12 +195,12 @@ fairyringd start ```shell fairyringd tx staking create-validator \ - --amount 100000000000ufairy \ + --amount 100000000000stake \ --commission-max-change-rate 0.01 \ --commission-max-rate 0.2 \ --commission-rate 0.1 \ --from [account_key_name] \ - --fees 400000ufairy \ + --fees 400000stake \ --min-self-delegation 1 \ --moniker [validator_moniker] \ --pubkey $(fairyringd tendermint show-validator) \ From 54c66f697b890f85ee782368f54565f7d632d271 Mon Sep 17 00:00:00 2001 From: p0p3yee Date: Wed, 27 Dec 2023 14:53:32 -0500 Subject: [PATCH 4/6] Add gentxs & peers --- networks/testnets/fairytest-3/gentxs/gentx-fairblock.json | 1 + networks/testnets/fairytest-3/peers/peers-fairblock | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 networks/testnets/fairytest-3/gentxs/gentx-fairblock.json create mode 100644 networks/testnets/fairytest-3/peers/peers-fairblock diff --git a/networks/testnets/fairytest-3/gentxs/gentx-fairblock.json b/networks/testnets/fairytest-3/gentxs/gentx-fairblock.json new file mode 100644 index 00000000..f0739329 --- /dev/null +++ b/networks/testnets/fairytest-3/gentxs/gentx-fairblock.json @@ -0,0 +1 @@ +{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"fairblock","identity":"","website":"https://fairblock.network","security_contact":"hello@fairblock.network","details":"Fairblock"},"commission":{"rate":"0.050000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"fairy1zrpp7dfav7kancgse2peh3k98u9ueajwvq4w4q","validator_address":"fairyvaloper1zrpp7dfav7kancgse2peh3k98u9ueajwhmnm3y","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"03vG/iogYilO9qeSoVIJIZl6QC3ARWFgqSwhQ621z3g="},"value":{"denom":"stake","amount":"100000000000"}}],"memo":"cd1cbf64a3e85d511c2a40b9e3e7b2e9b40d5905@172.31.18.9:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A8S5yG2QJE4nV1vCObdnbouIkooccDzAO1GHX9fSQ1x/"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":["NH+UhG6fgWMo8JJNuqN5ppHMslpKOXg7gwmrtsu1ShQ4QXygT8K2nwoAarckcnlV5yc9p8K3OYXb3MobGn9t7Q=="]} \ No newline at end of file diff --git a/networks/testnets/fairytest-3/peers/peers-fairblock b/networks/testnets/fairytest-3/peers/peers-fairblock new file mode 100644 index 00000000..c5914215 --- /dev/null +++ b/networks/testnets/fairytest-3/peers/peers-fairblock @@ -0,0 +1,5 @@ +{ + "node_id": "cd1cbf64a3e85d511c2a40b9e3e7b2e9b40d5905", + "public_ip": "18.183.243.242", + "port": "26656" +} From 017680a9c7bd0e1c11d5fa6ac86541c71d076f28 Mon Sep 17 00:00:00 2001 From: p0p3yee Date: Thu, 28 Dec 2023 10:54:18 -0500 Subject: [PATCH 5/6] Fix packet can't be unmarshal --- hermes_config.toml | 4 ++++ proto/fairyring/pep/packet.proto | 4 ++-- x/pep/keeper/current_keys.go | 6 +++++- x/pep/module_ibc.go | 2 +- x/pep/types/codec.go | 8 ++++---- x/pep/types/current_keys.go | 8 ++++++-- x/pep/types/packet.pb.go | 18 +++++++++--------- 7 files changed, 31 insertions(+), 19 deletions(-) diff --git a/hermes_config.toml b/hermes_config.toml index 294a29f5..3c9d7a02 100644 --- a/hermes_config.toml +++ b/hermes_config.toml @@ -1,5 +1,6 @@ [global] log_level = 'info' + [mode.clients] enabled = true refresh = true @@ -16,6 +17,7 @@ enabled = true clear_interval = 100 clear_on_start = true tx_confirmation = false +auto_register_counterparty_payee = false [rest] enabled = false @@ -44,6 +46,7 @@ max_msg_num = 30 max_tx_size = 2097152 clock_drift = '5s' max_block_time = '30s' +trusting_period = '14days' memo_prefix = '' sequential_batch_tx = false @@ -76,6 +79,7 @@ max_msg_num = 30 max_tx_size = 2097152 clock_drift = '5s' max_block_time = '30s' +trusting_period = '14days' memo_prefix = '' sequential_batch_tx = false diff --git a/proto/fairyring/pep/packet.proto b/proto/fairyring/pep/packet.proto index 9ec7aaa4..aa2005b5 100644 --- a/proto/fairyring/pep/packet.proto +++ b/proto/fairyring/pep/packet.proto @@ -21,6 +21,6 @@ message CurrentKeysPacketData { // CurrentKeysPacketAck defines a struct for the packet acknowledgment message CurrentKeysPacketAck { - ActivePubKey activeKey = 2; - QueuedPubKey queuedKey = 3; + ActivePubKey activeKey = 1; + QueuedPubKey queuedKey = 2; } diff --git a/x/pep/keeper/current_keys.go b/x/pep/keeper/current_keys.go index f4967978..6b30e947 100644 --- a/x/pep/keeper/current_keys.go +++ b/x/pep/keeper/current_keys.go @@ -2,6 +2,7 @@ package keeper import ( "errors" + cosmoserror "github.com/cosmos/cosmos-sdk/types/errors" "time" "fairyring/x/pep/types" @@ -61,7 +62,10 @@ func (k Keeper) TransmitCurrentKeysPacket( return sdkerrors.Wrap(channeltypes.ErrChannelCapabilityNotFound, "module does not own channel capability") } - packetBytes := packetData.GetBytes() + packetBytes, err := packetData.GetBytes() + if err != nil { + return sdkerrors.Wrap(cosmoserror.ErrJSONMarshal, "cannot marshal the packet: "+err.Error()) + } if _, err := k.ChannelKeeper.SendPacket(ctx, channelCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, packetBytes); err != nil { return err diff --git a/x/pep/module_ibc.go b/x/pep/module_ibc.go index 4640db83..8edd84dc 100644 --- a/x/pep/module_ibc.go +++ b/x/pep/module_ibc.go @@ -194,7 +194,7 @@ func (im IBCModule) OnAcknowledgementPacket( // this line is used by starport scaffolding # oracle/packet/module/ack var modulePacketData types.PepPacketData - if err := modulePacketData.Unmarshal(modulePacket.GetData()); err != nil { + if err := types.ModuleCdc.UnmarshalJSON(modulePacket.GetData(), &modulePacketData); err != nil { return sdkerrors.Wrapf(cosmoserror.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error()) } diff --git a/x/pep/types/codec.go b/x/pep/types/codec.go index d36fe726..835af657 100644 --- a/x/pep/types/codec.go +++ b/x/pep/types/codec.go @@ -46,7 +46,7 @@ func init() { // NOTE: Copied from https://github.com/cosmos/cosmos-sdk/blob/971c542453e0972ef1dfc5a80159ad5049c7211c/codec/json.go // and modified in order to allow `EmitDefaults` to be set to false for ics20 packet marshalling. // This allows for the introduction of the memo field to be backwards compatible. -func MustProtoMarshalJSON(msg proto.Message) []byte { +func MustProtoMarshalJSON(msg proto.Message) ([]byte, error) { anyResolver := cdctypes.NewInterfaceRegistry() // EmitDefaults is set to false to prevent marshalling of unpopulated fields (memo) @@ -59,13 +59,13 @@ func MustProtoMarshalJSON(msg proto.Message) []byte { err := cdctypes.UnpackInterfaces(msg, cdctypes.ProtoJSONPacker{JSONPBMarshaler: jm}) if err != nil { - panic(err) + return nil, err } buf := new(bytes.Buffer) if err := jm.Marshal(buf, msg); err != nil { - panic(err) + return nil, err } - return buf.Bytes() + return buf.Bytes(), err } diff --git a/x/pep/types/current_keys.go b/x/pep/types/current_keys.go index 32768ee9..173844c8 100644 --- a/x/pep/types/current_keys.go +++ b/x/pep/types/current_keys.go @@ -8,10 +8,14 @@ func (p CurrentKeysPacketData) ValidateBasic() error { } // GetBytes is a helper for serialising -func (p CurrentKeysPacketData) GetBytes() []byte { +func (p CurrentKeysPacketData) GetBytes() ([]byte, error) { var modulePacket PepPacketData modulePacket.Packet = &PepPacketData_CurrentKeysPacket{&p} - return sdk.MustSortJSON(MustProtoMarshalJSON(&modulePacket)) + b, err := MustProtoMarshalJSON(&modulePacket) + if err != nil { + return nil, err + } + return sdk.MustSortJSON(b), nil } diff --git a/x/pep/types/packet.pb.go b/x/pep/types/packet.pb.go index f5387f87..c19c9a24 100644 --- a/x/pep/types/packet.pb.go +++ b/x/pep/types/packet.pb.go @@ -182,8 +182,8 @@ var xxx_messageInfo_CurrentKeysPacketData proto.InternalMessageInfo // CurrentKeysPacketAck defines a struct for the packet acknowledgment type CurrentKeysPacketAck struct { - ActiveKey *ActivePubKey `protobuf:"bytes,2,opt,name=activeKey,proto3" json:"activeKey,omitempty"` - QueuedKey *QueuedPubKey `protobuf:"bytes,3,opt,name=queuedKey,proto3" json:"queuedKey,omitempty"` + ActiveKey *ActivePubKey `protobuf:"bytes,1,opt,name=activeKey,proto3" json:"activeKey,omitempty"` + QueuedKey *QueuedPubKey `protobuf:"bytes,2,opt,name=queuedKey,proto3" json:"queuedKey,omitempty"` } func (m *CurrentKeysPacketAck) Reset() { *m = CurrentKeysPacketAck{} } @@ -255,12 +255,12 @@ var fileDescriptor_69dc34a7ea22bf8e = []byte{ 0x1d, 0xd4, 0x28, 0x4c, 0x03, 0x9c, 0x38, 0xb8, 0xd8, 0x20, 0x9e, 0x52, 0xe2, 0xe0, 0x62, 0x83, 0xd8, 0xa9, 0x24, 0xce, 0x25, 0x8a, 0xd5, 0x04, 0xa5, 0x1e, 0x46, 0x2e, 0x11, 0x0c, 0x19, 0xc7, 0xe4, 0x6c, 0x21, 0x4b, 0x2e, 0xce, 0xc4, 0xe4, 0x92, 0xcc, 0xb2, 0x54, 0xef, 0xd4, 0x4a, 0xa8, - 0x9b, 0xa4, 0xd1, 0xdc, 0xe4, 0x08, 0x96, 0x0f, 0x28, 0x4d, 0xf2, 0x4e, 0xad, 0x0c, 0x42, 0xa8, - 0x06, 0x69, 0x2d, 0x2c, 0x4d, 0x2d, 0x4d, 0x4d, 0x01, 0x69, 0x65, 0xc6, 0xaa, 0x35, 0x10, 0x2c, + 0x7f, 0xa4, 0xd1, 0xdc, 0xe4, 0x08, 0x96, 0x0f, 0x28, 0x4d, 0xf2, 0x4e, 0xad, 0x0c, 0x42, 0xa8, + 0x06, 0x69, 0x2d, 0x2c, 0x4d, 0x2d, 0x4d, 0x4d, 0x01, 0x69, 0x65, 0xc2, 0xaa, 0x35, 0x10, 0x2c, 0x0f, 0xd3, 0x0a, 0x57, 0xed, 0xa4, 0x7f, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xa2, 0x88, 0xb8, 0xa8, 0x00, 0xc7, 0x46, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, - 0x32, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x46, 0x47, 0xf2, 0x92, 0xd6, 0x01, 0x00, 0x00, + 0x32, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x7d, 0x51, 0x1e, 0xd6, 0x01, 0x00, 0x00, } func (m *PepPacketData) Marshal() (dAtA []byte, err error) { @@ -413,7 +413,7 @@ func (m *CurrentKeysPacketAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintPacket(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if m.ActiveKey != nil { { @@ -425,7 +425,7 @@ func (m *CurrentKeysPacketAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintPacket(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -767,7 +767,7 @@ func (m *CurrentKeysPacketAck) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: CurrentKeysPacketAck: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 2: + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ActiveKey", wireType) } @@ -803,7 +803,7 @@ func (m *CurrentKeysPacketAck) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueuedKey", wireType) } From f9013c638d2e78b3bb3dd9df3db221646dfa6070 Mon Sep 17 00:00:00 2001 From: p0p3yee Date: Thu, 28 Dec 2023 11:47:40 -0500 Subject: [PATCH 6/6] Update genesis file --- networks/testnets/fairytest-3/genesis.json | 45 +++++++++++++++------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/networks/testnets/fairytest-3/genesis.json b/networks/testnets/fairytest-3/genesis.json index 5080e2f1..24c10fb0 100644 --- a/networks/testnets/fairytest-3/genesis.json +++ b/networks/testnets/fairytest-3/genesis.json @@ -112,7 +112,7 @@ }, { "@type": "/cosmos.auth.v1beta1.BaseAccount", - "address": "fairy1cmly8rn75tp4pmdwjae39t8h7ttmd6ld85je6f", + "address": "fairy1r6q07ne3deq64ezcjwkedcfe6669f0ewpwnxy9", "pub_key": null, "account_number": "11", "sequence": "0" @@ -123,6 +123,13 @@ "pub_key": null, "account_number": "12", "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "fairy1t8eh66t2w5k67kwurmn5gqhtq6d2ja0v8lg8pl", + "pub_key": null, + "account_number": "13", + "sequence": "0" } ] }, @@ -148,6 +155,19 @@ } ] }, + { + "address": "fairy1r6q07ne3deq64ezcjwkedcfe6669f0ewpwnxy9", + "coins": [ + { + "denom": "stake", + "amount": "500000000000" + }, + { + "denom": "ufairy", + "amount": "500000000000" + } + ] + }, { "address": "fairy1ffm2sadwyurzkgtfhm3ctttc5qxjsgayex8prk", "coins": [ @@ -188,7 +208,7 @@ ] }, { - "address": "fairy1t5rvpy4aefapvsws2zhzgsfgl8d9actpmarwh7", + "address": "fairy1t8eh66t2w5k67kwurmn5gqhtq6d2ja0v8lg8pl", "coins": [ { "denom": "stake", @@ -201,7 +221,7 @@ ] }, { - "address": "fairy13sv36pmhz0ckvzwtvwgk4ecu6chuf6nmdssjvm", + "address": "fairy1t5rvpy4aefapvsws2zhzgsfgl8d9actpmarwh7", "coins": [ { "denom": "stake", @@ -214,7 +234,7 @@ ] }, { - "address": "fairy13sjf5svx0xvrtwq8g4l86qmpv0qs05zvrgq72v", + "address": "fairy13sv36pmhz0ckvzwtvwgk4ecu6chuf6nmdssjvm", "coins": [ { "denom": "stake", @@ -227,7 +247,7 @@ ] }, { - "address": "fairy1nwdhwx0nn7e8ltfwtlgn43gu59swd056qs7pj5", + "address": "fairy13sjf5svx0xvrtwq8g4l86qmpv0qs05zvrgq72v", "coins": [ { "denom": "stake", @@ -240,7 +260,7 @@ ] }, { - "address": "fairy15davlswu3dfud5zushgp0yam70p5cnu6w5vcfd", + "address": "fairy1nwdhwx0nn7e8ltfwtlgn43gu59swd056qs7pj5", "coins": [ { "denom": "stake", @@ -253,7 +273,7 @@ ] }, { - "address": "fairy14qekdkj2nmmwea4ufg9n002a3pud23y8tcf8aa", + "address": "fairy15davlswu3dfud5zushgp0yam70p5cnu6w5vcfd", "coins": [ { "denom": "stake", @@ -266,7 +286,7 @@ ] }, { - "address": "fairy146p637nkum6sfjj0x9etzpa40qrfdv3c5ccnmz", + "address": "fairy14qekdkj2nmmwea4ufg9n002a3pud23y8tcf8aa", "coins": [ { "denom": "stake", @@ -279,7 +299,7 @@ ] }, { - "address": "fairy1cmly8rn75tp4pmdwjae39t8h7ttmd6ld85je6f", + "address": "fairy146p637nkum6sfjj0x9etzpa40qrfdv3c5ccnmz", "coins": [ { "denom": "stake", @@ -443,9 +463,7 @@ "params": { "key_expiry": "100", "trusted_addresses": [ - "fairy1cmly8rn75tp4pmdwjae39t8h7ttmd6ld85je6f", - "fairy1t5rvpy4aefapvsws2zhzgsfgl8d9actpmarwh7", - "fairy1lw4mm6yzry2xg3tj7swp80cw4s6w6vzvxfqml5" + "fairy1r6q07ne3deq64ezcjwkedcfe6669f0ewpwnxy9" ], "slash_fraction_no_keyshare": "0.00001000000000000", "slash_fraction_wrong_keyshare": "0.00001000000000000", @@ -495,7 +513,8 @@ } ], "trusted_addresses": [ - "fairy1cmly8rn75tp4pmdwjae39t8h7ttmd6ld85je6f" + "fairy1t8eh66t2w5k67kwurmn5gqhtq6d2ja0v8lg8pl", + "fairy1r6q07ne3deq64ezcjwkedcfe6669f0ewpwnxy9" ], "channel_id": "channel-0", "minGasPrice": {