From 606577e9a915db128ea1935d7dc48b444839e44c Mon Sep 17 00:00:00 2001 From: Dmitry S <11892559+swift1337@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:32:30 +0200 Subject: [PATCH 1/6] Update code owners (#2343) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 54b0f62d42..65567bd2ab 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ -* @brewmaster012 @kingpinXD @lumtis @ws4charlie @skosito +* @brewmaster012 @kingpinXD @lumtis @ws4charlie @skosito @swift1337 .github/** @zeta-chain/devops From 14bbf104a3cd6882871acdc24a8f61e05cd7f091 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 18 Jun 2024 18:50:34 +0300 Subject: [PATCH 2/6] docs: fix URLs in the syncing issue template (#2346) --- .github/ISSUE_TEMPLATE/syncing.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/syncing.yaml b/.github/ISSUE_TEMPLATE/syncing.yaml index 2db27f7291..17884a3b32 100644 --- a/.github/ISSUE_TEMPLATE/syncing.yaml +++ b/.github/ISSUE_TEMPLATE/syncing.yaml @@ -10,14 +10,14 @@ body: - type: dropdown attributes: label: Does your machine match the technical requirements? - description: See https://www.zetachain.com/docs/validators/requirements/ + description: See https://www.zetachain.com/docs/nodes/start-here/requirements/ options: - "Yes" - "No" - type: dropdown attributes: label: Have you completed the setup? - description: See https://www.zetachain.com/docs/validators/setup/ + description: See https://www.zetachain.com/docs/nodes/start-here/setup/ options: - "Yes" - "No" From e822112711b58af1011966ba8e3b852a41639d1c Mon Sep 17 00:00:00 2001 From: Charlie Chen <34498985+ws4charlie@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:09:00 -0500 Subject: [PATCH 3/6] fix: created btc dust amount constant and renaming (#2327) * renamed BtcDustOffset as BtcNonceMarkOffset and created constant BTCWithdrawalDustAmount * added changelog entry --- changelog.md | 1 + pkg/chains/chains.go | 3 ++- pkg/chains/conversion.go | 2 +- pkg/constant/constant.go | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 1dfe34192d..41d63adac2 100644 --- a/changelog.md +++ b/changelog.md @@ -66,6 +66,7 @@ * [2233](https://github.com/zeta-chain/node/pull/2233) - fix `IsSupported` flag not properly updated in zetaclient's context * [2243](https://github.com/zeta-chain/node/pull/2243) - fix incorrect bitcoin outbound height in the CCTX outbound parameter * [2256](https://github.com/zeta-chain/node/pull/2256) - fix rate limiter falsely included reverted non-withdraw cctxs +* [2327](https://github.com/zeta-chain/node/pull/2327) - partially cherry picked the fix to Bitcoin outbound dust amount ### CI diff --git a/pkg/chains/chains.go b/pkg/chains/chains.go index 61fffece76..11c6f952f0 100644 --- a/pkg/chains/chains.go +++ b/pkg/chains/chains.go @@ -265,7 +265,8 @@ var ( } ) -func BtcDustOffset() int64 { +// BtcNonceMarkOffset is the offset satoshi amount to calculate the nonce mark output +func BtcNonceMarkOffset() int64 { return 2000 } diff --git a/pkg/chains/conversion.go b/pkg/chains/conversion.go index 6a6a6f4091..200061c3ae 100644 --- a/pkg/chains/conversion.go +++ b/pkg/chains/conversion.go @@ -11,7 +11,7 @@ import ( // A very special value to mark current nonce in UTXO func NonceMarkAmount(nonce uint64) int64 { // #nosec G701 always in range - return int64(nonce) + BtcDustOffset() // +2000 to avoid being a dust rejection + return int64(nonce) + BtcNonceMarkOffset() } // HashToString convert hash bytes to string diff --git a/pkg/constant/constant.go b/pkg/constant/constant.go index 9a81e1d8b2..62f898e85d 100644 --- a/pkg/constant/constant.go +++ b/pkg/constant/constant.go @@ -10,4 +10,7 @@ const ( // CmdMigrateTssFunds is used for CCTX of type cmd to give the instruction to the TSS to transfer its funds on a new address CmdMigrateTssFunds = "cmd_migrate_tss_funds" + + // BTCWithdrawalDustAmount is the minimum satoshis that can be withdrawn from zEVM to avoid outbound dust output + BTCWithdrawalDustAmount = 1000 ) From d4a9f7dfb454e5498b577085b7afe6f48c4c2021 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Wed, 19 Jun 2024 08:14:35 -0700 Subject: [PATCH 4/6] chore: delete static zetacore/zetaclient config/keys (#2351) --- Dockerfile-localnet | 2 - .../preparams/PreParams_zetaclient0.json | 1 - .../preparams/PreParams_zetaclient1.json | 1 - .../preparams/PreParams_zetaclient2.json | 1 - .../preparams/PreParams_zetaclient3.json | 1 - contrib/localnet/scripts/start-zetaclientd.sh | 3 - .../tss/zetaclient0/address_book.seed | 2 - ...m5ly33l0j6sze64l265meggyw3wph6sv064me.json | 1 - .../tss/zetaclient1/address_book.seed | 2 - ...m5ly33l0j6sze64l265meggyw3wph6sv064me.json | 1 - .../zetacored_zetacore0/config/app.toml | 283 ------ .../zetacored_zetacore0/config/client.toml | 17 - .../zetacored_zetacore0/config/config.toml | 463 ---------- .../zetacored_zetacore0/config/genesis.json | 810 ------------------ ...f847b3c8b4fc599b4434b1f234a95de70cdc2.json | 1 - ...33926bd0e54244bd5189f64be9a5bd3754599.json | 1 - .../zetacored_zetacore0/config/node_key.json | 1 - .../config/priv_validator_key.json | 11 - ...afb7adbea65fde95a1a3e084a203227060.address | 1 - ...2a61491655e2786ae0d127d6990bfbfbde.address | 1 - .../keyring-test/val_grantee_observer.info | 1 - .../keyring-test/val_tss_signer.info | 1 - .../keyring-test/val_zetaclient_grantee.info | 1 - .../priv_validator_state.json | 5 - .../zetacored_zetacore1/config/app.toml | 283 ------ .../zetacored_zetacore1/config/client.toml | 17 - .../zetacored_zetacore1/config/config.toml | 463 ---------- .../zetacored_zetacore1/config/genesis.json | 810 ------------------ ...33926bd0e54244bd5189f64be9a5bd3754599.json | 61 -- .../zetacored_zetacore1/config/node_key.json | 1 - .../config/priv_validator_key.json | 11 - ...f1884bbf3bbfc6a689cc0d1afc550c320d.address | 1 - ...ec16513118d598d336d70834837292224a.address | 1 - .../keyring-test/val_grantee_observer.info | 1 - .../keyring-test/val_tss_signer.info | 1 - .../keyring-test/val_zetaclient_grantee.info | 1 - .../priv_validator_state.json | 5 - .../keyring-test/val_grantee_observer.info | 1 - .../keyring-test/val_grantee_observer.info | 1 - 39 files changed, 3270 deletions(-) delete mode 100644 contrib/localnet/preparams/PreParams_zetaclient0.json delete mode 100644 contrib/localnet/preparams/PreParams_zetaclient1.json delete mode 100644 contrib/localnet/preparams/PreParams_zetaclient2.json delete mode 100644 contrib/localnet/preparams/PreParams_zetaclient3.json delete mode 100644 contrib/localnet/tss/zetaclient0/address_book.seed delete mode 100644 contrib/localnet/tss/zetaclient0/localstate-zetapub1addwnpepqt9km47ldtun5nemm5nuusm5ly33l0j6sze64l265meggyw3wph6sv064me.json delete mode 100644 contrib/localnet/tss/zetaclient1/address_book.seed delete mode 100644 contrib/localnet/tss/zetaclient1/localstate-zetapub1addwnpepqt9km47ldtun5nemm5nuusm5ly33l0j6sze64l265meggyw3wph6sv064me.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/config/app.toml delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/config/client.toml delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/config/config.toml delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/config/genesis.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/config/gentx/gentx-baef847b3c8b4fc599b4434b1f234a95de70cdc2.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/config/gentx/gentx-c9733926bd0e54244bd5189f64be9a5bd3754599.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/config/node_key.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/config/priv_validator_key.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/2b8526afb7adbea65fde95a1a3e084a203227060.address delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/813ac22a61491655e2786ae0d127d6990bfbfbde.address delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_grantee_observer.info delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_tss_signer.info delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_zetaclient_grantee.info delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore0/priv_validator_state.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/config/app.toml delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/config/client.toml delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/config/config.toml delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/config/genesis.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/config/gentx/gentx-c9733926bd0e54244bd5189f64be9a5bd3754599.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/config/node_key.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/config/priv_validator_key.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/dbfe49f1884bbf3bbfc6a689cc0d1afc550c320d.address delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/ffae40ec16513118d598d336d70834837292224a.address delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_grantee_observer.info delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_tss_signer.info delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_zetaclient_grantee.info delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore1/priv_validator_state.json delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore2/keyring-test/val_grantee_observer.info delete mode 100644 contrib/localnet/zetacored/zetacored_zetacore3/keyring-test/val_grantee_observer.info diff --git a/Dockerfile-localnet b/Dockerfile-localnet index ee16e6282b..40ab112af1 100644 --- a/Dockerfile-localnet +++ b/Dockerfile-localnet @@ -44,10 +44,8 @@ RUN mkdir -p /root/.zetacored/cosmovisor/genesis/bin && \ ENV PATH /root/.zetacored/cosmovisor/current/bin/:/root/.zetaclientd/upgrades/current/:${PATH} COPY contrib/localnet/scripts /root -COPY contrib/localnet/preparams /root/preparams COPY contrib/localnet/ssh_config /root/.ssh/config COPY contrib/localnet/zetacored /root/zetacored -COPY contrib/localnet/tss /root/tss RUN chmod 755 /root/*.sh diff --git a/contrib/localnet/preparams/PreParams_zetaclient0.json b/contrib/localnet/preparams/PreParams_zetaclient0.json deleted file mode 100644 index 1658607f55..0000000000 --- a/contrib/localnet/preparams/PreParams_zetaclient0.json +++ /dev/null @@ -1 +0,0 @@ -{"PaillierSK":{"N":21904019810316554615180853778019346893657404209216283461609033688814436234120092105916095611677205183538599487765134141173912794311741457265350340439546270166426989419797064519971531768290032333491309520641961972683208865660072415581591938831176157899248009350581460600167235833025504925830756606485113622052718059533565408418057298520893768615410816660423449864631064561539262015863384428833122993905598067825766793095119101127861017044997730367322950572508461683163619101445165409205064698881287927199542272004244189566165714604550516594909749903344129429793068478538464446848820212727866101844857827426421299044137,"LambdaN":10952009905158277307590426889009673446828702104608141730804516844407218117060046052958047805838602591769299743882567070586956397155870728632675170219773135083213494709898532259985765884145016166745654760320980986341604432830036207790795969415588078949624004675290730300083617916512752462915378303242556811026210892184132197492599772746468767839954977647117939051747118398200521290427810736437411397854788761338046871347767465739422954313895260797616579589818242988770479872522949764062085332302357502846752265528051567166469601079681006656057479399141791971947734325567142594629283847761003076786773404570524278896258,"PhiN":21904019810316554615180853778019346893657404209216283461609033688814436234120092105916095611677205183538599487765134141173912794311741457265350340439546270166426989419797064519971531768290032333491309520641961972683208865660072415581591938831176157899248009350581460600167235833025504925830756606485113622052421784368264394985199545492937535679909955294235878103494236796401042580855621472874822795709577522676093742695534931478845908627790521595233159179636485977540959745045899528124170664604715005693504531056103134332939202159362013312114958798283583943895468651134285189258567695522006153573546809141048557792516},"NTildei":28611679819871826710887371529215487705595764493797659050881815203076316252020259342857903569357961559870987893292520051012002190003169912272939843636915944869123311829188271046875034636027521187849685736951378303879886288579478612117158044356445770321229778647118254940336776308010756643634617931124774718502157142512925938956792452417206255658576012563588155546113550196738102821059206970732382430480269079741734037010384164605109851585552133971056693023703698610328223040022368448888402732597048724431552710645710274191985991438015845964382790125094655343061801698917889034274794677660031348696495517768112395830741,"H1i":485017103277658489814913905829618981958261308300045007738040341636889405473289925315700153994593802473245056475227060927655263425235470243287837812362429087136072476964134334260435187081973792221938289583440932728980704672849813085907424010152380604885552734022743616120550112226856328317797301420673950308129999616069168147893859295703910421801887585722413840739674236338373722953932444007719043018837716695818264705757943709141757252224635296818993123602862860546550690995845983167307149672707089629795404084546425310958466789354703197443054651992495495383093781909607620201366613685635383931135819933506352177625,"H2i":9762770588330279569061983974817538499629373683475991784895950382529434618056574839906399899799580892746197253019739520199918417157334156538145650396015276613637599518464263750369229083362727921947750542416617325666598740004157868410256901446088412800224219719371952968321496318510170732801761070049010226460003034393745942815605950790391873888556154300587540500224353478595439385508031181767252071752825177391017676928039264600331688350767109297945539125043653437871146573181476252816504345479106356177498812478762235413588771495062664696094947877236428301688894980410229390509963054978049320044984611525519428895194,"Alpha":3923069068910587811759886839259866063479445282165924520728472757889727408052475597113922916290809945769280995538645696380392628461512025656232034879542974665002996959663147467377717916161890211873064786092044066337393080989152382562208757814414646033416726436543446926197995096133760807893658708134260601611283084403920766043661934504385706163901813501198782234257549013661826867285807605439526550000696311495681106950211680655758210351714117738836311186014809290716845919296850051691555726818392124317949599120731496530085866110361306283980180704787829228202949824539589700848566375320625593385688490391466284829294,"Beta":3047426629555310780352598709864457466463110666069957314638775476683862811499879218386375606595624424692813435196101577035153365049926654156313314807998882195121620021542850588001845737255585421006872962476925039385448354407345211700106380577591081910499770015289441377190790376011472314137621601344988551613109620180297894641173881459580629449580087230127100225561901742692415167135719878270584637468446931499166393093931095762083519672243751735707937057943187672529552296521000643763726919827700416735433774935376302464423946895574621899718309274592338640101458381735101153383163195185944813099787870087479822244015,"P":87913587681936920731117143755014343842297665562480345511248527003425508633602781670842552655761727350595186069373032907582296702854206795118764144842929460087418934588905537300149040015498451276787482447436751904827805278752497505905070394775619820571427800308639533829417553155944968490003853204132309294453,"Q":81363076443274585836028702215040175434111537701853171194310900757585930773295982811994451250025996920407027372440515444847067768055611972985068892595597610056411071825587389602611622175134221148308374450543478472530648915697541335665322806406541129479345222413121255071035937712148479713072420973827924486431} diff --git a/contrib/localnet/preparams/PreParams_zetaclient1.json b/contrib/localnet/preparams/PreParams_zetaclient1.json deleted file mode 100644 index a28762c501..0000000000 --- a/contrib/localnet/preparams/PreParams_zetaclient1.json +++ /dev/null @@ -1 +0,0 @@ -{"PaillierSK":{"N":23950384858094511553436315358520965722590165448190156522327831221398150200540950661693041172777518279623646044978150971495419705450324596019747379578962255559229118582822958115767794657766455443220017894643511956226554642119496874921444603118121297655763420494222309630007136196440326864437508301569054126596494283920430288917553844473492734349517877424426764143720882609663933412885099436112127307977238685323605565588765806982082194873869647171435980833887426543830551370302820106847478812769597196123845801454541740592138426121113081030060721468596428686211135256588962932154645290900406171158630703601711408818301,"LambdaN":11975192429047255776718157679260482861295082724095078261163915610699075100270475330846520586388759139811823022489075485747709852725162298009873689789481127779614559291411479057883897328883227721610008947321755978113277321059748437460722301559060648827881710247111154815003568098220163432218754150784527063298091429825541707811361878880871834418994585601761036070250907878947837762925838882077363550651356241074880926163937181864030138179563299562886034262553660885688080028871420035177783501807456895998896897972780595644853268799720271692473609594668806490823344736424590934035325801688917366456232531994007444757086,"PhiN":23950384858094511553436315358520965722590165448190156522327831221398150200540950661693041172777518279623646044978150971495419705450324596019747379578962255559229118582822958115767794657766455443220017894643511956226554642119496874921444603118121297655763420494222309630007136196440326864437508301569054126596182859651083415622723757761743668837989171203522072140501815757895675525851677764154727101302712482149761852327874363728060276359126599125772068525107321771376160057742840070355567003614913791997793795945561191289706537599440543384947219189337612981646689472849181868070651603377834732912465063988014889514172},"NTildei":28279495343513500834135175666178643616564489831794048004719806118040378549233247091287720476568323991454355597863847765209470226085707089949701577227799232989776752071182322723549179376371202676118305757212780626426798368563788677977377093567967462290780872705344555278207990939758855369568602448908586203736446037903587426329519298600786387227234343152175355472577125675245793508879542394445383706998788865691974980673900927230425796366625227730777644985536945600577310207718811979980133131845641189439545297020731273155639959212210999779789556259429057132422213858887105005698064500862923006262348552650039825169173,"H1i":19162703757723491814501898440167107808688891112704792798342467276795312217495499920722224457838012406453452328757338150758842255047640433322141467118840414922526091590381458445476975802201212175761183843317843427031152262373569926308908222733452120708273581985729585194893203205301592223895927198191971932281525287352132186176001678775982830374263546868892448841779004817865504733372517356888072783643526264321834565233560262212984358857422646302256388910005538239846618996141193796753010639175439420606583079078523528286224342368712587203998302074102717200586915058022245351784637762252844778892424881908227576782279,"H2i":19315502741580888195772649878037148542759507162553276060508901168051412557826772079589679544264177752596822422572175413289477303180064084298293033612411639342867997610252718810102341324283775236721196394745457202162301858866442315394176420550068093758483621208659347157042302798071056441231096669329426349349628389120983569489393401825147308079079062634593191918687437531462533444728595098107782436761018474261845751443604153644815279798859780153040361257691184267869408617536441450582676595580494424079224565450778231022219395470505160668136672368005198570140673467793290641994239899243929117495944950156678978705490,"Alpha":27835615213329968841289050438654818005496694944630515953754512786564014864093637340488759057676644160061734483875004803138440665924881924299753556899240241079152229244897459681889527467760414904811824453489848346545785908223201924657557328896285148608676237630300820215143306660284371346462791418460794556252372251645958226107056958494964017738712582686606214640321027203767366851209133042255856763570266123404393185477889205093174132908716096426123418968154989419647054042737970050051373435245927332794200187632245564833702439266199852508335523420272458789411213782648671405493717652010685018976432010219670591758393,"Beta":1747616609853958502785494310882970629542087984732732475105362616872371192886816095838386801999552130435853102474621009326633867569508322069042648157816720150024170971303277613054498028497302230087623399896811080741801332623114334913649993736464260250689320136005204966908784474986856269386641834688277249261457169875188022675531773061791822216794465325219775482362852264198764580912359649655631733360087299871471671668202024594116799036419190595327402906891759775107957746348330758155964844272600377926402549773105698696460596300218013430252039167256435715093122581449937975994274083985405623297967790169486124765579,"P":83719913001974500076663726685773729406578946826189117106878750675158134737081690011577693447614299765484937059327129991048282331452789518256129680208622096220524008231345310188242138100415736790953989974617425196880689767000664675821109192257889429262185087098302140194423511465660144880009334064871704137573,"Q":84446741311253334811046952611741075201763027805713703870742099395568410001375396217756919314834569008060034770897265058808211043881366686858566929288230567431400870589246808334514606439581691297755555676039190711697816305457707450130476616081428639823780133373072697078763892358740649414011848519028737923279} diff --git a/contrib/localnet/preparams/PreParams_zetaclient2.json b/contrib/localnet/preparams/PreParams_zetaclient2.json deleted file mode 100644 index 794d2a444a..0000000000 --- a/contrib/localnet/preparams/PreParams_zetaclient2.json +++ /dev/null @@ -1 +0,0 @@ -{"PaillierSK":{"N":26800269192333731798225075628572483939659983541124242266361990202106304028427985562619139641936581670726050677384943670430296743355905622845473349668345180758922153903742725338797929539566869382629385015437126766824806445587598320646759070168316793855767355161121402405504522207539430577823689080239734999127764004735961667326105811497368608497690592792084604778682820548237362392309181922248663028701614335608154598289025851099969952464758928168030093371461988324343462258078867425569129514941846904190531057630993892174313906089400605454953247608751966567492964904932120727427674103283083017576503035436413188463889,"LambdaN":13400134596166865899112537814286241969829991770562121133180995101053152014213992781309569820968290835363025338692471835215148371677952811422736674834172590379461076951871362669398964769783434691314692507718563383412403222793799160323379535084158396927883677580560701202752261103769715288911844540119867499563717709912325995366229904999697837744228415930643870545395362375900517511072996155182916571986494745247650350215347849387881789701709869511949784054703366216753276611695377742456023735417876610614448545359473493931269431282759755202903586916440638560912105037247946161491782970216160169546032071414161815388178,"PhiN":26800269192333731798225075628572483939659983541124242266361990202106304028427985562619139641936581670726050677384943670430296743355905622845473349668345180758922153903742725338797929539566869382629385015437126766824806445587598320646759070168316793855767355161121402405504522207539430577823689080239734999127435419824651990732459809999395675488456831861287741090790724751801035022145992310365833143972989490495300700430695698775763579403419739023899568109406732433506553223390755484912047470835753221228897090718946987862538862565519510405807173832881277121824210074495892322983565940432320339092064142828323630776356},"NTildei":28707366834501976507008202510873871474130864070852444645151123622509800510614836621989284542218228757396502789229007651717970650643677522155592324361232632011970594712581467576712474461551748942062087069938761232177442100947883514236717786790156800514190243273808778203103647862810039595511215402248452598470872802013761784540278514768530542792270327406669352269975870959914550913235433975446936744372645056025251517500190380641053362775879626661982215813966738363180233824732944980155473074149171160584786089889325114507816901977529514259306355107505673084546229269375642307740165028766398869131967137873629015644273,"H1i":23549168524511130624684862084992675240190121634728686328877191700114407120672509814576418745437357979535497267006959288496207674637734807042105243161614488626794864611445722621445519650061099338617396419198250478097012868524588420798077217154885318824897342457367430461542104595530285061394481561527045107659653243453987048596141536007242667284892760467707320839505936312930825228328656092912929745789780954804613579686480676214026263770995714015230439908380874988530652959565558316033425852324618120013503862674294588858012580518895232081857781531955768378929560668405073478089357964868700677720196080075576028481827,"H2i":1031987050538387415880889519211314938612103915112763658522354589015613502383575208698202664786821261225356372729751466897603753009047801078064123357961023084322414324318993161843254674019796193596417856055933914640382597876607963787635287197813028967635255981120388613603791327020861480607491721793008948095196693030195771221969744032535728580235350323231463170652343358759682300056950740182537742348737518485784960582117081359660455641221803047754166007696692345114466471416069512955062888512478907314815103582350618309186835246904773324403888250195806949054219350467793929284681780322167973971895495785251016239795,"Alpha":17052585165389290957989237813773751095015843241687647858182811523622733375636659344746299062055708996123302761737792573256874214315030852824921637570008580018078284334425904560272380386191764745733098772210979967769442547697186391283062948838228993227484037436142326604312274357821476885510159324512123629208467295343877310570808237887552935764860271986680595503852893440493755419008105528231682738492258481974865226745198362979023897928534930117420298624629869706330672486309041715778895324945845009249044525687315175556601444157159728231726013388848872162666444213195493170773710081783374681970775359700210157212893,"Beta":3479656292232416850580708378111206629845195513152367880728976100189473377776441096464623882435977004915460316750060310348187806911236761767355523822293099926876656540941819456062441781504457594582064933290499508866129609823593559756733731503034727727977106458420841875205244975716660020093839387462870004745769458875404478356244397275257971080689290566976671773014411840480256990588637145055594099102479277208221989776909937304657071595892091194946246222890629708221435730531897869226166956466076261296961516620093314592454560334108549313904892083722746642676524592189921926396101407174979463509025069548517707412077,"P":85782671812849456794746268617301041726371960672254368556485229843213966066274903311395767472200336545790951248892731881640435298314354993925104958593521290322432736606687880781995977199635613157100360073445193099376431125652417445283524895131201925608425503623827222470103714613838179771649621493976803680063,"Q":83663070372569919402812268686668160367595112677516920173938288676975193948435793411429973419400628580774679760036264353001967092674506090332409319296499441158948527385607614236826644776447879527733896043293296644945076930060194975861757872586438051079256640103219670117233426387168584987176458553027867838599} diff --git a/contrib/localnet/preparams/PreParams_zetaclient3.json b/contrib/localnet/preparams/PreParams_zetaclient3.json deleted file mode 100644 index bd9410c1b8..0000000000 --- a/contrib/localnet/preparams/PreParams_zetaclient3.json +++ /dev/null @@ -1 +0,0 @@ -{"PaillierSK":{"N":23170141009787538416620669915491940543607295133700842877123118664009582578924276213239953404636247204788537830520061266029391249189912247167248599196894216266871809388660933042769615173333523407618369009900537223255162240635370209121919240829309258477195934041411379690061328315785938464827668861415009595321814498684661185312316421608403814578537421313318178181282273449487748120966450511910855027963526956484478515437674662855665583075804332487932053565309219381053382265362966160191238474733382544177971629890222092466927582927673803533678578821270589461527336164213779737509390040931433595128764805793460354247641,"LambdaN":11585070504893769208310334957745970271803647566850421438561559332004791289462138106619976702318123602394268915260030633014695624594956123583624299598447108133435904694330466521384807586666761703809184504950268611627581120317685104560959620414654629238597967020705689845030664157892969232413834430707504797660754273680215211898007549028129515894183368144554247194744204155954995749468799349489185680438985023181154612295340391171845510691110107797053420188147574240707841869206170546961369047660500067237388535291949666888738474737834158000921040337108672473553074606274189998357355764439382643246740493006164046980442,"PhiN":23170141009787538416620669915491940543607295133700842877123118664009582578924276213239953404636247204788537830520061266029391249189912247167248599196894216266871809388660933042769615173333523407618369009900537223255162240635370209121919240829309258477195934041411379690061328315785938464827668861415009595321508547360430423796015098056259031788366736289108494389488408311909991498937598698978371360877970046362309224590680782343691021382220215594106840376295148481415683738412341093922738095321000134474777070583899333777476949475668316001842080674217344947106149212548379996714711528878765286493480986012328093960884},"NTildei":26418498767143792668297633830819558028045374285893440712825862648034256541019576843451764004592590094274655607372897827528692306017363289238612872015696000791436482898709005475031119292088126400925190092256710546025712709943646680162245681957165565742734460837855001253620475359690212291853796621218854694492012750417723166688314017149907365148180772203381396485476156952735177632697909824822933503214816003444203531012550110780310139555284886477789425250040066395274239181125076638624822858454130582387895742796628788655254707716866708504395587136137561118906788445680050972719536072811173268658325973855108963466997,"H1i":8416495191724937518844926057190825085549151953750872059928011268099113335117835077695974443056165649303101080820102244067381797365482153091087523059581806610402727947038507730066946461080522916649392556844142795628912186062480607591187629499492218157625963238360186762003775822673808553693827200873064109542742048091862928103023256153069955635478736641766529472809817667987886409243299936772757741807477857926820968608502134855395788624956539128160555378578648019392160769772453950385666205380648436280072094430070722519785888540883689824983549566722241221526644959113517860235210075332337501781722589127414237425107,"H2i":14219816599888359771757267474687164569450673722924861872275762779747573650084726940385245146911532243143378666498657880757352493091907894345090689620696354102549351845479221744887813290231109007704856853626120434658155525504662448775008546800576311246115930929306262111712267678957680676825475376029499235657254998543602629655996846523289829054842621155622387297445701134104136409224935331537252782342143114448335439662008514246884532746748013074505013737320488270459960219068693254230662024979535276177814830207192952969994685314563796497564978611846056145702266564388272573807102596467048009816460633906304221435164,"Alpha":26327565959899689871373223909868315071538806070429306675228914374737146857981937585800074512767578959993905769782927675240932650800711390052371266630149081669661430100504521195895363134940398876188689973778313663971290025367211634348389179756977564067200341001906639377320605017710823988593664264133428582627331856701469725102936018109810358785611004470965462883388627330744088705636724762395113371299467630644489554122288849428376432148481495787275327085296811623819917472447426912272348959644382697214113415794510738449837125990653549263337456961571414668887045590963347394302197017479341137180832286705957625625602,"Beta":5054672313013884526125326898724778082666136006099521445754658425947939109635210461834482328674887001810272957974842728176884186847692904549275503956803245497837960377513468125321931161321438767362413789281990246803385278334448086478077645477567119532355441360104131284550229229924515063941266865314947917579287901234983110505384325438282377034030892031728922632292922403302123860580102403217498233280945032577297829946889393724173390305277740887841987620259511141508383284365780224413458520399013652698191875726829683624263199733847139246817675960384181666038691551484251915049285322323167366196254677810529880207492,"P":85943076678103860270707054752836725634408468705966354056055256768592689783301780096151108020240912342504919763910150736806223910796814597910349006585468225312481174215504473505406722684162173061925357343260840274816656494366378411105731012470344941131592722748879866959770169079780055978939267799224371419231,"Q":76848827701657565122546525348717882189386347427780138237493802932715235539241825220093539887952010147008820444725634388468667117782256451404059476050559397069713639760757539979183414437217413624661119595018034831751382230778407747325931133099268129168363462767539026811796426860324701947903258991152183788709} diff --git a/contrib/localnet/scripts/start-zetaclientd.sh b/contrib/localnet/scripts/start-zetaclientd.sh index 32271a30b5..ff2a3b9b99 100755 --- a/contrib/localnet/scripts/start-zetaclientd.sh +++ b/contrib/localnet/scripts/start-zetaclientd.sh @@ -27,7 +27,6 @@ if [ "$HOTKEY_BACKEND" == "file" ]; then BACKEND="file" fi -cp /root/preparams/PreParams_$HOSTNAME.json /root/preParams.json num=$(echo $HOSTNAME | tr -dc '0-9') node="zetacore$num" @@ -42,7 +41,6 @@ echo "Start zetaclientd" # skip initialization if the config file already exists (zetaclientd init has already been run) if [[ $HOSTNAME == "zetaclient0" && ! -f ~/.zetacored/config/zetaclient_config.json ]] then - rm ~/.tss/* MYIP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) zetaclientd init --zetacore-url zetacore0 --chain-id athens_101-1 --operator "$operatorAddress" --log-format=text --public-ip "$MYIP" --keyring-backend "$BACKEND" @@ -63,7 +61,6 @@ then do SEED=$(curl --retry 10 --retry-delay 5 --retry-connrefused -s zetaclient0:8123/p2p) done - rm ~/.tss/* zetaclientd init --peer "/ip4/172.20.0.21/tcp/6668/p2p/${SEED}" --zetacore-url "$node" --chain-id athens_101-1 --operator "$operatorAddress" --log-format=text --public-ip "$MYIP" --log-level 1 --keyring-backend "$BACKEND" # check if the option is additional-evm diff --git a/contrib/localnet/tss/zetaclient0/address_book.seed b/contrib/localnet/tss/zetaclient0/address_book.seed deleted file mode 100644 index 4c5b9969f7..0000000000 --- a/contrib/localnet/tss/zetaclient0/address_book.seed +++ /dev/null @@ -1,2 +0,0 @@ -/ip4/172.20.0.21/tcp/6668/p2p/16Uiu2HAmPAxG9Qg4PaGNFKWZ9rAaiC1HYydAaEUZNx9CRaKwZGgN -/ip4/172.20.0.22/tcp/6668/p2p/16Uiu2HAmTsQh84fvHmv9kDYWEKn1c5dthvB1JRFr4872mJ3GQTFU diff --git a/contrib/localnet/tss/zetaclient0/localstate-zetapub1addwnpepqt9km47ldtun5nemm5nuusm5ly33l0j6sze64l265meggyw3wph6sv064me.json b/contrib/localnet/tss/zetaclient0/localstate-zetapub1addwnpepqt9km47ldtun5nemm5nuusm5ly33l0j6sze64l265meggyw3wph6sv064me.json deleted file mode 100644 index 462026549f..0000000000 --- a/contrib/localnet/tss/zetaclient0/localstate-zetapub1addwnpepqt9km47ldtun5nemm5nuusm5ly33l0j6sze64l265meggyw3wph6sv064me.json +++ /dev/null @@ -1 +0,0 @@ -{"pub_key":"zetapub1addwnpepqt9km47ldtun5nemm5nuusm5ly33l0j6sze64l265meggyw3wph6sv064me","local_data":{"PaillierSK":{"N":21904019810316554615180853778019346893657404209216283461609033688814436234120092105916095611677205183538599487765134141173912794311741457265350340439546270166426989419797064519971531768290032333491309520641961972683208865660072415581591938831176157899248009350581460600167235833025504925830756606485113622052718059533565408418057298520893768615410816660423449864631064561539262015863384428833122993905598067825766793095119101127861017044997730367322950572508461683163619101445165409205064698881287927199542272004244189566165714604550516594909749903344129429793068478538464446848820212727866101844857827426421299044137,"LambdaN":10952009905158277307590426889009673446828702104608141730804516844407218117060046052958047805838602591769299743882567070586956397155870728632675170219773135083213494709898532259985765884145016166745654760320980986341604432830036207790795969415588078949624004675290730300083617916512752462915378303242556811026210892184132197492599772746468767839954977647117939051747118398200521290427810736437411397854788761338046871347767465739422954313895260797616579589818242988770479872522949764062085332302357502846752265528051567166469601079681006656057479399141791971947734325567142594629283847761003076786773404570524278896258,"PhiN":21904019810316554615180853778019346893657404209216283461609033688814436234120092105916095611677205183538599487765134141173912794311741457265350340439546270166426989419797064519971531768290032333491309520641961972683208865660072415581591938831176157899248009350581460600167235833025504925830756606485113622052421784368264394985199545492937535679909955294235878103494236796401042580855621472874822795709577522676093742695534931478845908627790521595233159179636485977540959745045899528124170664604715005693504531056103134332939202159362013312114958798283583943895468651134285189258567695522006153573546809141048557792516},"NTildei":28611679819871826710887371529215487705595764493797659050881815203076316252020259342857903569357961559870987893292520051012002190003169912272939843636915944869123311829188271046875034636027521187849685736951378303879886288579478612117158044356445770321229778647118254940336776308010756643634617931124774718502157142512925938956792452417206255658576012563588155546113550196738102821059206970732382430480269079741734037010384164605109851585552133971056693023703698610328223040022368448888402732597048724431552710645710274191985991438015845964382790125094655343061801698917889034274794677660031348696495517768112395830741,"H1i":485017103277658489814913905829618981958261308300045007738040341636889405473289925315700153994593802473245056475227060927655263425235470243287837812362429087136072476964134334260435187081973792221938289583440932728980704672849813085907424010152380604885552734022743616120550112226856328317797301420673950308129999616069168147893859295703910421801887585722413840739674236338373722953932444007719043018837716695818264705757943709141757252224635296818993123602862860546550690995845983167307149672707089629795404084546425310958466789354703197443054651992495495383093781909607620201366613685635383931135819933506352177625,"H2i":9762770588330279569061983974817538499629373683475991784895950382529434618056574839906399899799580892746197253019739520199918417157334156538145650396015276613637599518464263750369229083362727921947750542416617325666598740004157868410256901446088412800224219719371952968321496318510170732801761070049010226460003034393745942815605950790391873888556154300587540500224353478595439385508031181767252071752825177391017676928039264600331688350767109297945539125043653437871146573181476252816504345479106356177498812478762235413588771495062664696094947877236428301688894980410229390509963054978049320044984611525519428895194,"Alpha":3923069068910587811759886839259866063479445282165924520728472757889727408052475597113922916290809945769280995538645696380392628461512025656232034879542974665002996959663147467377717916161890211873064786092044066337393080989152382562208757814414646033416726436543446926197995096133760807893658708134260601611283084403920766043661934504385706163901813501198782234257549013661826867285807605439526550000696311495681106950211680655758210351714117738836311186014809290716845919296850051691555726818392124317949599120731496530085866110361306283980180704787829228202949824539589700848566375320625593385688490391466284829294,"Beta":3047426629555310780352598709864457466463110666069957314638775476683862811499879218386375606595624424692813435196101577035153365049926654156313314807998882195121620021542850588001845737255585421006872962476925039385448354407345211700106380577591081910499770015289441377190790376011472314137621601344988551613109620180297894641173881459580629449580087230127100225561901742692415167135719878270584637468446931499166393093931095762083519672243751735707937057943187672529552296521000643763726919827700416735433774935376302464423946895574621899718309274592338640101458381735101153383163195185944813099787870087479822244015,"P":87913587681936920731117143755014343842297665562480345511248527003425508633602781670842552655761727350595186069373032907582296702854206795118764144842929460087418934588905537300149040015498451276787482447436751904827805278752497505905070394775619820571427800308639533829417553155944968490003853204132309294453,"Q":81363076443274585836028702215040175434111537701853171194310900757585930773295982811994451250025996920407027372440515444847067768055611972985068892595597610056411071825587389602611622175134221148308374450543478472530648915697541335665322806406541129479345222413121255071035937712148479713072420973827924486431,"Xi":56774107943966615426951430026875659716595644731956693348586023329959665046586,"ShareID":342409110680041407191060322991861574572518913179665609952469570928863452858922,"Ks":[342409110680041407191060322991861574572518913179665609952469570928863452858922,380624581728967305192433926382347750023221814331370139622681594024401299292970],"NTildej":[28611679819871826710887371529215487705595764493797659050881815203076316252020259342857903569357961559870987893292520051012002190003169912272939843636915944869123311829188271046875034636027521187849685736951378303879886288579478612117158044356445770321229778647118254940336776308010756643634617931124774718502157142512925938956792452417206255658576012563588155546113550196738102821059206970732382430480269079741734037010384164605109851585552133971056693023703698610328223040022368448888402732597048724431552710645710274191985991438015845964382790125094655343061801698917889034274794677660031348696495517768112395830741,28279495343513500834135175666178643616564489831794048004719806118040378549233247091287720476568323991454355597863847765209470226085707089949701577227799232989776752071182322723549179376371202676118305757212780626426798368563788677977377093567967462290780872705344555278207990939758855369568602448908586203736446037903587426329519298600786387227234343152175355472577125675245793508879542394445383706998788865691974980673900927230425796366625227730777644985536945600577310207718811979980133131845641189439545297020731273155639959212210999779789556259429057132422213858887105005698064500862923006262348552650039825169173],"H1j":[485017103277658489814913905829618981958261308300045007738040341636889405473289925315700153994593802473245056475227060927655263425235470243287837812362429087136072476964134334260435187081973792221938289583440932728980704672849813085907424010152380604885552734022743616120550112226856328317797301420673950308129999616069168147893859295703910421801887585722413840739674236338373722953932444007719043018837716695818264705757943709141757252224635296818993123602862860546550690995845983167307149672707089629795404084546425310958466789354703197443054651992495495383093781909607620201366613685635383931135819933506352177625,19162703757723491814501898440167107808688891112704792798342467276795312217495499920722224457838012406453452328757338150758842255047640433322141467118840414922526091590381458445476975802201212175761183843317843427031152262373569926308908222733452120708273581985729585194893203205301592223895927198191971932281525287352132186176001678775982830374263546868892448841779004817865504733372517356888072783643526264321834565233560262212984358857422646302256388910005538239846618996141193796753010639175439420606583079078523528286224342368712587203998302074102717200586915058022245351784637762252844778892424881908227576782279],"H2j":[9762770588330279569061983974817538499629373683475991784895950382529434618056574839906399899799580892746197253019739520199918417157334156538145650396015276613637599518464263750369229083362727921947750542416617325666598740004157868410256901446088412800224219719371952968321496318510170732801761070049010226460003034393745942815605950790391873888556154300587540500224353478595439385508031181767252071752825177391017676928039264600331688350767109297945539125043653437871146573181476252816504345479106356177498812478762235413588771495062664696094947877236428301688894980410229390509963054978049320044984611525519428895194,19315502741580888195772649878037148542759507162553276060508901168051412557826772079589679544264177752596822422572175413289477303180064084298293033612411639342867997610252718810102341324283775236721196394745457202162301858866442315394176420550068093758483621208659347157042302798071056441231096669329426349349628389120983569489393401825147308079079062634593191918687437531462533444728595098107782436761018474261845751443604153644815279798859780153040361257691184267869408617536441450582676595580494424079224565450778231022219395470505160668136672368005198570140673467793290641994239899243929117495944950156678978705490],"BigXj":[{"Coords":[25556310624282451990158308285704716036592912486627176674881833449861046772142,12021832626355086734901921262922005846353785553025711942205699336575534448]},{"Coords":[13779544062761923114354529985763858659367848164176712409557547304551403561378,90602354381154158171569879211993096742414757692802966747135488720684281563368]}],"PaillierPKs":[{"N":21904019810316554615180853778019346893657404209216283461609033688814436234120092105916095611677205183538599487765134141173912794311741457265350340439546270166426989419797064519971531768290032333491309520641961972683208865660072415581591938831176157899248009350581460600167235833025504925830756606485113622052718059533565408418057298520893768615410816660423449864631064561539262015863384428833122993905598067825766793095119101127861017044997730367322950572508461683163619101445165409205064698881287927199542272004244189566165714604550516594909749903344129429793068478538464446848820212727866101844857827426421299044137},{"N":23950384858094511553436315358520965722590165448190156522327831221398150200540950661693041172777518279623646044978150971495419705450324596019747379578962255559229118582822958115767794657766455443220017894643511956226554642119496874921444603118121297655763420494222309630007136196440326864437508301569054126596494283920430288917553844473492734349517877424426764143720882609663933412885099436112127307977238685323605565588765806982082194873869647171435980833887426543830551370302820106847478812769597196123845801454541740592138426121113081030060721468596428686211135256588962932154645290900406171158630703601711408818301}],"ECDSAPub":{"Coords":[92013584491262216752842125890853345602556369070997758499633422574351415275432,65071031647501722780675635548052306379731712380879028996731047039505007483730]}},"participant_keys":["zetapub1addwnpepqdycrc8usnjh0yk7cd532ushualgsderdqj8jr9m2rzy8stqrlpj5drvw6u","zetapub1addwnpepqt6sfvz3mwetudyaxjn958kztxz9j8rvrlsu55fw6fjkjyac2s9z53lsz4t"],"local_party_key":"zetapub1addwnpepqt6sfvz3mwetudyaxjn958kztxz9j8rvrlsu55fw6fjkjyac2s9z53lsz4t"} \ No newline at end of file diff --git a/contrib/localnet/tss/zetaclient1/address_book.seed b/contrib/localnet/tss/zetaclient1/address_book.seed deleted file mode 100644 index 2128207a26..0000000000 --- a/contrib/localnet/tss/zetaclient1/address_book.seed +++ /dev/null @@ -1,2 +0,0 @@ -/ip4/172.20.0.22/tcp/6668/p2p/16Uiu2HAmTsQh84fvHmv9kDYWEKn1c5dthvB1JRFr4872mJ3GQTFU -/ip4/172.20.0.21/tcp/6668/p2p/16Uiu2HAmPAxG9Qg4PaGNFKWZ9rAaiC1HYydAaEUZNx9CRaKwZGgN diff --git a/contrib/localnet/tss/zetaclient1/localstate-zetapub1addwnpepqt9km47ldtun5nemm5nuusm5ly33l0j6sze64l265meggyw3wph6sv064me.json b/contrib/localnet/tss/zetaclient1/localstate-zetapub1addwnpepqt9km47ldtun5nemm5nuusm5ly33l0j6sze64l265meggyw3wph6sv064me.json deleted file mode 100644 index 4c4895f881..0000000000 --- a/contrib/localnet/tss/zetaclient1/localstate-zetapub1addwnpepqt9km47ldtun5nemm5nuusm5ly33l0j6sze64l265meggyw3wph6sv064me.json +++ /dev/null @@ -1 +0,0 @@ -{"pub_key":"zetapub1addwnpepqt9km47ldtun5nemm5nuusm5ly33l0j6sze64l265meggyw3wph6sv064me","local_data":{"PaillierSK":{"N":23950384858094511553436315358520965722590165448190156522327831221398150200540950661693041172777518279623646044978150971495419705450324596019747379578962255559229118582822958115767794657766455443220017894643511956226554642119496874921444603118121297655763420494222309630007136196440326864437508301569054126596494283920430288917553844473492734349517877424426764143720882609663933412885099436112127307977238685323605565588765806982082194873869647171435980833887426543830551370302820106847478812769597196123845801454541740592138426121113081030060721468596428686211135256588962932154645290900406171158630703601711408818301,"LambdaN":11975192429047255776718157679260482861295082724095078261163915610699075100270475330846520586388759139811823022489075485747709852725162298009873689789481127779614559291411479057883897328883227721610008947321755978113277321059748437460722301559060648827881710247111154815003568098220163432218754150784527063298091429825541707811361878880871834418994585601761036070250907878947837762925838882077363550651356241074880926163937181864030138179563299562886034262553660885688080028871420035177783501807456895998896897972780595644853268799720271692473609594668806490823344736424590934035325801688917366456232531994007444757086,"PhiN":23950384858094511553436315358520965722590165448190156522327831221398150200540950661693041172777518279623646044978150971495419705450324596019747379578962255559229118582822958115767794657766455443220017894643511956226554642119496874921444603118121297655763420494222309630007136196440326864437508301569054126596182859651083415622723757761743668837989171203522072140501815757895675525851677764154727101302712482149761852327874363728060276359126599125772068525107321771376160057742840070355567003614913791997793795945561191289706537599440543384947219189337612981646689472849181868070651603377834732912465063988014889514172},"NTildei":28279495343513500834135175666178643616564489831794048004719806118040378549233247091287720476568323991454355597863847765209470226085707089949701577227799232989776752071182322723549179376371202676118305757212780626426798368563788677977377093567967462290780872705344555278207990939758855369568602448908586203736446037903587426329519298600786387227234343152175355472577125675245793508879542394445383706998788865691974980673900927230425796366625227730777644985536945600577310207718811979980133131845641189439545297020731273155639959212210999779789556259429057132422213858887105005698064500862923006262348552650039825169173,"H1i":19162703757723491814501898440167107808688891112704792798342467276795312217495499920722224457838012406453452328757338150758842255047640433322141467118840414922526091590381458445476975802201212175761183843317843427031152262373569926308908222733452120708273581985729585194893203205301592223895927198191971932281525287352132186176001678775982830374263546868892448841779004817865504733372517356888072783643526264321834565233560262212984358857422646302256388910005538239846618996141193796753010639175439420606583079078523528286224342368712587203998302074102717200586915058022245351784637762252844778892424881908227576782279,"H2i":19315502741580888195772649878037148542759507162553276060508901168051412557826772079589679544264177752596822422572175413289477303180064084298293033612411639342867997610252718810102341324283775236721196394745457202162301858866442315394176420550068093758483621208659347157042302798071056441231096669329426349349628389120983569489393401825147308079079062634593191918687437531462533444728595098107782436761018474261845751443604153644815279798859780153040361257691184267869408617536441450582676595580494424079224565450778231022219395470505160668136672368005198570140673467793290641994239899243929117495944950156678978705490,"Alpha":27835615213329968841289050438654818005496694944630515953754512786564014864093637340488759057676644160061734483875004803138440665924881924299753556899240241079152229244897459681889527467760414904811824453489848346545785908223201924657557328896285148608676237630300820215143306660284371346462791418460794556252372251645958226107056958494964017738712582686606214640321027203767366851209133042255856763570266123404393185477889205093174132908716096426123418968154989419647054042737970050051373435245927332794200187632245564833702439266199852508335523420272458789411213782648671405493717652010685018976432010219670591758393,"Beta":1747616609853958502785494310882970629542087984732732475105362616872371192886816095838386801999552130435853102474621009326633867569508322069042648157816720150024170971303277613054498028497302230087623399896811080741801332623114334913649993736464260250689320136005204966908784474986856269386641834688277249261457169875188022675531773061791822216794465325219775482362852264198764580912359649655631733360087299871471671668202024594116799036419190595327402906891759775107957746348330758155964844272600377926402549773105698696460596300218013430252039167256435715093122581449937975994274083985405623297967790169486124765579,"P":83719913001974500076663726685773729406578946826189117106878750675158134737081690011577693447614299765484937059327129991048282331452789518256129680208622096220524008231345310188242138100415736790953989974617425196880689767000664675821109192257889429262185087098302140194423511465660144880009334064871704137573,"Q":84446741311253334811046952611741075201763027805713703870742099395568410001375396217756919314834569008060034770897265058808211043881366686858566929288230567431400870589246808334514606439581691297755555676039190711697816305457707450130476616081428639823780133373072697078763892358740649414011848519028737923279,"Xi":23420217484349216560513006403381137596159063122644723813408260900123754749897,"ShareID":380624581728967305192433926382347750023221814331370139622681594024401299292970,"Ks":[342409110680041407191060322991861574572518913179665609952469570928863452858922,380624581728967305192433926382347750023221814331370139622681594024401299292970],"NTildej":[28611679819871826710887371529215487705595764493797659050881815203076316252020259342857903569357961559870987893292520051012002190003169912272939843636915944869123311829188271046875034636027521187849685736951378303879886288579478612117158044356445770321229778647118254940336776308010756643634617931124774718502157142512925938956792452417206255658576012563588155546113550196738102821059206970732382430480269079741734037010384164605109851585552133971056693023703698610328223040022368448888402732597048724431552710645710274191985991438015845964382790125094655343061801698917889034274794677660031348696495517768112395830741,28279495343513500834135175666178643616564489831794048004719806118040378549233247091287720476568323991454355597863847765209470226085707089949701577227799232989776752071182322723549179376371202676118305757212780626426798368563788677977377093567967462290780872705344555278207990939758855369568602448908586203736446037903587426329519298600786387227234343152175355472577125675245793508879542394445383706998788865691974980673900927230425796366625227730777644985536945600577310207718811979980133131845641189439545297020731273155639959212210999779789556259429057132422213858887105005698064500862923006262348552650039825169173],"H1j":[485017103277658489814913905829618981958261308300045007738040341636889405473289925315700153994593802473245056475227060927655263425235470243287837812362429087136072476964134334260435187081973792221938289583440932728980704672849813085907424010152380604885552734022743616120550112226856328317797301420673950308129999616069168147893859295703910421801887585722413840739674236338373722953932444007719043018837716695818264705757943709141757252224635296818993123602862860546550690995845983167307149672707089629795404084546425310958466789354703197443054651992495495383093781909607620201366613685635383931135819933506352177625,19162703757723491814501898440167107808688891112704792798342467276795312217495499920722224457838012406453452328757338150758842255047640433322141467118840414922526091590381458445476975802201212175761183843317843427031152262373569926308908222733452120708273581985729585194893203205301592223895927198191971932281525287352132186176001678775982830374263546868892448841779004817865504733372517356888072783643526264321834565233560262212984358857422646302256388910005538239846618996141193796753010639175439420606583079078523528286224342368712587203998302074102717200586915058022245351784637762252844778892424881908227576782279],"H2j":[9762770588330279569061983974817538499629373683475991784895950382529434618056574839906399899799580892746197253019739520199918417157334156538145650396015276613637599518464263750369229083362727921947750542416617325666598740004157868410256901446088412800224219719371952968321496318510170732801761070049010226460003034393745942815605950790391873888556154300587540500224353478595439385508031181767252071752825177391017676928039264600331688350767109297945539125043653437871146573181476252816504345479106356177498812478762235413588771495062664696094947877236428301688894980410229390509963054978049320044984611525519428895194,19315502741580888195772649878037148542759507162553276060508901168051412557826772079589679544264177752596822422572175413289477303180064084298293033612411639342867997610252718810102341324283775236721196394745457202162301858866442315394176420550068093758483621208659347157042302798071056441231096669329426349349628389120983569489393401825147308079079062634593191918687437531462533444728595098107782436761018474261845751443604153644815279798859780153040361257691184267869408617536441450582676595580494424079224565450778231022219395470505160668136672368005198570140673467793290641994239899243929117495944950156678978705490],"BigXj":[{"Coords":[25556310624282451990158308285704716036592912486627176674881833449861046772142,12021832626355086734901921262922005846353785553025711942205699336575534448]},{"Coords":[13779544062761923114354529985763858659367848164176712409557547304551403561378,90602354381154158171569879211993096742414757692802966747135488720684281563368]}],"PaillierPKs":[{"N":21904019810316554615180853778019346893657404209216283461609033688814436234120092105916095611677205183538599487765134141173912794311741457265350340439546270166426989419797064519971531768290032333491309520641961972683208865660072415581591938831176157899248009350581460600167235833025504925830756606485113622052718059533565408418057298520893768615410816660423449864631064561539262015863384428833122993905598067825766793095119101127861017044997730367322950572508461683163619101445165409205064698881287927199542272004244189566165714604550516594909749903344129429793068478538464446848820212727866101844857827426421299044137},{"N":23950384858094511553436315358520965722590165448190156522327831221398150200540950661693041172777518279623646044978150971495419705450324596019747379578962255559229118582822958115767794657766455443220017894643511956226554642119496874921444603118121297655763420494222309630007136196440326864437508301569054126596494283920430288917553844473492734349517877424426764143720882609663933412885099436112127307977238685323605565588765806982082194873869647171435980833887426543830551370302820106847478812769597196123845801454541740592138426121113081030060721468596428686211135256588962932154645290900406171158630703601711408818301}],"ECDSAPub":{"Coords":[92013584491262216752842125890853345602556369070997758499633422574351415275432,65071031647501722780675635548052306379731712380879028996731047039505007483730]}},"participant_keys":["zetapub1addwnpepqdycrc8usnjh0yk7cd532ushualgsderdqj8jr9m2rzy8stqrlpj5drvw6u","zetapub1addwnpepqt6sfvz3mwetudyaxjn958kztxz9j8rvrlsu55fw6fjkjyac2s9z53lsz4t"],"local_party_key":"zetapub1addwnpepqdycrc8usnjh0yk7cd532ushualgsderdqj8jr9m2rzy8stqrlpj5drvw6u"} \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/config/app.toml b/contrib/localnet/zetacored/zetacored_zetacore0/config/app.toml deleted file mode 100644 index 624e89d40c..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/config/app.toml +++ /dev/null @@ -1,283 +0,0 @@ -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -############################################################################### -### Base Configuration ### -############################################################################### - -# The minimum gas prices a validator is willing to accept for processing a -# transaction. A transaction's fees must meet the minimum of any denomination -# specified in this config (e.g. 0.25token1;0.0001token2). -minimum-gas-prices = "0azeta" - -# default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals -# nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) -# everything: all saved states will be deleted, storing only the current and previous state; pruning at 10 block intervals -# custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' -pruning = "default" - -# These are applied if and only if the pruning strategy is custom. -pruning-keep-recent = "0" -pruning-keep-every = "0" -pruning-interval = "0" - -# HaltHeight contains a non-zero block height at which a node will gracefully -# halt and shutdown that can be used to assist upgrades and testing. -# -# Note: Commitment of state will be attempted on the corresponding block. -halt-height = 0 - -# HaltTime contains a non-zero minimum block time (in Unix seconds) at which -# a node will gracefully halt and shutdown that can be used to assist upgrades -# and testing. -# -# Note: Commitment of state will be attempted on the corresponding block. -halt-time = 0 - -# MinRetainBlocks defines the minimum block height offset from the current -# block being committed, such that all blocks past this offset are pruned -# from Tendermint. It is used as part of the process of determining the -# ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates -# that no blocks should be pruned. -# -# This configuration value is only responsible for pruning Tendermint blocks. -# It has no bearing on application state pruning which is determined by the -# "pruning-*" configurations. -# -# Note: Tendermint block pruning is dependant on this parameter in conunction -# with the unbonding (safety threshold) period, state pruning and state sync -# snapshot parameters to determine the correct minimum value of -# ResponseCommit.RetainHeight. -min-retain-blocks = 0 - -# InterBlockCache enables inter-block caching. -inter-block-cache = true - -# IndexEvents defines the set of events in the form {eventType}.{attributeKey}, -# which informs Tendermint what to index. If empty, all events will be indexed. -# -# Example: -# ["message.sender", "message.recipient"] -index-events = [] - -# IavlCacheSize set the size of the iavl tree cache. -# Default cache size is 50mb. -iavl-cache-size = 781250 - -# IAVLDisableFastNode enables or disables the fast node feature of IAVL. -# Default is true. -iavl-disable-fastnode = true - -############################################################################### -### Telemetry Configuration ### -############################################################################### - -[telemetry] - -# Prefixed with keys to separate services. -service-name = "" - -# Enabled enables the application telemetry functionality. When enabled, -# an in-memory sink is also enabled by default. Operators may also enabled -# other sinks such as Prometheus. -enabled = false - -# Enable prefixing gauge values with hostname. -enable-hostname = false - -# Enable adding hostname to labels. -enable-hostname-label = false - -# Enable adding service to labels. -enable-service-label = false - -# PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. -prometheus-retention-time = 0 - -# GlobalLabels defines a global set of name/value label tuples applied to all -# metrics emitted using the wrapper functions defined in telemetry package. -# -# Example: -# [["chain_id", "cosmoshub-1"]] -global-labels = [ -] - -############################################################################### -### API Configuration ### -############################################################################### - -[api] - -# Enable defines if the API server should be enabled. -enable = true - -# Swagger defines if swagger documentation should automatically be registered. -swagger = true - -# Address defines the API server to listen on. -address = "tcp://0.0.0.0:1317" - -# MaxOpenConnections defines the number of maximum open connections. -max-open-connections = 1000 - -# RPCReadTimeout defines the Tendermint RPC read timeout (in seconds). -rpc-read-timeout = 10 - -# RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds). -rpc-write-timeout = 0 - -# RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes). -rpc-max-body-bytes = 1000000 - -# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). -enabled-unsafe-cors = true - -############################################################################### -### Rosetta Configuration ### -############################################################################### - -[rosetta] - -# Enable defines if the Rosetta API server should be enabled. -enable = false - -# Address defines the Rosetta API server to listen on. -address = ":8080" - -# Network defines the name of the blockchain that will be returned by Rosetta. -blockchain = "app" - -# Network defines the name of the network that will be returned by Rosetta. -network = "network" - -# Retries defines the number of retries when connecting to the node before failing. -retries = 3 - -# Offline defines if Rosetta server should run in offline mode. -offline = false - -############################################################################### -### gRPC Configuration ### -############################################################################### - -[grpc] - -# Enable defines if the gRPC server should be enabled. -enable = true - -# Address defines the gRPC server address to bind to. -address = "0.0.0.0:9090" - -############################################################################### -### gRPC Web Configuration ### -############################################################################### - -[grpc-web] - -# GRPCWebEnable defines if the gRPC-web should be enabled. -# NOTE: gRPC must also be enabled, otherwise, this configuration is a no-op. -enable = true - -# Address defines the gRPC-web server address to bind to. -address = "0.0.0.0:9091" - -# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). -enable-unsafe-cors = false - -############################################################################### -### State Sync Configuration ### -############################################################################### - -# State sync snapshots allow other nodes to rapidly join the network without replaying historical -# blocks, instead downloading and applying a snapshot of the application state at a given height. -[state-sync] - -# snapshot-interval specifies the block interval at which local state sync snapshots are -# taken (0 to disable). Must be a multiple of pruning-keep-every. -snapshot-interval = 0 - -# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). -snapshot-keep-recent = 2 - -############################################################################### -### EVM Configuration ### -############################################################################### - -[evm] - -# Tracer defines the 'vm.Tracer' type that the EVM will use when the node is run in -# debug mode. To enable tracing use the '--evm.tracer' flag when starting your node. -# Valid types are: json|struct|access_list|markdown -tracer = "" - -# MaxTxGasWanted defines the gas wanted for each eth tx returned in ante handler in check tx mode. -max-tx-gas-wanted = 0 - -############################################################################### -### JSON RPC Configuration ### -############################################################################### - -[json-rpc] - -# Enable defines if the gRPC server should be enabled. -enable = true - -# Address defines the EVM RPC HTTP server address to bind to. -address = "0.0.0.0:8545" - -# Address defines the EVM WebSocket server address to bind to. -ws-address = "0.0.0.0:8546" - -# API defines a list of JSON-RPC namespaces that should be enabled -# Example: "eth,txpool,personal,net,debug,web3" -api = "eth,net,web3" - -# GasCap sets a cap on gas that can be used in eth_call/estimateGas (0=infinite). Default: 25,000,000. -gas-cap = 25000000 - -# EVMTimeout is the global timeout for eth_call. Default: 5s. -evm-timeout = "5s" - -# TxFeeCap is the global tx-fee cap for send transaction. Default: 1eth. -txfee-cap = 1 - -# FilterCap sets the global cap for total number of filters that can be created -filter-cap = 200 - -# FeeHistoryCap sets the global cap for total number of blocks that can be fetched -feehistory-cap = 100 - -# LogsCap defines the max number of results can be returned from single 'eth_getLogs' query. -logs-cap = 10000 - -# BlockRangeCap defines the max block range allowed for 'eth_getLogs' query. -block-range-cap = 10000 - -# HTTPTimeout is the read/write timeout of http json-rpc server. -http-timeout = "30s" - -# HTTPIdleTimeout is the idle timeout of http json-rpc server. -http-idle-timeout = "2m0s" - -# AllowUnprotectedTxs restricts unprotected (non EIP155 signed) transactions to be submitted via -# the node's RPC when the global parameter is disabled. -allow-unprotected-txs = false - -# MaxOpenConnections sets the maximum number of simultaneous connections -# for the server listener. -max-open-connections = 0 - -# EnableIndexer enables the custom transaction indexer for the EVM (ethereum transactions). -enable-indexer = false - -############################################################################### -### TLS Configuration ### -############################################################################### - -[tls] - -# Certificate path defines the cert.pem file path for the TLS configuration. -certificate-path = "" - -# Key path defines the key.pem file path for the TLS configuration. -key-path = "" \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/config/client.toml b/contrib/localnet/zetacored/zetacored_zetacore0/config/client.toml deleted file mode 100644 index f2b86d8fa5..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/config/client.toml +++ /dev/null @@ -1,17 +0,0 @@ -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -############################################################################### -### Client Configuration ### -############################################################################### - -# The network chain ID -chain-id = "athens_101-1" -# The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory) -keyring-backend = "test" -# CLI output format (text|json) -output = "text" -# : to Tendermint RPC interface for this chain -node = "tcp://localhost:26657" -# Transaction broadcasting mode (sync|async|block) -broadcast-mode = "sync" diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/config/config.toml b/contrib/localnet/zetacored/zetacored_zetacore0/config/config.toml deleted file mode 100644 index c8004b37af..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/config/config.toml +++ /dev/null @@ -1,463 +0,0 @@ -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or -# relative to the home directory (e.g. "data"). The home directory is -# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable -# or --home cmd flag. - -####################################################################### -### Main Base Config Options ### -####################################################################### - -# TCP or UNIX socket address of the ABCI application, -# or the name of an ABCI application compiled in with the Tendermint binary -proxy_app = "tcp://127.0.0.1:26658" - -# A custom human readable name for this node -moniker = "zetachain" - -# If this node is many blocks behind the tip of the chain, FastSync -# allows them to catchup quickly by downloading blocks in parallel -# and verifying their commits -fast_sync = true - -# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb -# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) -# - pure go -# - stable -# * cleveldb (uses levigo wrapper) -# - fast -# - requires gcc -# - use cleveldb build tag (go build -tags cleveldb) -# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) -# - EXPERIMENTAL -# - may be faster is some use-cases (random reads - indexer) -# - use boltdb build tag (go build -tags boltdb) -# * rocksdb (uses github.com/tecbot/gorocksdb) -# - EXPERIMENTAL -# - requires gcc -# - use rocksdb build tag (go build -tags rocksdb) -# * badgerdb (uses github.com/dgraph-io/badger) -# - EXPERIMENTAL -# - use badgerdb build tag (go build -tags badgerdb) -db_backend = "pebbledb" - -# Database directory -db_dir = "data" - -# Output level for logging, including package level options -log_level = "info" - -# Output format: 'plain' (colored text) or 'json' -log_format = "plain" - -##### additional base config options ##### - -# Path to the JSON file containing the initial validator set and other meta data -genesis_file = "config/genesis.json" - -# Path to the JSON file containing the private key to use as a validator in the consensus protocol -priv_validator_key_file = "config/priv_validator_key.json" - -# Path to the JSON file containing the last sign state of a validator -priv_validator_state_file = "data/priv_validator_state.json" - -# TCP or UNIX socket address for Tendermint to listen on for -# connections from an external PrivValidator process -priv_validator_laddr = "" - -# Path to the JSON file containing the private key to use for node authentication in the p2p protocol -node_key_file = "config/node_key.json" - -# Mechanism to connect to the ABCI application: socket | grpc -abci = "socket" - -# If true, query the ABCI app on connecting to a new peer -# so the app can decide if we should keep the connection or not -filter_peers = false - - -####################################################################### -### Advanced Configuration Options ### -####################################################################### - -####################################################### -### RPC Server Configuration Options ### -####################################################### -[rpc] - -# TCP or UNIX socket address for the RPC server to listen on -laddr = "tcp://0.0.0.0:26657" - -# A list of origins a cross-domain request can be executed from -# Default value '[]' disables cors support -# Use '["*"]' to allow any origin -cors_allowed_origins = [] - -# A list of methods the client is allowed to use with cross-domain requests -cors_allowed_methods = ["HEAD", "GET", "POST", ] - -# A list of non simple headers the client is allowed to use with cross-domain requests -cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] - -# TCP or UNIX socket address for the gRPC server to listen on -# NOTE: This server only supports /broadcast_tx_commit -grpc_laddr = "" - -# Maximum number of simultaneous connections. -# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} -# 1024 - 40 - 10 - 50 = 924 = ~900 -grpc_max_open_connections = 900 - -# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool -unsafe = false - -# Maximum number of simultaneous connections (including WebSocket). -# Does not include gRPC connections. See grpc_max_open_connections -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} -# 1024 - 40 - 10 - 50 = 924 = ~900 -max_open_connections = 900 - -# Maximum number of unique clientIDs that can /subscribe -# If you're using /broadcast_tx_commit, set to the estimated maximum number -# of broadcast_tx_commit calls per block. -max_subscription_clients = 100 - -# Maximum number of unique queries a given client can /subscribe to -# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to -# the estimated # maximum number of broadcast_tx_commit calls per block. -max_subscriptions_per_client = 5 - -# Experimental parameter to specify the maximum number of events a node will -# buffer, per subscription, before returning an error and closing the -# subscription. Must be set to at least 100, but higher values will accommodate -# higher event throughput rates (and will use more memory). -experimental_subscription_buffer_size = 200 - -# Experimental parameter to specify the maximum number of RPC responses that -# can be buffered per WebSocket client. If clients cannot read from the -# WebSocket endpoint fast enough, they will be disconnected, so increasing this -# parameter may reduce the chances of them being disconnected (but will cause -# the node to use more memory). -# -# Must be at least the same as "experimental_subscription_buffer_size", -# otherwise connections could be dropped unnecessarily. This value should -# ideally be somewhat higher than "experimental_subscription_buffer_size" to -# accommodate non-subscription-related RPC responses. -experimental_websocket_write_buffer_size = 200 - -# If a WebSocket client cannot read fast enough, at present we may -# silently drop events instead of generating an error or disconnecting the -# client. -# -# Enabling this experimental parameter will cause the WebSocket connection to -# be closed instead if it cannot read fast enough, allowing for greater -# predictability in subscription behaviour. -experimental_close_on_slow_client = false - -# How long to wait for a tx to be committed during /broadcast_tx_commit. -# WARNING: Using a value larger than 10s will result in increasing the -# global HTTP write timeout, which applies to all connections and endpoints. -# See https://github.com/tendermint/tendermint/issues/3435 -timeout_broadcast_tx_commit = "10s" - -# Maximum size of request body, in bytes -max_body_bytes = 1000000 - -# Maximum size of request header, in bytes -max_header_bytes = 1048576 - -# The path to a file containing certificate that is used to create the HTTPS server. -# Might be either absolute path or path related to Tendermint's config directory. -# If the certificate is signed by a certificate authority, -# the certFile should be the concatenation of the server's certificate, any intermediates, -# and the CA's certificate. -# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. -# Otherwise, HTTP server is run. -tls_cert_file = "" - -# The path to a file containing matching private key that is used to create the HTTPS server. -# Might be either absolute path or path related to Tendermint's config directory. -# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. -# Otherwise, HTTP server is run. -tls_key_file = "" - -# pprof listen address (https://golang.org/pkg/net/http/pprof) -pprof_laddr = "0.0.0.0:6060" - -####################################################### -### P2P Configuration Options ### -####################################################### -[p2p] - -# Address to listen for incoming connections -laddr = "tcp://0.0.0.0:26656" - -# Address to advertise to peers for them to dial -# If empty, will use the same port as the laddr, -# and will introspect on the listener or use UPnP -# to figure out the address. ip and port are required -# example: 159.89.10.97:26656 -external_address = "" - -# Comma separated list of seed nodes to connect to -seeds = "" - -# Comma separated list of nodes to keep persistent connections to -persistent_peers = "c9733926bd0e54244bd5189f64be9a5bd3754599@zetacore1:26656" - -# UPNP port forwarding -upnp = false - -# Path to address book -addr_book_file = "config/addrbook.json" - -# Set true for strict address routability rules -# Set false for private or local networks -addr_book_strict = true - -# Maximum number of inbound peers -max_num_inbound_peers = 40 - -# Maximum number of outbound peers to connect to, excluding persistent peers -max_num_outbound_peers = 10 - -# List of node IDs, to which a connection will be (re)established ignoring any existing limits -unconditional_peer_ids = "" - -# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) -persistent_peers_max_dial_period = "0s" - -# Time to wait before flushing messages out on the connection -flush_throttle_timeout = "100ms" - -# Maximum size of a message packet payload, in bytes -max_packet_msg_payload_size = 1024 - -# Rate at which packets can be received, in bytes/second -recv_rate = 5120000 - -# Set true to enable the peer-exchange reactor -pex = true - -# Seed mode, in which node constantly crawls the network and looks for -# peers. If another node asks it for addresses, it responds and disconnects. -# -# Does not work if the peer-exchange reactor is disabled. -seed_mode = false - -# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) -private_peer_ids = "" - -# Toggle to disable guard against peers connecting from the same ip. -allow_duplicate_ip = false - -# Peer connection configuration. -handshake_timeout = "20s" -dial_timeout = "3s" - -####################################################### -### Mempool Configuration Option ### -####################################################### -[mempool] - -# Mempool version to use: -# 1) "v0" - (default) FIFO mempool. -# 2) "v1" - prioritized mempool. -version = "v0" - -recheck = true -broadcast = true -wal_dir = "" - -# Maximum number of transactions in the mempool -size = 5000 - -# Limit the total size of all txs in the mempool. -# This only accounts for raw transactions (e.g. given 1MB transactions and -# max_txs_bytes=5MB, mempool will only accept 5 transactions). -max_txs_bytes = 1073741824 - -# Size of the cache (used to filter transactions we saw earlier) in transactions -cache_size = 10000 - -# Do not remove invalid transactions from the cache (default: false) -# Set to true if it's not possible for any invalid transaction to become valid -# again in the future. -keep-invalid-txs-in-cache = false - -# Maximum size of a single transaction. -# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. -max_tx_bytes = 1048576 - -# Maximum size of a batch of transactions to send to a peer -# Including space needed by encoding (one varint per transaction). -# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 -max_batch_bytes = 0 - -# ttl-duration, if non-zero, defines the maximum amount of time a transaction -# can exist for in the mempool. -# -# Note, if ttl-num-blocks is also defined, a transaction will be removed if it -# has existed in the mempool at least ttl-num-blocks number of blocks or if it's -# insertion time into the mempool is beyond ttl-duration. -ttl-duration = "0s" - -# ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction -# can exist for in the mempool. -# -# Note, if ttl-duration is also defined, a transaction will be removed if it -# has existed in the mempool at least ttl-num-blocks number of blocks or if -# it's insertion time into the mempool is beyond ttl-duration. -ttl-num-blocks = 0 - -####################################################### -### State Sync Configuration Options ### -####################################################### -[statesync] -# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine -# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in -# the network to take and serve state machine snapshots. State sync is not attempted if the node -# has any local state (LastBlockHeight > 0). The node will have a truncated block history, -# starting from the height of the snapshot. -enable = false - -# RPC servers (comma-separated) for light client verification of the synced state machine and -# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding -# header hash obtained from a trusted source, and a period during which validators can be trusted. -# -# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 -# weeks) during which they can be financially punished (slashed) for misbehavior. -rpc_servers = "" -trust_height = 0 -trust_hash = "" -trust_period = "168h0m0s" - -# Time to spend discovering snapshots before initiating a restore. -discovery_time = "15s" - -# Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). -# Will create a new, randomly named directory within, and remove it when done. -temp_dir = "" - -# The timeout duration before re-requesting a chunk, possibly from a different -# peer (default: 1 minute). -chunk_request_timeout = "10s" - -# The number of concurrent chunk fetchers to run (default: 1). -chunk_fetchers = "4" - -####################################################### -### Fast Sync Configuration Connections ### -####################################################### -[fastsync] - -# Fast Sync version to use: -# 1) "v0" (default) - the legacy fast sync implementation -# 2) "v1" - refactor of v0 version for better testability -# 2) "v2" - complete redesign of v0, optimized for testability & readability -version = "v0" - -####################################################### -### Consensus Configuration Options ### -####################################################### -[consensus] - -wal_file = "data/cs.wal/wal" - -# How long we wait for a proposal block before prevoting nil -timeout_propose = "3s" -# How much timeout_propose increases with each round -timeout_propose_delta = "500ms" -# How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) -timeout_prevote = "1s" -# How much the timeout_prevote increases with each round -timeout_prevote_delta = "500ms" -# How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) -timeout_precommit = "1s" -# How much the timeout_precommit increases with each round -timeout_precommit_delta = "500ms" -# How long we wait after committing a block, before starting on the new -# height (this gives us a chance to receive some more precommits, even -# though we already have +2/3). -timeout_commit = "2s" - -# How many blocks to look back to check existence of the node's consensus votes before joining consensus -# When non-zero, the node will panic upon restart -# if the same consensus key was used to sign {double_sign_check_height} last blocks. -# So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. -double_sign_check_height = 0 - -# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) -skip_timeout_commit = false - -# EmptyBlocks mode and possible interval between empty blocks -create_empty_blocks = true -create_empty_blocks_interval = "0s" - -# Reactor sleep duration parameters -peer_gossip_sleep_duration = "100ms" -peer_query_maj23_sleep_duration = "2s" - -####################################################### -### Storage Configuration Options ### -####################################################### -[storage] - -# Set to true to discard ABCI responses from the state store, which can save a -# considerable amount of disk space. Set to false to ensure ABCI responses are -# persisted. ABCI responses are required for /block_results RPC queries, and to -# reindex events in the command-line tool. -discard_abci_responses = false - -####################################################### -### Transaction Indexer Configuration Options ### -####################################################### -[tx_index] - -# What indexer to use for transactions -# -# The application will set which txs to index. In some cases a node operator will be able -# to decide which txs to index based on configuration set in the application. -# -# Options: -# 1) "null" -# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). -# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. -# 3) "psql" - the indexer services backed by PostgreSQL. -# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. -indexer = "kv" - -# The PostgreSQL connection configuration, the connection format: -# postgresql://:@:/? -psql-conn = "" - -####################################################### -### Instrumentation Configuration Options ### -####################################################### -[instrumentation] - -# When true, Prometheus metrics are served under /metrics on -# PrometheusListenAddr. -# Check out the documentation for the list of available metrics. -prometheus = false - -# Address to listen for Prometheus collector(s) connections -prometheus_listen_addr = ":26660" - -# Maximum number of simultaneous connections. -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -max_open_connections = 3 - -# Instrumentation namespace -namespace = "tendermint" \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/config/genesis.json b/contrib/localnet/zetacored/zetacored_zetacore0/config/genesis.json deleted file mode 100644 index 65ed217f6d..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/config/genesis.json +++ /dev/null @@ -1,810 +0,0 @@ -{ - "genesis_time": "2023-01-16T04:54:06.919538199Z", - "chain_id": "athens_101-1", - "initial_height": "1", - "consensus_params": { - "block": { - "max_bytes": "22020096", - "max_gas": "100000000", - "time_iota_ms": "1000" - }, - "evidence": { - "max_age_num_blocks": "100000", - "max_age_duration": "172800000000000", - "max_bytes": "1048576" - }, - "validator": { - "pub_key_types": [ - "ed25519" - ] - }, - "version": {} - }, - "app_hash": "", - "app_state": { - "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": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "pub_key": { - "@type":"/cosmos.crypto.secp256k1.PubKey", - "key":"AvUEsFHbsr40nTSmWh7CWYRZHGwf4cpRLtJlaRO4VAoq" - }, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "pub_key": { - "@type":"/cosmos.crypto.secp256k1.PubKey", - "key":"A0mB4PyE5XeS3sNpFXIX536INyNoJHkMu1DEQ8FgH8Mq" - }, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "pub_key": null, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1h4m2lf04kpzn4c6fj7tfcnr29fmgk2vfpkjma6", - "pub_key": null, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "pub_key": null, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk", - "pub_key": null, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - } - ] - }, - "bank": { - "params": { - "send_enabled": [], - "default_send_enabled": true - }, - "balances": [ - { - "address": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "coins": [ - { - "denom": "azeta", - "amount": "100000000000000000000000000" - } - ] - }, - { - "address": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "coins": [ - { - "denom": "azeta", - "amount": "100000000000000000000000000" - } - ] - }, - { - "address": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "coins": [ - { - "denom": "azeta", - "amount": "100000000000000000000000000" - } - ] - }, - { - "address": "zeta1h4m2lf04kpzn4c6fj7tfcnr29fmgk2vfpkjma6", - "coins": [ - { - "denom": "azeta", - "amount": "10000000000000000000000" - } - ] - }, - { - "address": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "coins": [ - { - "denom": "azeta", - "amount": "100000000000000000000000000" - } - ] - }, - { - "address": "zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk", - "coins": [ - { - "denom": "azeta", - "amount": "100000000000000000000000000" - } - ] - } - ], - "supply": [ - { - "denom": "azeta", - "amount": "500010000000000000000000000" - } - ], - "denom_metadata": [] - }, - "crisis": { - "constant_fee": { - "denom": "azeta", - "amount": "1000" - } - }, - "crosschain": { - "params": { - "enabled": false - }, - "outboundTrackerList": [], - "keygen": null, - "tSSVoterList": [], - "tSSList": [], - "gasPriceList": [], - "chainNoncesList": [], - "CrossChainTxs": [], - "nodeAccountList": [ - { - "creator": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "tssSignerAddress": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "pubkeySet": { - "secp256k1": "zetapub1addwnpepqt6sfvz3mwetudyaxjn958kztxz9j8rvrlsu55fw6fjkjyac2s9z53lsz4t" - } - }, - { - "creator": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "tssSignerAddress": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "pubkeySet": { - "secp256k1": "zetapub1addwnpepqdycrc8usnjh0yk7cd532ushualgsderdqj8jr9m2rzy8stqrlpj5drvw6u" - } - } - ], - "lastBlockHeightList": [] - }, - "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": [] - }, - "emissions": { - "params": { - "max_bond_factor": "1.25", - "min_bond_factor": "0.75", - "avg_block_time": "6.00", - "target_bond_ratio": "00.67", - "validator_emission_percentage": "00.50", - "observer_emission_percentage": "00.25", - "tss_signer_emission_percentage": "00.25", - "duration_factor_constant": "0.001877876953694702" - }, - "withdrawableEmissions": [] - }, - "evidence": { - "evidence": [] - }, - "evm": { - "accounts": [], - "params": { - "evm_denom": "azeta", - "enable_create": true, - "enable_call": true, - "extra_eips": [], - "chain_config": { - "homestead_block": "0", - "dao_fork_block": "0", - "dao_fork_support": true, - "eip150_block": "0", - "eip150_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "eip155_block": "0", - "eip158_block": "0", - "byzantium_block": "0", - "constantinople_block": "0", - "petersburg_block": "0", - "istanbul_block": "0", - "muir_glacier_block": "0", - "berlin_block": "0", - "london_block": "0", - "arrow_glacier_block": "0", - "gray_glacier_block": "0", - "merge_netsplit_block": "0" - }, - "allow_unprotected_txs": false - } - }, - "feemarket": { - "params": { - "no_base_fee": false, - "base_fee_change_denominator": 8, - "elasticity_multiplier": 2, - "enable_height": "0", - "base_fee": "1000000000", - "min_gas_price": "10000000000.0", - "min_gas_multiplier": "0.500000000000000000" - }, - "block_gas": "0" - }, - "fungible": { - "params": {}, - "foreignCoinsList": [], - "systemContract": null - }, - "genutil": { - "gen_txs": [ - { - "body": { - "messages": [ - { - "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", - "description": { - "moniker": "zetachain", - "identity": "", - "website": "", - "security_contact": "", - "details": "" - }, - "commission": { - "rate": "0.100000000000000000", - "max_rate": "0.200000000000000000", - "max_change_rate": "0.010000000000000000" - }, - "min_self_delegation": "1", - "delegator_address": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "validator_address": "zetavaloper1z46tdw75jvh4h39y3vu758ctv34rw5z9jmut95", - "pubkey": { - "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "cnOc/39ATQw+bYKG56pL8A2aMO6M8sBxXO3OVJHbhdA=" - }, - "value": { - "denom": "azeta", - "amount": "10000000000000000000000000" - } - } - ], - "memo": "baef847b3c8b4fc599b4434b1f234a95de70cdc2@172.20.0.11:26656", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [ - { - "public_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A5xB7o1mDrL/KygJY5y45rWkMlplJlKpUtAxFIpoLyLn" - }, - "mode_info": { - "single": { - "mode": "SIGN_MODE_DIRECT" - } - }, - "sequence": "0" - } - ], - "fee": { - "amount": [], - "gas_limit": "200000", - "payer": "", - "granter": "" - } - }, - "signatures": [ - "xo+pCyqUVhYyDoZiL0lZmwgdoyESaD/GXwX3dYyOfb0XcX72p/VcVPAH8LKb4rRp3WNg+0e0ge0ps5sn4cinbg==" - ] - }, - { - "body": { - "messages": [ - { - "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", - "description": { - "moniker": "zetacore1", - "identity": "", - "website": "", - "security_contact": "", - "details": "" - }, - "commission": { - "rate": "0.100000000000000000", - "max_rate": "0.200000000000000000", - "max_change_rate": "0.010000000000000000" - }, - "min_self_delegation": "1", - "delegator_address": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "validator_address": "zetavaloper1lz2fqwzjnk6qy48fgj753h48444fxtt7newaeu", - "pubkey": { - "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "TpCVIVP20iVz5vE7OY6R78HvIzP22Je0zHHnjJAcBnY=" - }, - "value": { - "denom": "azeta", - "amount": "10000000000000000000000000" - } - } - ], - "memo": "c9733926bd0e54244bd5189f64be9a5bd3754599@zetacore1:26656", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [ - { - "public_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A+INzBCKz8TVJ0QBabAGIUKXMKyQTalQ761JBBQSYfr3" - }, - "mode_info": { - "single": { - "mode": "SIGN_MODE_DIRECT" - } - }, - "sequence": "0" - } - ], - "fee": { - "amount": [], - "gas_limit": "200000", - "payer": "", - "granter": "" - } - }, - "signatures": [ - "db3f3P/7BMMiH+Sh+WCflVYk69Zi659fXsJ0DHtQPJ1KaNorFVf8j1TZ0dnBYy7XyeDKtmu6b52OpnPT86W7SQ==" - ] - } - ] - }, - "gov": { - "starting_proposal_id": "1", - "deposits": [], - "votes": [], - "proposals": [], - "deposit_params": { - "min_deposit": [ - { - "denom": "azeta", - "amount": "10000000" - } - ], - "max_deposit_period": "100s" - }, - "voting_params": { - "voting_period": "100s" - }, - "tally_params": { - "quorum": "0.334000000000000000", - "threshold": "0.500000000000000000", - "veto_threshold": "0.334000000000000000" - } - }, - "ibc": { - "client_genesis": { - "clients": [], - "clients_consensus": [], - "clients_metadata": [], - "params": { - "allowed_clients": [ - "06-solomachine", - "07-tendermint" - ] - }, - "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" - } - }, - "mint": { - "minter": { - "inflation": "0.130000000000000000", - "annual_provisions": "0.000000000000000000" - }, - "params": { - "mint_denom": "azeta", - "inflation_rate_change": "0.130000000000000000", - "inflation_max": "0.200000000000000000", - "inflation_min": "0.070000000000000000", - "goal_bonded": "0.670000000000000000", - "blocks_per_year": "6311520" - } - }, - "observer": { - "core_params_list": [], - "observers": [ - { - "observer_chain": { - "chain_name": 14, - "chain_id": 1337 - }, - "observer_list": [ - "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52" - ] - }, - { - "observer_chain": { - "chain_name": 14, - "chain_id": 1337 - }, - "observer_list": [ - "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52" - ] - }, - { - "observer_chain": { - "chain_name": 15, - "chain_id": 18444 - }, - "observer_list": [ - "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52" - ] - }, - { - "observer_chain": { - "chain_name": 15, - "chain_id": 18444 - }, - "observer_list": [ - "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52" - ] - } - ], - "params": { - "observer_params": [ - { - "chain": { - "chain_name": 15, - "chain_id": 18444 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 12, - "chain_id": 18332 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 3, - "chain_id": 8332 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 4, - "chain_id": 137 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 7, - "chain_id": 80001 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 9, - "chain_id": 1001 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 10, - "chain_id": 97 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 5, - "chain_id": 56 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 1, - "chain_id": 1 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 6, - "chain_id": 5 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 14, - "chain_id": 1337 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 2, - "chain_id": 101 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - } - ] - } - }, - "params": null, - "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": [] - }, - "authz": { - "authorization": [ - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgNonceVoter" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteGasPrice" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteInbound" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteOutbound" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgSetNodeKeys" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgCreateTSSVoter" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgAddOutboundTracker" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgNonceVoter" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteGasPrice" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteInbound" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteOutbound" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgSetNodeKeys" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgCreateTSSVoter" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgAddOutboundTracker" - }, - "expiration": null - } - ] - }, - "staking": { - "params": { - "unbonding_time": "1814400s", - "max_validators": 100, - "max_entries": 7, - "historical_entries": 10000, - "bond_denom": "azeta", - "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 - } - }, - "upgrade": {}, - "vesting": {} - } -} diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/config/gentx/gentx-baef847b3c8b4fc599b4434b1f234a95de70cdc2.json b/contrib/localnet/zetacored/zetacored_zetacore0/config/gentx/gentx-baef847b3c8b4fc599b4434b1f234a95de70cdc2.json deleted file mode 100644 index 9bfa456278..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/config/gentx/gentx-baef847b3c8b4fc599b4434b1f234a95de70cdc2.json +++ /dev/null @@ -1 +0,0 @@ -{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"zetachain","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz","validator_address":"zetavaloper1z46tdw75jvh4h39y3vu758ctv34rw5z9jmut95","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"cnOc/39ATQw+bYKG56pL8A2aMO6M8sBxXO3OVJHbhdA="},"value":{"denom":"azeta","amount":"10000000000000000000000000"}}],"memo":"baef847b3c8b4fc599b4434b1f234a95de70cdc2@172.20.0.11:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A5xB7o1mDrL/KygJY5y45rWkMlplJlKpUtAxFIpoLyLn"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["xo+pCyqUVhYyDoZiL0lZmwgdoyESaD/GXwX3dYyOfb0XcX72p/VcVPAH8LKb4rRp3WNg+0e0ge0ps5sn4cinbg=="]} diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/config/gentx/gentx-c9733926bd0e54244bd5189f64be9a5bd3754599.json b/contrib/localnet/zetacored/zetacored_zetacore0/config/gentx/gentx-c9733926bd0e54244bd5189f64be9a5bd3754599.json deleted file mode 100644 index a52901f54e..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/config/gentx/gentx-c9733926bd0e54244bd5189f64be9a5bd3754599.json +++ /dev/null @@ -1 +0,0 @@ -{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"zetacore1","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52","validator_address":"zetavaloper1lz2fqwzjnk6qy48fgj753h48444fxtt7newaeu","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"TpCVIVP20iVz5vE7OY6R78HvIzP22Je0zHHnjJAcBnY="},"value":{"denom":"azeta","amount":"10000000000000000000000000"}}],"memo":"c9733926bd0e54244bd5189f64be9a5bd3754599@zetacore1:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A+INzBCKz8TVJ0QBabAGIUKXMKyQTalQ761JBBQSYfr3"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["db3f3P/7BMMiH+Sh+WCflVYk69Zi659fXsJ0DHtQPJ1KaNorFVf8j1TZ0dnBYy7XyeDKtmu6b52OpnPT86W7SQ=="]} diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/config/node_key.json b/contrib/localnet/zetacored/zetacored_zetacore0/config/node_key.json deleted file mode 100644 index 731eb33633..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/config/node_key.json +++ /dev/null @@ -1 +0,0 @@ -{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"reRJzAw+jUfqYEW5oVNhLk294qbxjl7Eif84LmVFiJ8QszriQQwepdGcVDglM+sI0p78GDfau9785f0ESHsxwg=="}} \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/config/priv_validator_key.json b/contrib/localnet/zetacored/zetacored_zetacore0/config/priv_validator_key.json deleted file mode 100644 index a7827e9035..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/config/priv_validator_key.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "address": "B3378A91E00C34CD41B92013B2C63402AE7048F6", - "pub_key": { - "type": "tendermint/PubKeyEd25519", - "value": "cnOc/39ATQw+bYKG56pL8A2aMO6M8sBxXO3OVJHbhdA=" - }, - "priv_key": { - "type": "tendermint/PrivKeyEd25519", - "value": "gFdcR+5UpH8hMECL1vTzj0BwEJR4CXdsz7S9lJ+Xu8Ryc5z/f0BNDD5tgobnqkvwDZow7ozywHFc7c5UkduF0A==" - } -} \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/2b8526afb7adbea65fde95a1a3e084a203227060.address b/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/2b8526afb7adbea65fde95a1a3e084a203227060.address deleted file mode 100644 index 4b157c8c62..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/2b8526afb7adbea65fde95a1a3e084a203227060.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wMy0xNCAxMzo0NTo0My40MDk3NDMgLTA0MDAgRURUIG09KzAuMDUyODI0MDQzIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiQ1V3M2pOVU5QN0U0N1BhdSJ9.BmnnkUiIA1G6bb1lvMA_bzYIaMFp5OyBuhvgfTdSZzMfBa850pkdLg.lyJnCfBkryIRMDlu.LryBCZHOWfigEAslXZ7AG3Dlynat-BTFg7yYHnQP6IuImOIqYewSdYsh1YhWL9dF_6gIoNKnLb4PdrUTPOIxbRtOq-Ql1lmrsLSmuREPRRAcvwu_MkXl3H6bAWwu4LSqFCLk5rUSOqNVPm0w5KwGEaQmMJ3I364Y3-Zkz5R_GaBPcQrBv-RV4b-QgEcNe11QcO03L5-y7GcULYhdA8dsXIXRsBflZa-KDWroqW-mAH5IWepAJqJnF_msl_ZGFs6Rd0M.BCXGB5dCitR62OeQbqfXFw \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/813ac22a61491655e2786ae0d127d6990bfbfbde.address b/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/813ac22a61491655e2786ae0d127d6990bfbfbde.address deleted file mode 100644 index 6aff7bc819..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/813ac22a61491655e2786ae0d127d6990bfbfbde.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wMy0xNCAxMzo0MjoxOC41NDcyMjEgLTA0MDAgRURUIG09KzAuMDQ2NDQ5NTg0IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoid0FFeDRXQXJQQTdZY2paQSJ9.mBrylq7naOtZ4oTeJZGAIu17-yoa4fxuWxAKKzNgfPbNJpqDljWESg.hNC-7MQLaWisi4pm.aAqj7J5-5GwNwWdfJhdjtgCkG7yVVeLYIqATWF2M7jIrJ7L-nTneXMKIHvUsGjyOvQIMPRslF_oUSCljtsGYntEtxLPZskWeMSDotK0izDgJ1tT4uTOAHJcvHA0-RLgWW_F2AgtL4T8lI4NOrHWLrHDScIq5NaGnNxp8sn0EAXt0FVRsEmnNmfZTEBo9YYwd8xThIm0TJPliyH7FSMEFmHek4zhf9oFIFYq2dEz9PovoGHJDgxabFzGJ5uDccXs2VhNj-zYxlida_Q.MNJrUnSVeOc7csB_a45ElA \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_grantee_observer.info b/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_grantee_observer.info deleted file mode 100644 index ce52801545..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_grantee_observer.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wMy0xNCAxMzo0MjoxOC41NDU3NDMgLTA0MDAgRURUIG09KzAuMDQ0OTcxNTAxIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiNXRCNjNMTFJ6UlVRemtUcSJ9.fJHzCAKqMML_lQrmwV3yCaeSgAoYXif9JKnmyVULDjn0Fv_0O64ThQ.IGtCyHZroJ3BdqxT.e-fdeRZEJexxUWFTAcG28qg1-wBEeaCkfpYHXWgjPXCCyFW1Kxro-Ife2MWMBcZYRu0tBTkfOtpIChXmVwD-VuFyg1K2MBmWdcPr426fdBgQBVmshf7fOhxACF777fe8xrAjntZN_eXg5_RfDKFuICCDKs9aL6ifRsFL3A0cPRC8Evgvkc23J7Bd1XB7IOmr7sO4VG4JtWS4a23vnuAK2hxz9O0j61yyKZz121j7SM-VS8xXOC3kdoJrI9s_iZJDcTqVc3M0BMOCNmDs4aU5aDLtWBRh3d_snoLFHVCUL05ww46c2k4-laiKgPTlpLrGddQQs5uMjqE4d6jChN-3wh3OkZ-QTv3yRw4yJNSeeZhpU_P-JziitutKOFR-q1o75NMrsBE3I5ONPOA5yLuvWMshuK_TKwR12yIhIzwSUoG5DTOVeG77JGZs2QK1ntMckahjpcwBk8Dca2QVEHxF_e6l5EImcmLIoDanUK7bVw.UwTtpJim6K4UiE2FLuBHBQ \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_tss_signer.info b/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_tss_signer.info deleted file mode 100644 index 10f8acbd9e..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_tss_signer.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wMy0xNCAxMzo0NTo0My40MDgyNjYgLTA0MDAgRURUIG09KzAuMDUxMzQ3NjI2IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiN2hGVlNEUlZNYThDRXBXTiJ9.jE5cAZvDrhO3KrtEN9qlJBFEQYJA3iKxf_N7uf1NM7K_ZnpGVFcjMw.vwgpBb6R-luPYEmU.Q1nHt9EQtMOs-NKSAVuyWKfn-SBAPfX5qoGoE8oRQRG2OWKi-68fTsZdS3ufc2Sg_ezsOXrwm_MIZiwO8ebupsfEdwtm3EYf_KcMTW69PhHEsZ_16wS8DEZW9IO4JHPS1PF6wLVcK-LhmIg1BIn7KuoAC4a9Va2e2DfyroePnlci--_qeJq8IYgJVTtvyi-ITock9LiZnxsKWsQ02PcIt0KYrfCc5gnUl11Qf1F8b1E7TwaT2hopVBTRZvPg0pl11_e6iiKS3NQFujbM1V0qQVrpYv1o_IFzl25_qsxOaOtqozKiJMW6tJ301a5BDgVAtcpTGvRNivGh7G5O-vAta-wsq3DN-PcPMhgbypy-MfGLR5pwCUYQZdb6JTguOiOqOmhFUQM9VMmPPUx5K_GqN2FKLT3dabqO5AWL647QktNCu5cEf-_nOa-tjELuEjZjraO_OiOV1fzxmSZBtdeprHk.PfEq2htzLC4uKUzVaUhJmA \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_zetaclient_grantee.info b/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_zetaclient_grantee.info deleted file mode 100644 index ce52801545..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/keyring-test/val_zetaclient_grantee.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wMy0xNCAxMzo0MjoxOC41NDU3NDMgLTA0MDAgRURUIG09KzAuMDQ0OTcxNTAxIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiNXRCNjNMTFJ6UlVRemtUcSJ9.fJHzCAKqMML_lQrmwV3yCaeSgAoYXif9JKnmyVULDjn0Fv_0O64ThQ.IGtCyHZroJ3BdqxT.e-fdeRZEJexxUWFTAcG28qg1-wBEeaCkfpYHXWgjPXCCyFW1Kxro-Ife2MWMBcZYRu0tBTkfOtpIChXmVwD-VuFyg1K2MBmWdcPr426fdBgQBVmshf7fOhxACF777fe8xrAjntZN_eXg5_RfDKFuICCDKs9aL6ifRsFL3A0cPRC8Evgvkc23J7Bd1XB7IOmr7sO4VG4JtWS4a23vnuAK2hxz9O0j61yyKZz121j7SM-VS8xXOC3kdoJrI9s_iZJDcTqVc3M0BMOCNmDs4aU5aDLtWBRh3d_snoLFHVCUL05ww46c2k4-laiKgPTlpLrGddQQs5uMjqE4d6jChN-3wh3OkZ-QTv3yRw4yJNSeeZhpU_P-JziitutKOFR-q1o75NMrsBE3I5ONPOA5yLuvWMshuK_TKwR12yIhIzwSUoG5DTOVeG77JGZs2QK1ntMckahjpcwBk8Dca2QVEHxF_e6l5EImcmLIoDanUK7bVw.UwTtpJim6K4UiE2FLuBHBQ \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore0/priv_validator_state.json b/contrib/localnet/zetacored/zetacored_zetacore0/priv_validator_state.json deleted file mode 100644 index 48f3b67e3f..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore0/priv_validator_state.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "height": "0", - "round": 0, - "step": 0 -} \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/config/app.toml b/contrib/localnet/zetacored/zetacored_zetacore1/config/app.toml deleted file mode 100644 index 9d64d38476..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/config/app.toml +++ /dev/null @@ -1,283 +0,0 @@ -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -############################################################################### -### Base Configuration ### -############################################################################### - -# The minimum gas prices a validator is willing to accept for processing a -# transaction. A transaction's fees must meet the minimum of any denomination -# specified in this config (e.g. 0.25token1;0.0001token2). -minimum-gas-prices = "0azeta" - -# default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals -# nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) -# everything: all saved states will be deleted, storing only the current and previous state; pruning at 10 block intervals -# custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' -pruning = "default" - -# These are applied if and only if the pruning strategy is custom. -pruning-keep-recent = "0" -pruning-keep-every = "0" -pruning-interval = "0" - -# HaltHeight contains a non-zero block height at which a node will gracefully -# halt and shutdown that can be used to assist upgrades and testing. -# -# Note: Commitment of state will be attempted on the corresponding block. -halt-height = 0 - -# HaltTime contains a non-zero minimum block time (in Unix seconds) at which -# a node will gracefully halt and shutdown that can be used to assist upgrades -# and testing. -# -# Note: Commitment of state will be attempted on the corresponding block. -halt-time = 0 - -# MinRetainBlocks defines the minimum block height offset from the current -# block being committed, such that all blocks past this offset are pruned -# from Tendermint. It is used as part of the process of determining the -# ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates -# that no blocks should be pruned. -# -# This configuration value is only responsible for pruning Tendermint blocks. -# It has no bearing on application state pruning which is determined by the -# "pruning-*" configurations. -# -# Note: Tendermint block pruning is dependant on this parameter in conunction -# with the unbonding (safety threshold) period, state pruning and state sync -# snapshot parameters to determine the correct minimum value of -# ResponseCommit.RetainHeight. -min-retain-blocks = 0 - -# InterBlockCache enables inter-block caching. -inter-block-cache = true - -# IndexEvents defines the set of events in the form {eventType}.{attributeKey}, -# which informs Tendermint what to index. If empty, all events will be indexed. -# -# Example: -# ["message.sender", "message.recipient"] -index-events = [] - -# IavlCacheSize set the size of the iavl tree cache. -# Default cache size is 50mb. -iavl-cache-size = 781250 - -# IAVLDisableFastNode enables or disables the fast node feature of IAVL. -# Default is true. -iavl-disable-fastnode = true - -############################################################################### -### Telemetry Configuration ### -############################################################################### - -[telemetry] - -# Prefixed with keys to separate services. -service-name = "" - -# Enabled enables the application telemetry functionality. When enabled, -# an in-memory sink is also enabled by default. Operators may also enabled -# other sinks such as Prometheus. -enabled = false - -# Enable prefixing gauge values with hostname. -enable-hostname = false - -# Enable adding hostname to labels. -enable-hostname-label = false - -# Enable adding service to labels. -enable-service-label = false - -# PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. -prometheus-retention-time = 0 - -# GlobalLabels defines a global set of name/value label tuples applied to all -# metrics emitted using the wrapper functions defined in telemetry package. -# -# Example: -# [["chain_id", "cosmoshub-1"]] -global-labels = [ -] - -############################################################################### -### API Configuration ### -############################################################################### - -[api] - -# Enable defines if the API server should be enabled. -enable = true - -# Swagger defines if swagger documentation should automatically be registered. -swagger = true - -# Address defines the API server to listen on. -address = "tcp://0.0.0.0:1317" - -# MaxOpenConnections defines the number of maximum open connections. -max-open-connections = 1000 - -# RPCReadTimeout defines the Tendermint RPC read timeout (in seconds). -rpc-read-timeout = 10 - -# RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds). -rpc-write-timeout = 0 - -# RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes). -rpc-max-body-bytes = 1000000 - -# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). -enabled-unsafe-cors = true - -############################################################################### -### Rosetta Configuration ### -############################################################################### - -[rosetta] - -# Enable defines if the Rosetta API server should be enabled. -enable = true - -# Address defines the Rosetta API server to listen on. -address = ":8080" - -# Network defines the name of the blockchain that will be returned by Rosetta. -blockchain = "app" - -# Network defines the name of the network that will be returned by Rosetta. -network = "network" - -# Retries defines the number of retries when connecting to the node before failing. -retries = 3 - -# Offline defines if Rosetta server should run in offline mode. -offline = false - -############################################################################### -### gRPC Configuration ### -############################################################################### - -[grpc] - -# Enable defines if the gRPC server should be enabled. -enable = true - -# Address defines the gRPC server address to bind to. -address = "0.0.0.0:9090" - -############################################################################### -### gRPC Web Configuration ### -############################################################################### - -[grpc-web] - -# GRPCWebEnable defines if the gRPC-web should be enabled. -# NOTE: gRPC must also be enabled, otherwise, this configuration is a no-op. -enable = true - -# Address defines the gRPC-web server address to bind to. -address = "0.0.0.0:9091" - -# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). -enable-unsafe-cors = false - -############################################################################### -### State Sync Configuration ### -############################################################################### - -# State sync snapshots allow other nodes to rapidly join the network without replaying historical -# blocks, instead downloading and applying a snapshot of the application state at a given height. -[state-sync] - -# snapshot-interval specifies the block interval at which local state sync snapshots are -# taken (0 to disable). Must be a multiple of pruning-keep-every. -snapshot-interval = 0 - -# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). -snapshot-keep-recent = 2 - -############################################################################### -### EVM Configuration ### -############################################################################### - -[evm] - -# Tracer defines the 'vm.Tracer' type that the EVM will use when the node is run in -# debug mode. To enable tracing use the '--evm.tracer' flag when starting your node. -# Valid types are: json|struct|access_list|markdown -tracer = "" - -# MaxTxGasWanted defines the gas wanted for each eth tx returned in ante handler in check tx mode. -max-tx-gas-wanted = 0 - -############################################################################### -### JSON RPC Configuration ### -############################################################################### - -[json-rpc] - -# Enable defines if the gRPC server should be enabled. -enable = true - -# Address defines the EVM RPC HTTP server address to bind to. -address = "0.0.0.0:8545" - -# Address defines the EVM WebSocket server address to bind to. -ws-address = "0.0.0.0:8546" - -# API defines a list of JSON-RPC namespaces that should be enabled -# Example: "eth,txpool,personal,net,debug,web3" -api = "eth,net,web3" - -# GasCap sets a cap on gas that can be used in eth_call/estimateGas (0=infinite). Default: 25,000,000. -gas-cap = 25000000 - -# EVMTimeout is the global timeout for eth_call. Default: 5s. -evm-timeout = "5s" - -# TxFeeCap is the global tx-fee cap for send transaction. Default: 1eth. -txfee-cap = 1 - -# FilterCap sets the global cap for total number of filters that can be created -filter-cap = 200 - -# FeeHistoryCap sets the global cap for total number of blocks that can be fetched -feehistory-cap = 100 - -# LogsCap defines the max number of results can be returned from single 'eth_getLogs' query. -logs-cap = 10000 - -# BlockRangeCap defines the max block range allowed for 'eth_getLogs' query. -block-range-cap = 10000 - -# HTTPTimeout is the read/write timeout of http json-rpc server. -http-timeout = "30s" - -# HTTPIdleTimeout is the idle timeout of http json-rpc server. -http-idle-timeout = "2m0s" - -# AllowUnprotectedTxs restricts unprotected (non EIP155 signed) transactions to be submitted via -# the node's RPC when the global parameter is disabled. -allow-unprotected-txs = false - -# MaxOpenConnections sets the maximum number of simultaneous connections -# for the server listener. -max-open-connections = 0 - -# EnableIndexer enables the custom transaction indexer for the EVM (ethereum transactions). -enable-indexer = false - -############################################################################### -### TLS Configuration ### -############################################################################### - -[tls] - -# Certificate path defines the cert.pem file path for the TLS configuration. -certificate-path = "" - -# Key path defines the key.pem file path for the TLS configuration. -key-path = "" \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/config/client.toml b/contrib/localnet/zetacored/zetacored_zetacore1/config/client.toml deleted file mode 100644 index f2b86d8fa5..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/config/client.toml +++ /dev/null @@ -1,17 +0,0 @@ -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -############################################################################### -### Client Configuration ### -############################################################################### - -# The network chain ID -chain-id = "athens_101-1" -# The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory) -keyring-backend = "test" -# CLI output format (text|json) -output = "text" -# : to Tendermint RPC interface for this chain -node = "tcp://localhost:26657" -# Transaction broadcasting mode (sync|async|block) -broadcast-mode = "sync" diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/config/config.toml b/contrib/localnet/zetacored/zetacored_zetacore1/config/config.toml deleted file mode 100644 index 1f1c63c074..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/config/config.toml +++ /dev/null @@ -1,463 +0,0 @@ -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or -# relative to the home directory (e.g. "data"). The home directory is -# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable -# or --home cmd flag. - -####################################################################### -### Main Base Config Options ### -####################################################################### - -# TCP or UNIX socket address of the ABCI application, -# or the name of an ABCI application compiled in with the Tendermint binary -proxy_app = "tcp://127.0.0.1:26658" - -# A custom human readable name for this node -moniker = "zetacore1" - -# If this node is many blocks behind the tip of the chain, FastSync -# allows them to catchup quickly by downloading blocks in parallel -# and verifying their commits -fast_sync = true - -# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb -# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) -# - pure go -# - stable -# * cleveldb (uses levigo wrapper) -# - fast -# - requires gcc -# - use cleveldb build tag (go build -tags cleveldb) -# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) -# - EXPERIMENTAL -# - may be faster is some use-cases (random reads - indexer) -# - use boltdb build tag (go build -tags boltdb) -# * rocksdb (uses github.com/tecbot/gorocksdb) -# - EXPERIMENTAL -# - requires gcc -# - use rocksdb build tag (go build -tags rocksdb) -# * badgerdb (uses github.com/dgraph-io/badger) -# - EXPERIMENTAL -# - use badgerdb build tag (go build -tags badgerdb) -db_backend = "pebbledb" - -# Database directory -db_dir = "data" - -# Output level for logging, including package level options -log_level = "info" - -# Output format: 'plain' (colored text) or 'json' -log_format = "plain" - -##### additional base config options ##### - -# Path to the JSON file containing the initial validator set and other meta data -genesis_file = "config/genesis.json" - -# Path to the JSON file containing the private key to use as a validator in the consensus protocol -priv_validator_key_file = "config/priv_validator_key.json" - -# Path to the JSON file containing the last sign state of a validator -priv_validator_state_file = "data/priv_validator_state.json" - -# TCP or UNIX socket address for Tendermint to listen on for -# connections from an external PrivValidator process -priv_validator_laddr = "" - -# Path to the JSON file containing the private key to use for node authentication in the p2p protocol -node_key_file = "config/node_key.json" - -# Mechanism to connect to the ABCI application: socket | grpc -abci = "socket" - -# If true, query the ABCI app on connecting to a new peer -# so the app can decide if we should keep the connection or not -filter_peers = false - - -####################################################################### -### Advanced Configuration Options ### -####################################################################### - -####################################################### -### RPC Server Configuration Options ### -####################################################### -[rpc] - -# TCP or UNIX socket address for the RPC server to listen on -laddr = "tcp://0.0.0.0:26657" - -# A list of origins a cross-domain request can be executed from -# Default value '[]' disables cors support -# Use '["*"]' to allow any origin -cors_allowed_origins = [] - -# A list of methods the client is allowed to use with cross-domain requests -cors_allowed_methods = ["HEAD", "GET", "POST", ] - -# A list of non simple headers the client is allowed to use with cross-domain requests -cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] - -# TCP or UNIX socket address for the gRPC server to listen on -# NOTE: This server only supports /broadcast_tx_commit -grpc_laddr = "" - -# Maximum number of simultaneous connections. -# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} -# 1024 - 40 - 10 - 50 = 924 = ~900 -grpc_max_open_connections = 900 - -# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool -unsafe = false - -# Maximum number of simultaneous connections (including WebSocket). -# Does not include gRPC connections. See grpc_max_open_connections -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} -# 1024 - 40 - 10 - 50 = 924 = ~900 -max_open_connections = 900 - -# Maximum number of unique clientIDs that can /subscribe -# If you're using /broadcast_tx_commit, set to the estimated maximum number -# of broadcast_tx_commit calls per block. -max_subscription_clients = 100 - -# Maximum number of unique queries a given client can /subscribe to -# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to -# the estimated # maximum number of broadcast_tx_commit calls per block. -max_subscriptions_per_client = 5 - -# Experimental parameter to specify the maximum number of events a node will -# buffer, per subscription, before returning an error and closing the -# subscription. Must be set to at least 100, but higher values will accommodate -# higher event throughput rates (and will use more memory). -experimental_subscription_buffer_size = 200 - -# Experimental parameter to specify the maximum number of RPC responses that -# can be buffered per WebSocket client. If clients cannot read from the -# WebSocket endpoint fast enough, they will be disconnected, so increasing this -# parameter may reduce the chances of them being disconnected (but will cause -# the node to use more memory). -# -# Must be at least the same as "experimental_subscription_buffer_size", -# otherwise connections could be dropped unnecessarily. This value should -# ideally be somewhat higher than "experimental_subscription_buffer_size" to -# accommodate non-subscription-related RPC responses. -experimental_websocket_write_buffer_size = 200 - -# If a WebSocket client cannot read fast enough, at present we may -# silently drop events instead of generating an error or disconnecting the -# client. -# -# Enabling this experimental parameter will cause the WebSocket connection to -# be closed instead if it cannot read fast enough, allowing for greater -# predictability in subscription behaviour. -experimental_close_on_slow_client = false - -# How long to wait for a tx to be committed during /broadcast_tx_commit. -# WARNING: Using a value larger than 10s will result in increasing the -# global HTTP write timeout, which applies to all connections and endpoints. -# See https://github.com/tendermint/tendermint/issues/3435 -timeout_broadcast_tx_commit = "10s" - -# Maximum size of request body, in bytes -max_body_bytes = 1000000 - -# Maximum size of request header, in bytes -max_header_bytes = 1048576 - -# The path to a file containing certificate that is used to create the HTTPS server. -# Might be either absolute path or path related to Tendermint's config directory. -# If the certificate is signed by a certificate authority, -# the certFile should be the concatenation of the server's certificate, any intermediates, -# and the CA's certificate. -# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. -# Otherwise, HTTP server is run. -tls_cert_file = "" - -# The path to a file containing matching private key that is used to create the HTTPS server. -# Might be either absolute path or path related to Tendermint's config directory. -# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. -# Otherwise, HTTP server is run. -tls_key_file = "" - -# pprof listen address (https://golang.org/pkg/net/http/pprof) -pprof_laddr = "0.0.0.0:6060" - -####################################################### -### P2P Configuration Options ### -####################################################### -[p2p] - -# Address to listen for incoming connections -laddr = "tcp://0.0.0.0:26656" - -# Address to advertise to peers for them to dial -# If empty, will use the same port as the laddr, -# and will introspect on the listener or use UPnP -# to figure out the address. ip and port are required -# example: 159.89.10.97:26656 -external_address = "" - -# Comma separated list of seed nodes to connect to -seeds = "" - -# Comma separated list of nodes to keep persistent connections to -persistent_peers = "" - -# UPNP port forwarding -upnp = false - -# Path to address book -addr_book_file = "config/addrbook.json" - -# Set true for strict address routability rules -# Set false for private or local networks -addr_book_strict = true - -# Maximum number of inbound peers -max_num_inbound_peers = 40 - -# Maximum number of outbound peers to connect to, excluding persistent peers -max_num_outbound_peers = 10 - -# List of node IDs, to which a connection will be (re)established ignoring any existing limits -unconditional_peer_ids = "" - -# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) -persistent_peers_max_dial_period = "0s" - -# Time to wait before flushing messages out on the connection -flush_throttle_timeout = "100ms" - -# Maximum size of a message packet payload, in bytes -max_packet_msg_payload_size = 1024 - -# Rate at which packets can be received, in bytes/second -recv_rate = 5120000 - -# Set true to enable the peer-exchange reactor -pex = true - -# Seed mode, in which node constantly crawls the network and looks for -# peers. If another node asks it for addresses, it responds and disconnects. -# -# Does not work if the peer-exchange reactor is disabled. -seed_mode = false - -# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) -private_peer_ids = "" - -# Toggle to disable guard against peers connecting from the same ip. -allow_duplicate_ip = false - -# Peer connection configuration. -handshake_timeout = "20s" -dial_timeout = "3s" - -####################################################### -### Mempool Configuration Option ### -####################################################### -[mempool] - -# Mempool version to use: -# 1) "v0" - (default) FIFO mempool. -# 2) "v1" - prioritized mempool. -version = "v0" - -recheck = true -broadcast = true -wal_dir = "" - -# Maximum number of transactions in the mempool -size = 5000 - -# Limit the total size of all txs in the mempool. -# This only accounts for raw transactions (e.g. given 1MB transactions and -# max_txs_bytes=5MB, mempool will only accept 5 transactions). -max_txs_bytes = 1073741824 - -# Size of the cache (used to filter transactions we saw earlier) in transactions -cache_size = 10000 - -# Do not remove invalid transactions from the cache (default: false) -# Set to true if it's not possible for any invalid transaction to become valid -# again in the future. -keep-invalid-txs-in-cache = false - -# Maximum size of a single transaction. -# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. -max_tx_bytes = 1048576 - -# Maximum size of a batch of transactions to send to a peer -# Including space needed by encoding (one varint per transaction). -# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 -max_batch_bytes = 0 - -# ttl-duration, if non-zero, defines the maximum amount of time a transaction -# can exist for in the mempool. -# -# Note, if ttl-num-blocks is also defined, a transaction will be removed if it -# has existed in the mempool at least ttl-num-blocks number of blocks or if it's -# insertion time into the mempool is beyond ttl-duration. -ttl-duration = "0s" - -# ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction -# can exist for in the mempool. -# -# Note, if ttl-duration is also defined, a transaction will be removed if it -# has existed in the mempool at least ttl-num-blocks number of blocks or if -# it's insertion time into the mempool is beyond ttl-duration. -ttl-num-blocks = 0 - -####################################################### -### State Sync Configuration Options ### -####################################################### -[statesync] -# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine -# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in -# the network to take and serve state machine snapshots. State sync is not attempted if the node -# has any local state (LastBlockHeight > 0). The node will have a truncated block history, -# starting from the height of the snapshot. -enable = false - -# RPC servers (comma-separated) for light client verification of the synced state machine and -# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding -# header hash obtained from a trusted source, and a period during which validators can be trusted. -# -# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 -# weeks) during which they can be financially punished (slashed) for misbehavior. -rpc_servers = "" -trust_height = 0 -trust_hash = "" -trust_period = "168h0m0s" - -# Time to spend discovering snapshots before initiating a restore. -discovery_time = "15s" - -# Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). -# Will create a new, randomly named directory within, and remove it when done. -temp_dir = "" - -# The timeout duration before re-requesting a chunk, possibly from a different -# peer (default: 1 minute). -chunk_request_timeout = "10s" - -# The number of concurrent chunk fetchers to run (default: 1). -chunk_fetchers = "4" - -####################################################### -### Fast Sync Configuration Connections ### -####################################################### -[fastsync] - -# Fast Sync version to use: -# 1) "v0" (default) - the legacy fast sync implementation -# 2) "v1" - refactor of v0 version for better testability -# 2) "v2" - complete redesign of v0, optimized for testability & readability -version = "v0" - -####################################################### -### Consensus Configuration Options ### -####################################################### -[consensus] - -wal_file = "data/cs.wal/wal" - -# How long we wait for a proposal block before prevoting nil -timeout_propose = "3s" -# How much timeout_propose increases with each round -timeout_propose_delta = "500ms" -# How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) -timeout_prevote = "1s" -# How much the timeout_prevote increases with each round -timeout_prevote_delta = "500ms" -# How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) -timeout_precommit = "1s" -# How much the timeout_precommit increases with each round -timeout_precommit_delta = "500ms" -# How long we wait after committing a block, before starting on the new -# height (this gives us a chance to receive some more precommits, even -# though we already have +2/3). -timeout_commit = "2s" - -# How many blocks to look back to check existence of the node's consensus votes before joining consensus -# When non-zero, the node will panic upon restart -# if the same consensus key was used to sign {double_sign_check_height} last blocks. -# So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. -double_sign_check_height = 0 - -# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) -skip_timeout_commit = false - -# EmptyBlocks mode and possible interval between empty blocks -create_empty_blocks = true -create_empty_blocks_interval = "0s" - -# Reactor sleep duration parameters -peer_gossip_sleep_duration = "100ms" -peer_query_maj23_sleep_duration = "2s" - -####################################################### -### Storage Configuration Options ### -####################################################### -[storage] - -# Set to true to discard ABCI responses from the state store, which can save a -# considerable amount of disk space. Set to false to ensure ABCI responses are -# persisted. ABCI responses are required for /block_results RPC queries, and to -# reindex events in the command-line tool. -discard_abci_responses = false - -####################################################### -### Transaction Indexer Configuration Options ### -####################################################### -[tx_index] - -# What indexer to use for transactions -# -# The application will set which txs to index. In some cases a node operator will be able -# to decide which txs to index based on configuration set in the application. -# -# Options: -# 1) "null" -# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). -# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. -# 3) "psql" - the indexer services backed by PostgreSQL. -# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. -indexer = "kv" - -# The PostgreSQL connection configuration, the connection format: -# postgresql://:@:/? -psql-conn = "" - -####################################################### -### Instrumentation Configuration Options ### -####################################################### -[instrumentation] - -# When true, Prometheus metrics are served under /metrics on -# PrometheusListenAddr. -# Check out the documentation for the list of available metrics. -prometheus = false - -# Address to listen for Prometheus collector(s) connections -prometheus_listen_addr = ":26660" - -# Maximum number of simultaneous connections. -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -max_open_connections = 3 - -# Instrumentation namespace -namespace = "tendermint" \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/config/genesis.json b/contrib/localnet/zetacored/zetacored_zetacore1/config/genesis.json deleted file mode 100644 index 65ed217f6d..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/config/genesis.json +++ /dev/null @@ -1,810 +0,0 @@ -{ - "genesis_time": "2023-01-16T04:54:06.919538199Z", - "chain_id": "athens_101-1", - "initial_height": "1", - "consensus_params": { - "block": { - "max_bytes": "22020096", - "max_gas": "100000000", - "time_iota_ms": "1000" - }, - "evidence": { - "max_age_num_blocks": "100000", - "max_age_duration": "172800000000000", - "max_bytes": "1048576" - }, - "validator": { - "pub_key_types": [ - "ed25519" - ] - }, - "version": {} - }, - "app_hash": "", - "app_state": { - "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": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "pub_key": { - "@type":"/cosmos.crypto.secp256k1.PubKey", - "key":"AvUEsFHbsr40nTSmWh7CWYRZHGwf4cpRLtJlaRO4VAoq" - }, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "pub_key": { - "@type":"/cosmos.crypto.secp256k1.PubKey", - "key":"A0mB4PyE5XeS3sNpFXIX536INyNoJHkMu1DEQ8FgH8Mq" - }, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "pub_key": null, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1h4m2lf04kpzn4c6fj7tfcnr29fmgk2vfpkjma6", - "pub_key": null, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "pub_key": null, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk", - "pub_key": null, - "account_number": "0", - "sequence": "0" - }, - "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - } - ] - }, - "bank": { - "params": { - "send_enabled": [], - "default_send_enabled": true - }, - "balances": [ - { - "address": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "coins": [ - { - "denom": "azeta", - "amount": "100000000000000000000000000" - } - ] - }, - { - "address": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "coins": [ - { - "denom": "azeta", - "amount": "100000000000000000000000000" - } - ] - }, - { - "address": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "coins": [ - { - "denom": "azeta", - "amount": "100000000000000000000000000" - } - ] - }, - { - "address": "zeta1h4m2lf04kpzn4c6fj7tfcnr29fmgk2vfpkjma6", - "coins": [ - { - "denom": "azeta", - "amount": "10000000000000000000000" - } - ] - }, - { - "address": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "coins": [ - { - "denom": "azeta", - "amount": "100000000000000000000000000" - } - ] - }, - { - "address": "zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk", - "coins": [ - { - "denom": "azeta", - "amount": "100000000000000000000000000" - } - ] - } - ], - "supply": [ - { - "denom": "azeta", - "amount": "500010000000000000000000000" - } - ], - "denom_metadata": [] - }, - "crisis": { - "constant_fee": { - "denom": "azeta", - "amount": "1000" - } - }, - "crosschain": { - "params": { - "enabled": false - }, - "outboundTrackerList": [], - "keygen": null, - "tSSVoterList": [], - "tSSList": [], - "gasPriceList": [], - "chainNoncesList": [], - "CrossChainTxs": [], - "nodeAccountList": [ - { - "creator": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "tssSignerAddress": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "pubkeySet": { - "secp256k1": "zetapub1addwnpepqt6sfvz3mwetudyaxjn958kztxz9j8rvrlsu55fw6fjkjyac2s9z53lsz4t" - } - }, - { - "creator": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "tssSignerAddress": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "pubkeySet": { - "secp256k1": "zetapub1addwnpepqdycrc8usnjh0yk7cd532ushualgsderdqj8jr9m2rzy8stqrlpj5drvw6u" - } - } - ], - "lastBlockHeightList": [] - }, - "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": [] - }, - "emissions": { - "params": { - "max_bond_factor": "1.25", - "min_bond_factor": "0.75", - "avg_block_time": "6.00", - "target_bond_ratio": "00.67", - "validator_emission_percentage": "00.50", - "observer_emission_percentage": "00.25", - "tss_signer_emission_percentage": "00.25", - "duration_factor_constant": "0.001877876953694702" - }, - "withdrawableEmissions": [] - }, - "evidence": { - "evidence": [] - }, - "evm": { - "accounts": [], - "params": { - "evm_denom": "azeta", - "enable_create": true, - "enable_call": true, - "extra_eips": [], - "chain_config": { - "homestead_block": "0", - "dao_fork_block": "0", - "dao_fork_support": true, - "eip150_block": "0", - "eip150_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "eip155_block": "0", - "eip158_block": "0", - "byzantium_block": "0", - "constantinople_block": "0", - "petersburg_block": "0", - "istanbul_block": "0", - "muir_glacier_block": "0", - "berlin_block": "0", - "london_block": "0", - "arrow_glacier_block": "0", - "gray_glacier_block": "0", - "merge_netsplit_block": "0" - }, - "allow_unprotected_txs": false - } - }, - "feemarket": { - "params": { - "no_base_fee": false, - "base_fee_change_denominator": 8, - "elasticity_multiplier": 2, - "enable_height": "0", - "base_fee": "1000000000", - "min_gas_price": "10000000000.0", - "min_gas_multiplier": "0.500000000000000000" - }, - "block_gas": "0" - }, - "fungible": { - "params": {}, - "foreignCoinsList": [], - "systemContract": null - }, - "genutil": { - "gen_txs": [ - { - "body": { - "messages": [ - { - "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", - "description": { - "moniker": "zetachain", - "identity": "", - "website": "", - "security_contact": "", - "details": "" - }, - "commission": { - "rate": "0.100000000000000000", - "max_rate": "0.200000000000000000", - "max_change_rate": "0.010000000000000000" - }, - "min_self_delegation": "1", - "delegator_address": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "validator_address": "zetavaloper1z46tdw75jvh4h39y3vu758ctv34rw5z9jmut95", - "pubkey": { - "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "cnOc/39ATQw+bYKG56pL8A2aMO6M8sBxXO3OVJHbhdA=" - }, - "value": { - "denom": "azeta", - "amount": "10000000000000000000000000" - } - } - ], - "memo": "baef847b3c8b4fc599b4434b1f234a95de70cdc2@172.20.0.11:26656", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [ - { - "public_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A5xB7o1mDrL/KygJY5y45rWkMlplJlKpUtAxFIpoLyLn" - }, - "mode_info": { - "single": { - "mode": "SIGN_MODE_DIRECT" - } - }, - "sequence": "0" - } - ], - "fee": { - "amount": [], - "gas_limit": "200000", - "payer": "", - "granter": "" - } - }, - "signatures": [ - "xo+pCyqUVhYyDoZiL0lZmwgdoyESaD/GXwX3dYyOfb0XcX72p/VcVPAH8LKb4rRp3WNg+0e0ge0ps5sn4cinbg==" - ] - }, - { - "body": { - "messages": [ - { - "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", - "description": { - "moniker": "zetacore1", - "identity": "", - "website": "", - "security_contact": "", - "details": "" - }, - "commission": { - "rate": "0.100000000000000000", - "max_rate": "0.200000000000000000", - "max_change_rate": "0.010000000000000000" - }, - "min_self_delegation": "1", - "delegator_address": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "validator_address": "zetavaloper1lz2fqwzjnk6qy48fgj753h48444fxtt7newaeu", - "pubkey": { - "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "TpCVIVP20iVz5vE7OY6R78HvIzP22Je0zHHnjJAcBnY=" - }, - "value": { - "denom": "azeta", - "amount": "10000000000000000000000000" - } - } - ], - "memo": "c9733926bd0e54244bd5189f64be9a5bd3754599@zetacore1:26656", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [ - { - "public_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A+INzBCKz8TVJ0QBabAGIUKXMKyQTalQ761JBBQSYfr3" - }, - "mode_info": { - "single": { - "mode": "SIGN_MODE_DIRECT" - } - }, - "sequence": "0" - } - ], - "fee": { - "amount": [], - "gas_limit": "200000", - "payer": "", - "granter": "" - } - }, - "signatures": [ - "db3f3P/7BMMiH+Sh+WCflVYk69Zi659fXsJ0DHtQPJ1KaNorFVf8j1TZ0dnBYy7XyeDKtmu6b52OpnPT86W7SQ==" - ] - } - ] - }, - "gov": { - "starting_proposal_id": "1", - "deposits": [], - "votes": [], - "proposals": [], - "deposit_params": { - "min_deposit": [ - { - "denom": "azeta", - "amount": "10000000" - } - ], - "max_deposit_period": "100s" - }, - "voting_params": { - "voting_period": "100s" - }, - "tally_params": { - "quorum": "0.334000000000000000", - "threshold": "0.500000000000000000", - "veto_threshold": "0.334000000000000000" - } - }, - "ibc": { - "client_genesis": { - "clients": [], - "clients_consensus": [], - "clients_metadata": [], - "params": { - "allowed_clients": [ - "06-solomachine", - "07-tendermint" - ] - }, - "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" - } - }, - "mint": { - "minter": { - "inflation": "0.130000000000000000", - "annual_provisions": "0.000000000000000000" - }, - "params": { - "mint_denom": "azeta", - "inflation_rate_change": "0.130000000000000000", - "inflation_max": "0.200000000000000000", - "inflation_min": "0.070000000000000000", - "goal_bonded": "0.670000000000000000", - "blocks_per_year": "6311520" - } - }, - "observer": { - "core_params_list": [], - "observers": [ - { - "observer_chain": { - "chain_name": 14, - "chain_id": 1337 - }, - "observer_list": [ - "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52" - ] - }, - { - "observer_chain": { - "chain_name": 14, - "chain_id": 1337 - }, - "observer_list": [ - "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52" - ] - }, - { - "observer_chain": { - "chain_name": 15, - "chain_id": 18444 - }, - "observer_list": [ - "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52" - ] - }, - { - "observer_chain": { - "chain_name": 15, - "chain_id": 18444 - }, - "observer_list": [ - "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52" - ] - } - ], - "params": { - "observer_params": [ - { - "chain": { - "chain_name": 15, - "chain_id": 18444 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 12, - "chain_id": 18332 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 3, - "chain_id": 8332 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 4, - "chain_id": 137 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 7, - "chain_id": 80001 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 9, - "chain_id": 1001 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 10, - "chain_id": 97 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 5, - "chain_id": 56 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 1, - "chain_id": 1 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 6, - "chain_id": 5 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 14, - "chain_id": 1337 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - }, - { - "chain": { - "chain_name": 2, - "chain_id": 101 - }, - "ballot_threshold": "0.660000000000000000", - "min_observer_delegation": "10000000000.000000000000000000", - "is_supported": true - } - ] - } - }, - "params": null, - "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": [] - }, - "authz": { - "authorization": [ - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgNonceVoter" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteGasPrice" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteInbound" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteOutbound" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgSetNodeKeys" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgCreateTSSVoter" - }, - "expiration": null - }, - { - "granter": "zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz", - "grantee": "zeta1syavy2npfyt9tcncdtsdzf7kny9lh777heefxk", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgAddOutboundTracker" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgNonceVoter" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteGasPrice" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteInbound" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgVoteOutbound" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgSetNodeKeys" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgCreateTSSVoter" - }, - "expiration": null - }, - { - "granter": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "grantee": "zeta1l7hypmqk2yc334vc6vmdwzp5sdefygj2w5yj50", - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.crosschain.MsgAddOutboundTracker" - }, - "expiration": null - } - ] - }, - "staking": { - "params": { - "unbonding_time": "1814400s", - "max_validators": 100, - "max_entries": 7, - "historical_entries": 10000, - "bond_denom": "azeta", - "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 - } - }, - "upgrade": {}, - "vesting": {} - } -} diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/config/gentx/gentx-c9733926bd0e54244bd5189f64be9a5bd3754599.json b/contrib/localnet/zetacored/zetacored_zetacore1/config/gentx/gentx-c9733926bd0e54244bd5189f64be9a5bd3754599.json deleted file mode 100644 index 5cce662ea6..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/config/gentx/gentx-c9733926bd0e54244bd5189f64be9a5bd3754599.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "body": { - "messages": [ - { - "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", - "description": { - "moniker": "zetacore1", - "identity": "", - "website": "", - "security_contact": "", - "details": "" - }, - "commission": { - "rate": "0.100000000000000000", - "max_rate": "0.200000000000000000", - "max_change_rate": "0.010000000000000000" - }, - "min_self_delegation": "1", - "delegator_address": "zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52", - "validator_address": "zetavaloper1lz2fqwzjnk6qy48fgj753h48444fxtt7newaeu", - "pubkey": { - "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "TpCVIVP20iVz5vE7OY6R78HvIzP22Je0zHHnjJAcBnY=" - }, - "value": { - "denom": "azeta", - "amount": "10000000000000000000000000" - } - } - ], - "memo": "c9733926bd0e54244bd5189f64be9a5bd3754599@zetacore1:26656", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [ - { - "public_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A+INzBCKz8TVJ0QBabAGIUKXMKyQTalQ761JBBQSYfr3" - }, - "mode_info": { - "single": { - "mode": "SIGN_MODE_DIRECT" - } - }, - "sequence": "0" - } - ], - "fee": { - "amount": [], - "gas_limit": "200000", - "payer": "", - "granter": "" - } - }, - "signatures": [ - "db3f3P/7BMMiH+Sh+WCflVYk69Zi659fXsJ0DHtQPJ1KaNorFVf8j1TZ0dnBYy7XyeDKtmu6b52OpnPT86W7SQ==" - ] -} diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/config/node_key.json b/contrib/localnet/zetacored/zetacored_zetacore1/config/node_key.json deleted file mode 100644 index 2920207364..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/config/node_key.json +++ /dev/null @@ -1 +0,0 @@ -{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"W371xKZXOcZNMOuVcVv+aJvylep0V7aBbqgF2iCHC0wit8nUl67Iqhnv6dTQu3OR9E3pysh06zkmYezdDyql2w=="}} \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/config/priv_validator_key.json b/contrib/localnet/zetacored/zetacored_zetacore1/config/priv_validator_key.json deleted file mode 100644 index ed33e0de85..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/config/priv_validator_key.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "address": "AEABDEA088421C8621C7C2900E87D5D337F1B43E", - "pub_key": { - "type": "tendermint/PubKeyEd25519", - "value": "TpCVIVP20iVz5vE7OY6R78HvIzP22Je0zHHnjJAcBnY=" - }, - "priv_key": { - "type": "tendermint/PrivKeyEd25519", - "value": "yCXNjiRWr+8z7sh3Qnpa4DplOdvxBbVP6rp6Md4ZKYlOkJUhU/bSJXPm8Ts5jpHvwe8jM/bYl7TMceeMkBwGdg==" - } -} \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/dbfe49f1884bbf3bbfc6a689cc0d1afc550c320d.address b/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/dbfe49f1884bbf3bbfc6a689cc0d1afc550c320d.address deleted file mode 100644 index 12423f8269..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/dbfe49f1884bbf3bbfc6a689cc0d1afc550c320d.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wMy0xNCAxMzo0Njo0NC4wNjI3MTMgLTA0MDAgRURUIG09KzAuMDUxNzA4MjUxIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiQ3Z4ell0ZUJnSjlNd2MycyJ9.JgkexsaNDqeDWs-U17aIgic2TU252vMATcw8W3HYmLiYI5MZ4XsJkQ.6OBPdK8TW67G_1s1.5qLTmafak6KB3SLqckh-UJ_ekK4FCrsSjOxKtz2Z-AWwj2RJkbv3yxIXm1RSypNXLPzOHNc6TIc0ZQ8y46y9BBq7_oPaSPxVf0kXHpCE9CVkYz0qP2wFJDVX8w1cNZmZIAP9D8_qLOdXHnfSQTUVS0uZNZtHKclOqykwmOuhR80bwx6XAWQXKEcgB8VQAu8xxIFtzXDsFqfMFRm12jAHIDNzDFGUAEeMDKLxcRyCAXrvRHV98Ak1JoWzJ7eQO4YmATQ.HVuBSfHhr86GXt6k-UckmQ \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/ffae40ec16513118d598d336d70834837292224a.address b/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/ffae40ec16513118d598d336d70834837292224a.address deleted file mode 100644 index 97630a4799..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/ffae40ec16513118d598d336d70834837292224a.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wMy0xNCAxMzo0MzowMS43NjcxNzEgLTA0MDAgRURUIG09KzAuMDU3MDY0MDAxIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoidUlocDFGRG1xZ1MxNUlSeCJ9.nPkgYwqVQEax6qHnMb-NfQKH7KvObRpPeor_pQ_Ak9arcQnvk8NfNA.9SeIIqtYINWlAS8z.r6dOtQdbmYeurJCv8dSH3TcsZAU4DD3tcjejyrwIh1ICAUD6kTbXqArgbH6yy293HFHW5osGYzF0VzMdSQ77THlAk3HKg809BGdX4uWI76Bgz2i5m5x4x0yAzq4G4lcPQ8GJK8QBKqgVcPaA7TWZ_cTRIUN8KOFTmQUeBKBOa_JYFOxFEYuleSJo258pPuD94hIljp_HlVhg981_U7bO8GIRCeQ9LgA1Q7KH7iigAXp0iIDqjVlhZQnlGx7RrffDKAAx9gPSCpWchA.A8Bwywzvu6TbSpAujfyc7Q \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_grantee_observer.info b/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_grantee_observer.info deleted file mode 100644 index 02a5d09534..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_grantee_observer.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wMy0xNCAxMzo0MzowMS43NjMxOSAtMDQwMCBFRFQgbT0rMC4wNTMwODM2MjYiLCJlbmMiOiJBMjU2R0NNIiwicDJjIjo4MTkyLCJwMnMiOiIyTTl6cUt0LXJ5SHI0bWQ4In0.JPSrRojRa4o-XnLFdwlYXMNt9ambBj2dk8x6MrcTgYqDN8mc5pVxyA.a1DfAB-caPcTJGCf._qj_0WQkA0w5RksGsCLu843ZSf3dEhyTUkgcRmKHzCSDlhWBrNYWyH3F08BynLBilXhEtlVNwVPkw0KUuJQpBgXKeqG3SVZmmVCG3ya74KhLKkGclj1vTAV29BRYPCBiVoW4FzuGHMXaY7wmK7p9IzHpAvM2o9guXyHAfFSI3Cu7ApaK6J_Hi4dm5JO878ut5WfUFTKbHfL7Ug0agdOZLxWWgS0Cl3j2dbzPGu6__ZEt3cAuC1HCiM-ZT_TsXg22JwLPXZrF6Tkc8YHZ88OyJB1f-Oj3hDJjclnyrrrrYhveJQWm-j7n04e8IzPVya_awnYcx1lnNllmNjdbrwhddV_OrKWiCHwbf01Nxh7FEitbZ-BueJGZC3vyPNZ8D1QvxpfscPtAVyUp1gGg8zOB4oZSPyC1GxSpV5H9SSY7So40z3ZRASfBTnT4MyINfpMRNxZNWAZ9cgjbuN1eTkQbM6tEWwfrO2Pb8hPwkhqoig.GPVPZvsAfFUbkMq8ZC0xMA \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_tss_signer.info b/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_tss_signer.info deleted file mode 100644 index 39d27f565c..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_tss_signer.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wMy0xNCAxMzo0Njo0NC4wNjEyMTIgLTA0MDAgRURUIG09KzAuMDUwMjA3MjA5IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiV3lxaFBFQjZ6WXJzM2RPXyJ9.290M1SfpJK48RxlDlhZbEwKtM4I-g83cXSMBMoUCXmBQxB5lZ-JmqQ.K8mYyNIe0l8igkff.k0ZwxItS5K1ju26RIqtGLsz4VhRZtYMuUrdE-QtW17Jv1nPZoaA6OJAmefQ6wzFvvw4ibfB-BywLnL4kneCZUvra3gaUorYB4mPCqD3SG5Fc0JSjbxtQddqE0_u8yVbR1OriQp3c8ISD8d-EnOtsFnOKppXZkZKdtMDZaS3KlWbYQZlbI2wmsF2PWpVlAtUmVSRoSr1jVxgcxyah_IhTrgkdr4ut5LwLtq53lbaDYLWLapdgEh7BZkiGe_pcCDLA0vA4DnytilMRwJOJGdtuKTLUePtFJKvZ3yBhl7Apft5KTJkNKpADDhsOwwXCjRixgNeq7RPPEFLvrPiiXFI0756IWQkx1ClYAu3YqFxqEE_BA8_9aILLqstsVFLoCRreESeMrj6LVR17Dw85c4aGWrJheiP2kW4LjFDfOLz_Dlt4dfrPFViadoy8OVQnQd6WvQisV96RhDYvPXJ7WNzi4rw.4-ZdET4cTohzRvJkKgzysw \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_zetaclient_grantee.info b/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_zetaclient_grantee.info deleted file mode 100644 index 02a5d09534..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/keyring-test/val_zetaclient_grantee.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wMy0xNCAxMzo0MzowMS43NjMxOSAtMDQwMCBFRFQgbT0rMC4wNTMwODM2MjYiLCJlbmMiOiJBMjU2R0NNIiwicDJjIjo4MTkyLCJwMnMiOiIyTTl6cUt0LXJ5SHI0bWQ4In0.JPSrRojRa4o-XnLFdwlYXMNt9ambBj2dk8x6MrcTgYqDN8mc5pVxyA.a1DfAB-caPcTJGCf._qj_0WQkA0w5RksGsCLu843ZSf3dEhyTUkgcRmKHzCSDlhWBrNYWyH3F08BynLBilXhEtlVNwVPkw0KUuJQpBgXKeqG3SVZmmVCG3ya74KhLKkGclj1vTAV29BRYPCBiVoW4FzuGHMXaY7wmK7p9IzHpAvM2o9guXyHAfFSI3Cu7ApaK6J_Hi4dm5JO878ut5WfUFTKbHfL7Ug0agdOZLxWWgS0Cl3j2dbzPGu6__ZEt3cAuC1HCiM-ZT_TsXg22JwLPXZrF6Tkc8YHZ88OyJB1f-Oj3hDJjclnyrrrrYhveJQWm-j7n04e8IzPVya_awnYcx1lnNllmNjdbrwhddV_OrKWiCHwbf01Nxh7FEitbZ-BueJGZC3vyPNZ8D1QvxpfscPtAVyUp1gGg8zOB4oZSPyC1GxSpV5H9SSY7So40z3ZRASfBTnT4MyINfpMRNxZNWAZ9cgjbuN1eTkQbM6tEWwfrO2Pb8hPwkhqoig.GPVPZvsAfFUbkMq8ZC0xMA \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore1/priv_validator_state.json b/contrib/localnet/zetacored/zetacored_zetacore1/priv_validator_state.json deleted file mode 100644 index 48f3b67e3f..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore1/priv_validator_state.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "height": "0", - "round": 0, - "step": 0 -} \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore2/keyring-test/val_grantee_observer.info b/contrib/localnet/zetacored/zetacored_zetacore2/keyring-test/val_grantee_observer.info deleted file mode 100644 index e3b234b8f7..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore2/keyring-test/val_grantee_observer.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wNC0yNSAyMzowNjoyMC4zMzMyMzIgLTA1MDAgQ0RUIG09KzIuNTMzMDEwNTg0IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiVWw5LUR0ZEdZem1PM3NjUCJ9.k1WnRjLpq8FSfVIeoVC63cLg3O7MD6hrr73Jqjo_QjJb6NN72XmVfg.39eUA-phLevsiuPv.ABfiTwSU6yD5p9FoaoGOIY4nR5N7VSutP22ril2fY_uR-4xSk53t8QvEjmhYIc2fSsCpwTy-eMl7ojrnVaVWBkYW7Od90sDcOIMuBDmMD9ZL7yyVwJpncOhgTBIxqjDEPrmbWj9Up95312LYNMALlK5OvPHYCcs4D-RqPoXiG0tSbbFHzJzwfliHco_ykN_VyjK-phynFM-bz7F2YKCB6jSr_DDqqBSfQvgW6h6vrElziXYknXbKIAogBDlJui77WhzTUBq147jW50dQ4TQNozmlFEFqDz8a0CSViQnaZo6MZv7yWWVZ6XcrwNZ0wEIpY-9eFvsoJVT0xStlByj8Oyz5MS5fK-R4p3nPm_N4IF3Q1qN66_MiTUUwCciomHq_IY79u-5EZdQvyybPg3kR49wAChGZnDmDRNh4Ub-UzXl8KW2G460hnnnrFG4GjaHSnSRtYOyQ76fj_O9oSyEjs17q4HYwDDiCxKj5yBUbig.awpOYDjuZsLQfUZeB0CLSg \ No newline at end of file diff --git a/contrib/localnet/zetacored/zetacored_zetacore3/keyring-test/val_grantee_observer.info b/contrib/localnet/zetacored/zetacored_zetacore3/keyring-test/val_grantee_observer.info deleted file mode 100644 index 699f776d90..0000000000 --- a/contrib/localnet/zetacored/zetacored_zetacore3/keyring-test/val_grantee_observer.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMy0wNC0yNSAyMzowNjo1NS4zODY0NDkgLTA1MDAgQ0RUIG09KzEuMzM4MDkwMTI2IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiS0Q4X0lSalpXc1F2SUQxNyJ9.KBqjE_t5slsBRq7FlezI_ijmrMGL5QPdRxRscl4eUQqF820s5G0J8w.d6G3oiMff6D6GRZH.EmCB_wYAZxa4jSTr4cbdEvCjMmFGFGO6Ag0lGRxhptmMPvMHMp_jek0cB-EZ8YJ3lpIeaOucXW-fD_CJCB5sfOJfaSOLP7Kk44FSJDoGoGeFNq0JkqYO_97Q0jBZRfx9Vkph_0NNF3VqpazgsUZppZ3V5GwbxccYroFIERSyO8Q8aPB75i7i7LFaPVZvGiZTjJ0Ms-Ba1REBBj10ehqbAZ5-qCNDVRakKKGM5SSP4gC2YAoa1LHDIr-uwyvrCRaNyYbZWxqc19fzUAEdPDq6fmlWIEJUitidyjUnDy0eTS08ilKJBOpltpQ9X_cKS9X-0feDqhnXNq_eEdIV1JnhzXME6JqbpnkmfmsTEH1OtGEdv6mZCi_OcTtgrZOTRQIUFCxF2SbM8BziimBmEKKnYJ-ozk47GDl92pHRbMgbh1rJMHQlQulV_1UzPgxA9MxWmkoe3HBTffUR0F_sD3G9NWue1WKyR29hwmB1_FMKZA.xNk2jOBJDKxYGUI7CmY3ew \ No newline at end of file From 2c76429ac3b19f9ada74ea22b194de1a78e5acae Mon Sep 17 00:00:00 2001 From: Charlie Chen <34498985+ws4charlie@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:46:25 -0500 Subject: [PATCH 5/6] refactor: create base signer and signer structs to group common data of EVM/Bitcoin signer and observer (#2344) * save local new files to remote * initiated base observer * move base to chains folder * moved logger to base package * added base signer and logger * added changelog entry * added metrics server to base signer/observer * added more descriptions for constants and base structs --------- Co-authored-by: Lucas Bertrand --- changelog.md | 1 + cmd/zetaclientd/main.go | 64 ---- cmd/zetaclientd/start.go | 9 +- cmd/zetaclientd/utils.go | 26 +- zetaclient/chains/base/logger.go | 109 ++++++ zetaclient/chains/base/logger_test.go | 97 +++++ zetaclient/chains/base/observer.go | 343 +++++++++++++++++ zetaclient/chains/base/observer_test.go | 359 ++++++++++++++++++ zetaclient/chains/base/signer.go | 96 +++++ zetaclient/chains/base/signer_test.go | 74 ++++ .../chains/bitcoin/observer/live_test.go | 4 +- .../chains/bitcoin/observer/observer.go | 8 +- .../chains/bitcoin/observer/observer_test.go | 6 +- zetaclient/chains/bitcoin/signer/signer.go | 8 +- .../chains/bitcoin/signer/signer_test.go | 8 +- zetaclient/chains/evm/observer/observer.go | 10 +- .../chains/evm/observer/observer_test.go | 4 +- zetaclient/chains/evm/signer/signer.go | 12 +- zetaclient/chains/evm/signer/signer_test.go | 6 +- zetaclient/common/logger.go | 20 - zetaclient/context/zetacore_context_test.go | 8 +- zetaclient/types/defs.go | 5 - 22 files changed, 1133 insertions(+), 144 deletions(-) create mode 100644 zetaclient/chains/base/logger.go create mode 100644 zetaclient/chains/base/logger_test.go create mode 100644 zetaclient/chains/base/observer.go create mode 100644 zetaclient/chains/base/observer_test.go create mode 100644 zetaclient/chains/base/signer.go create mode 100644 zetaclient/chains/base/signer_test.go delete mode 100644 zetaclient/common/logger.go delete mode 100644 zetaclient/types/defs.go diff --git a/changelog.md b/changelog.md index 41d63adac2..970f77a4da 100644 --- a/changelog.md +++ b/changelog.md @@ -46,6 +46,7 @@ * [2269](https://github.com/zeta-chain/node/pull/2269) - refactor MsgUpdateCrosschainFlags into MsgEnableCCTX, MsgDisableCCTX and MsgUpdateGasPriceIncreaseFlags * [2306](https://github.com/zeta-chain/node/pull/2306) - refactor zetaclient outbound transaction signing logic * [2296](https://github.com/zeta-chain/node/pull/2296) - move `testdata` package to `testutil` to organize test-related utilities +* [2344](https://github.com/zeta-chain/node/pull/2344) - group common data of EVM/Bitcoin signer and observer using base structs ### Tests diff --git a/cmd/zetaclientd/main.go b/cmd/zetaclientd/main.go index fdac54a7d0..99aaf55c10 100644 --- a/cmd/zetaclientd/main.go +++ b/cmd/zetaclientd/main.go @@ -3,24 +3,15 @@ package main import ( "math/rand" "os" - "path/filepath" "time" ecdsakeygen "github.com/binance-chain/tss-lib/ecdsa/keygen" "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/cosmos/cosmos-sdk/types" - "github.com/rs/zerolog" - "github.com/rs/zerolog/log" "github.com/zeta-chain/zetacore/app" "github.com/zeta-chain/zetacore/cmd" - clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" - "github.com/zeta-chain/zetacore/zetaclient/config" -) - -const ( - ComplianceLogFile = "compliance.log" ) var ( @@ -53,58 +44,3 @@ func SetupConfigForTest() { rand.Seed(time.Now().UnixNano()) } - -func InitLogger(cfg config.Config) (clientcommon.ClientLogger, error) { - // open compliance log file - file, err := OpenComplianceLogFile(cfg) - if err != nil { - return clientcommon.DefaultLoggers(), err - } - - var logger zerolog.Logger - var loggerCompliance zerolog.Logger - switch cfg.LogFormat { - case "json": - logger = zerolog.New(os.Stdout).Level(zerolog.Level(cfg.LogLevel)).With().Timestamp().Logger() - loggerCompliance = zerolog.New(file).Level(zerolog.Level(cfg.LogLevel)).With().Timestamp().Logger() - case "text": - logger = zerolog.New(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}). - Level(zerolog.Level(cfg.LogLevel)). - With(). - Timestamp(). - Logger() - loggerCompliance = zerolog.New(file).Level(zerolog.Level(cfg.LogLevel)).With().Timestamp().Logger() - default: - logger = zerolog.New(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}) - loggerCompliance = zerolog.New(file).With().Timestamp().Logger() - } - - if cfg.LogSampler { - logger = logger.Sample(&zerolog.BasicSampler{N: 5}) - } - log.Logger = logger // set global logger - - return clientcommon.ClientLogger{ - Std: log.Logger, - Compliance: loggerCompliance, - }, nil -} - -func OpenComplianceLogFile(cfg config.Config) (*os.File, error) { - // use zetacore home as default - logPath := cfg.ZetaCoreHome - if cfg.ComplianceConfig.LogPath != "" { - logPath = cfg.ComplianceConfig.LogPath - } - - // clean file name - name := filepath.Join(logPath, ComplianceLogFile) - name, err := filepath.Abs(name) - if err != nil { - return nil, err - } - name = filepath.Clean(name) - - // open (or create) compliance log file - return os.OpenFile(name, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) -} diff --git a/cmd/zetaclientd/start.go b/cmd/zetaclientd/start.go index 9c964ea26e..c815b616c0 100644 --- a/cmd/zetaclientd/start.go +++ b/cmd/zetaclientd/start.go @@ -24,6 +24,7 @@ import ( "github.com/zeta-chain/zetacore/pkg/authz" "github.com/zeta-chain/zetacore/pkg/constant" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/context" "github.com/zeta-chain/zetacore/zetaclient/metrics" @@ -61,7 +62,7 @@ func start(_ *cobra.Command, _ []string) error { if err != nil { return err } - loggers, err := InitLogger(cfg) + logger, err := base.InitLogger(cfg) if err != nil { log.Error().Err(err).Msg("InitLogger failed") return err @@ -76,7 +77,7 @@ func start(_ *cobra.Command, _ []string) error { } } - masterLogger := loggers.Std + masterLogger := logger.Std startLogger := masterLogger.With().Str("module", "startup").Logger() // Wait until zetacore is up @@ -267,7 +268,7 @@ func start(_ *cobra.Command, _ []string) error { } // CreateSignerMap: This creates a map of all signers for each chain . Each signer is responsible for signing transactions for a particular chain - signerMap, err := CreateSignerMap(appContext, tss, loggers, telemetryServer) + signerMap, err := CreateSignerMap(appContext, tss, logger, telemetryServer) if err != nil { log.Error().Err(err).Msg("CreateSignerMap") return err @@ -281,7 +282,7 @@ func start(_ *cobra.Command, _ []string) error { dbpath := filepath.Join(userDir, ".zetaclient/chainobserver") // Creates a map of all chain observers for each chain. Each chain observer is responsible for observing events on the chain and processing them. - observerMap, err := CreateChainObserverMap(appContext, zetacoreClient, tss, dbpath, loggers, telemetryServer) + observerMap, err := CreateChainObserverMap(appContext, zetacoreClient, tss, dbpath, logger, telemetryServer) if err != nil { startLogger.Err(err).Msg("CreateChainObserverMap") return err diff --git a/cmd/zetaclientd/utils.go b/cmd/zetaclientd/utils.go index 7c37c00380..521c6dc858 100644 --- a/cmd/zetaclientd/utils.go +++ b/cmd/zetaclientd/utils.go @@ -5,12 +5,12 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/zetacore/zetaclient/authz" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" btcobserver "github.com/zeta-chain/zetacore/zetaclient/chains/bitcoin/observer" btcsigner "github.com/zeta-chain/zetacore/zetaclient/chains/bitcoin/signer" evmobserver "github.com/zeta-chain/zetacore/zetaclient/chains/evm/observer" evmsigner "github.com/zeta-chain/zetacore/zetaclient/chains/evm/signer" "github.com/zeta-chain/zetacore/zetaclient/chains/interfaces" - clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/context" "github.com/zeta-chain/zetacore/zetaclient/keys" @@ -57,7 +57,7 @@ func CreateZetacoreClient( func CreateSignerMap( appContext *context.AppContext, tss interfaces.TSSSigner, - loggers clientcommon.ClientLogger, + logger base.Logger, ts *metrics.TelemetryServer, ) (map[int64]interfaces.ChainSigner, error) { coreContext := appContext.ZetacoreContext() @@ -70,7 +70,7 @@ func CreateSignerMap( } evmChainParams, found := coreContext.GetEVMChainParams(evmConfig.Chain.ChainId) if !found { - loggers.Std.Error().Msgf("ChainParam not found for chain %s", evmConfig.Chain.String()) + logger.Std.Error().Msgf("ChainParam not found for chain %s", evmConfig.Chain.String()) continue } mpiAddress := ethcommon.HexToAddress(evmChainParams.ConnectorContractAddress) @@ -84,10 +84,10 @@ func CreateSignerMap( mpiAddress, erc20CustodyAddress, coreContext, - loggers, + logger, ts) if err != nil { - loggers.Std.Error().Err(err).Msgf("NewEVMSigner error for chain %s", evmConfig.Chain.String()) + logger.Std.Error().Err(err).Msgf("NewEVMSigner error for chain %s", evmConfig.Chain.String()) continue } signerMap[evmConfig.Chain.ChainId] = signer @@ -95,9 +95,9 @@ func CreateSignerMap( // BTC signer btcChain, btcConfig, enabled := appContext.GetBTCChainAndConfig() if enabled { - signer, err := btcsigner.NewSigner(btcConfig, tss, loggers, ts, coreContext) + signer, err := btcsigner.NewSigner(btcConfig, tss, logger, ts, coreContext) if err != nil { - loggers.Std.Error().Err(err).Msgf("NewBTCSigner error for chain %s", btcChain.String()) + logger.Std.Error().Err(err).Msgf("NewBTCSigner error for chain %s", btcChain.String()) } else { signerMap[btcChain.ChainId] = signer } @@ -112,7 +112,7 @@ func CreateChainObserverMap( zetacoreClient *zetacore.Client, tss interfaces.TSSSigner, dbpath string, - loggers clientcommon.ClientLogger, + logger base.Logger, ts *metrics.TelemetryServer, ) (map[int64]interfaces.ChainObserver, error) { observerMap := make(map[int64]interfaces.ChainObserver) @@ -123,12 +123,12 @@ func CreateChainObserverMap( } _, found := appContext.ZetacoreContext().GetEVMChainParams(evmConfig.Chain.ChainId) if !found { - loggers.Std.Error().Msgf("ChainParam not found for chain %s", evmConfig.Chain.String()) + logger.Std.Error().Msgf("ChainParam not found for chain %s", evmConfig.Chain.String()) continue } - co, err := evmobserver.NewObserver(appContext, zetacoreClient, tss, dbpath, loggers, evmConfig, ts) + co, err := evmobserver.NewObserver(appContext, zetacoreClient, tss, dbpath, logger, evmConfig, ts) if err != nil { - loggers.Std.Error().Err(err).Msgf("NewObserver error for evm chain %s", evmConfig.Chain.String()) + logger.Std.Error().Err(err).Msgf("NewObserver error for evm chain %s", evmConfig.Chain.String()) continue } observerMap[evmConfig.Chain.ChainId] = co @@ -136,9 +136,9 @@ func CreateChainObserverMap( // BTC observer btcChain, btcConfig, enabled := appContext.GetBTCChainAndConfig() if enabled { - co, err := btcobserver.NewObserver(appContext, btcChain, zetacoreClient, tss, dbpath, loggers, btcConfig, ts) + co, err := btcobserver.NewObserver(appContext, btcChain, zetacoreClient, tss, dbpath, logger, btcConfig, ts) if err != nil { - loggers.Std.Error().Err(err).Msgf("NewObserver error for bitcoin chain %s", btcChain.String()) + logger.Std.Error().Err(err).Msgf("NewObserver error for bitcoin chain %s", btcChain.String()) } else { observerMap[btcChain.ChainId] = co diff --git a/zetaclient/chains/base/logger.go b/zetaclient/chains/base/logger.go new file mode 100644 index 0000000000..eeffcfab3b --- /dev/null +++ b/zetaclient/chains/base/logger.go @@ -0,0 +1,109 @@ +package base + +import ( + "os" + "path/filepath" + "time" + + "github.com/rs/zerolog" + "github.com/rs/zerolog/log" + + "github.com/zeta-chain/zetacore/zetaclient/config" +) + +const ( + ComplianceLogFile = "compliance.log" +) + +// Logger contains the base loggers +type Logger struct { + Std zerolog.Logger + Compliance zerolog.Logger +} + +// DefaultLoggers creates default base loggers for tests +func DefaultLogger() Logger { + return Logger{ + Std: log.Logger, + Compliance: log.Logger, + } +} + +// ObserverLogger contains the loggers for chain observers +type ObserverLogger struct { + // the parent logger for the chain observer + Chain zerolog.Logger + + // the logger for inbound transactions + Inbound zerolog.Logger + + // the logger for outbound transactions + Outbound zerolog.Logger + + // the logger for the chain's gas price + GasPrice zerolog.Logger + + // the logger for block headers + Headers zerolog.Logger + + // the logger for the compliance check + Compliance zerolog.Logger +} + +// InitLogger initializes the base loggers +func InitLogger(cfg config.Config) (Logger, error) { + // open compliance log file + file, err := openComplianceLogFile(cfg) + if err != nil { + return DefaultLogger(), err + } + + // create loggers based on configured level and format + var std zerolog.Logger + var compliance zerolog.Logger + switch cfg.LogFormat { + case "json": + std = zerolog.New(os.Stdout).Level(zerolog.Level(cfg.LogLevel)).With().Timestamp().Logger() + compliance = zerolog.New(file).Level(zerolog.Level(cfg.LogLevel)).With().Timestamp().Logger() + case "text": + std = zerolog.New(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}). + Level(zerolog.Level(cfg.LogLevel)). + With(). + Timestamp(). + Logger() + compliance = zerolog.New(file).Level(zerolog.Level(cfg.LogLevel)).With().Timestamp().Logger() + default: + std = zerolog.New(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}) + compliance = zerolog.New(file).With().Timestamp().Logger() + } + + if cfg.LogSampler { + std = std.Sample(&zerolog.BasicSampler{N: 5}) + } + log.Logger = std // set global logger + + return Logger{ + Std: std, + Compliance: compliance, + }, nil +} + +// openComplianceLogFile opens the compliance log file +func openComplianceLogFile(cfg config.Config) (*os.File, error) { + // use zetacore home as default + logPath := cfg.ZetaCoreHome + if cfg.ComplianceConfig.LogPath != "" { + logPath = cfg.ComplianceConfig.LogPath + } + + // clean file name + name := filepath.Join(logPath, ComplianceLogFile) + name, err := filepath.Abs(name) + if err != nil { + return nil, err + } + name = filepath.Clean(name) + + // open (or create) compliance log file + return os.OpenFile(name, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) +} diff --git a/zetaclient/chains/base/logger_test.go b/zetaclient/chains/base/logger_test.go new file mode 100644 index 0000000000..07c2859b0e --- /dev/null +++ b/zetaclient/chains/base/logger_test.go @@ -0,0 +1,97 @@ +package base_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/zeta-chain/zetacore/zetaclient/chains/base" + "github.com/zeta-chain/zetacore/zetaclient/config" +) + +func TestInitLogger(t *testing.T) { + // test cases + tests := []struct { + name string + t *testing.T + cfg config.Config + fail bool + }{ + { + name: "should be able to initialize json formatted logger", + cfg: config.Config{ + LogFormat: "json", + LogLevel: 1, // zerolog.InfoLevel, + ComplianceConfig: config.ComplianceConfig{ + LogPath: createTempDir(t), + }, + }, + fail: false, + }, + { + name: "should be able to initialize plain text logger", + cfg: config.Config{ + LogFormat: "text", + LogLevel: 2, // zerolog.WarnLevel, + ComplianceConfig: config.ComplianceConfig{ + LogPath: createTempDir(t), + }, + }, + fail: false, + }, + { + name: "should be able to initialize default formatted logger", + cfg: config.Config{ + LogFormat: "unknown", + LogLevel: 3, // zerolog.ErrorLevel, + ComplianceConfig: config.ComplianceConfig{ + LogPath: createTempDir(t), + }, + }, + fail: false, + }, + { + name: "should be able to initialize sampled logger", + cfg: config.Config{ + LogFormat: "json", + LogLevel: 4, // zerolog.DebugLevel, + LogSampler: true, + ComplianceConfig: config.ComplianceConfig{ + LogPath: createTempDir(t), + }, + }, + }, + { + name: "should fail on invalid compliance log path", + cfg: config.Config{ + LogFormat: "json", + LogLevel: 1, // zerolog.InfoLevel, + ComplianceConfig: config.ComplianceConfig{ + LogPath: "/invalid/123path", + }, + }, + fail: true, + }, + } + + // run tests + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // init logger + logger, err := base.InitLogger(tt.cfg) + + // check if error is expected + if tt.fail { + require.Error(t, err) + return + } + + // check if logger is initialized + require.NoError(t, err) + + // should be able to print log + logger.Std.Info().Msg("print standard log") + logger.Compliance.Info().Msg("print compliance log") + }) + } +} diff --git a/zetaclient/chains/base/observer.go b/zetaclient/chains/base/observer.go new file mode 100644 index 0000000000..905775b2b2 --- /dev/null +++ b/zetaclient/chains/base/observer.go @@ -0,0 +1,343 @@ +package base + +import ( + "fmt" + "os" + "strconv" + "sync/atomic" + + lru "github.com/hashicorp/golang-lru" + "github.com/pkg/errors" + "github.com/rs/zerolog" + "gorm.io/driver/sqlite" + "gorm.io/gorm" + + "github.com/zeta-chain/zetacore/pkg/chains" + observertypes "github.com/zeta-chain/zetacore/x/observer/types" + "github.com/zeta-chain/zetacore/zetaclient/chains/interfaces" + "github.com/zeta-chain/zetacore/zetaclient/context" + "github.com/zeta-chain/zetacore/zetaclient/metrics" + clienttypes "github.com/zeta-chain/zetacore/zetaclient/types" +) + +const ( + // EnvVarLatestBlock is the environment variable that forces the observer to scan from the latest block + EnvVarLatestBlock = "latest" + + // DefaultBlockCacheSize is the default number of blocks that the observer will keep in cache for performance (without RPC calls) + // Cached blocks can be used to get block information and verify transactions + DefaultBlockCacheSize = 1000 + + // DefaultHeadersCacheSize is the default number of headers that the observer will keep in cache for performance (without RPC calls) + // Cached headers can be used to get header information + DefaultHeadersCacheSize = 1000 +) + +// Observer is the base structure for chain observers, grouping the common logic for each chain observer client. +// The common logic includes: chain, chainParams, contexts, zetacore client, tss, lastBlock, db, metrics, loggers etc. +type Observer struct { + // chain contains static information about the observed chain + chain chains.Chain + + // chainParams contains the dynamic chain parameters of the observed chain + chainParams observertypes.ChainParams + + // coreContext contains context data of ZetaChain + zetacoreContext *context.ZetacoreContext + + // zetacoreClient is the client to interact with ZetaChain + zetacoreClient interfaces.ZetacoreClient + + // tss is the TSS signer + tss interfaces.TSSSigner + + // lastBlock is the last block height of the observed chain + lastBlock uint64 + + // lastBlockScanned is the last block height scanned by the observer + lastBlockScanned uint64 + + // blockCache is the cache for blocks + blockCache *lru.Cache + + // headerCache is the cache for headers + headerCache *lru.Cache + + // db is the database to persist data + db *gorm.DB + + // ts is the telemetry server for metrics + ts *metrics.TelemetryServer + + // logger contains the loggers used by observer + logger ObserverLogger + + // stop is the channel to signal the observer to stop + stop chan struct{} +} + +// NewObserver creates a new base observer. +func NewObserver( + chain chains.Chain, + chainParams observertypes.ChainParams, + zetacoreContext *context.ZetacoreContext, + zetacoreClient interfaces.ZetacoreClient, + tss interfaces.TSSSigner, + blockCacheSize int, + headersCacheSize int, + dbPath string, + ts *metrics.TelemetryServer, + logger Logger, +) (*Observer, error) { + ob := Observer{ + chain: chain, + chainParams: chainParams, + zetacoreContext: zetacoreContext, + zetacoreClient: zetacoreClient, + tss: tss, + lastBlock: 0, + lastBlockScanned: 0, + ts: ts, + stop: make(chan struct{}), + } + + // setup loggers + ob.WithLogger(logger) + + // create block cache + var err error + ob.blockCache, err = lru.New(blockCacheSize) + if err != nil { + return nil, errors.Wrap(err, "error creating block cache") + } + + // create header cache + ob.headerCache, err = lru.New(headersCacheSize) + if err != nil { + return nil, errors.Wrap(err, "error creating header cache") + } + + // open database + err = ob.OpenDB(dbPath) + if err != nil { + return nil, errors.Wrap(err, fmt.Sprintf("error opening observer db for chain: %s", chain.ChainName)) + } + + return &ob, nil +} + +// Chain returns the chain for the observer. +func (ob *Observer) Chain() chains.Chain { + return ob.chain +} + +// WithChain attaches a new chain to the observer. +func (ob *Observer) WithChain(chain chains.Chain) *Observer { + ob.chain = chain + return ob +} + +// ChainParams returns the chain params for the observer. +func (ob *Observer) ChainParams() observertypes.ChainParams { + return ob.chainParams +} + +// WithChainParams attaches a new chain params to the observer. +func (ob *Observer) WithChainParams(params observertypes.ChainParams) *Observer { + ob.chainParams = params + return ob +} + +// ZetacoreContext returns the zetacore context for the observer. +func (ob *Observer) ZetacoreContext() *context.ZetacoreContext { + return ob.zetacoreContext +} + +// WithZetacoreContext attaches a new zetacore context to the observer. +func (ob *Observer) WithZetacoreContext(context *context.ZetacoreContext) *Observer { + ob.zetacoreContext = context + return ob +} + +// ZetacoreClient returns the zetacore client for the observer. +func (ob *Observer) ZetacoreClient() interfaces.ZetacoreClient { + return ob.zetacoreClient +} + +// WithZetacoreClient attaches a new zetacore client to the observer. +func (ob *Observer) WithZetacoreClient(client interfaces.ZetacoreClient) *Observer { + ob.zetacoreClient = client + return ob +} + +// Tss returns the tss signer for the observer. +func (ob *Observer) TSS() interfaces.TSSSigner { + return ob.tss +} + +// WithTSS attaches a new tss signer to the observer. +func (ob *Observer) WithTSS(tss interfaces.TSSSigner) *Observer { + ob.tss = tss + return ob +} + +// LastBlock get external last block height. +func (ob *Observer) LastBlock() uint64 { + return atomic.LoadUint64(&ob.lastBlock) +} + +// WithLastBlock set external last block height. +func (ob *Observer) WithLastBlock(lastBlock uint64) *Observer { + atomic.StoreUint64(&ob.lastBlock, lastBlock) + return ob +} + +// LastBlockScanned get last block scanned (not necessarily caught up with the chain; could be slow/paused). +func (ob *Observer) LastBlockScanned() uint64 { + height := atomic.LoadUint64(&ob.lastBlockScanned) + return height +} + +// WithLastBlockScanned set last block scanned (not necessarily caught up with the chain; could be slow/paused). +func (ob *Observer) WithLastBlockScanned(blockNumber uint64) *Observer { + atomic.StoreUint64(&ob.lastBlockScanned, blockNumber) + metrics.LastScannedBlockNumber.WithLabelValues(ob.chain.ChainName.String()).Set(float64(blockNumber)) + return ob +} + +// BlockCache returns the block cache for the observer. +func (ob *Observer) BlockCache() *lru.Cache { + return ob.blockCache +} + +// WithBlockCache attaches a new block cache to the observer. +func (ob *Observer) WithBlockCache(cache *lru.Cache) *Observer { + ob.blockCache = cache + return ob +} + +// HeaderCache returns the header cache for the observer. +func (ob *Observer) HeaderCache() *lru.Cache { + return ob.headerCache +} + +// WithHeaderCache attaches a new header cache to the observer. +func (ob *Observer) WithHeaderCache(cache *lru.Cache) *Observer { + ob.headerCache = cache + return ob +} + +// DB returns the database for the observer. +func (ob *Observer) DB() *gorm.DB { + return ob.db +} + +// Logger returns the logger for the observer. +func (ob *Observer) Logger() ObserverLogger { + return ob.logger +} + +// WithLogger attaches a new logger to the observer. +func (ob *Observer) WithLogger(logger Logger) *Observer { + chainLogger := logger.Std.With().Int64("chain", ob.chain.ChainId).Logger() + ob.logger = ObserverLogger{ + Chain: chainLogger, + Inbound: chainLogger.With().Str("module", "inbound").Logger(), + Outbound: chainLogger.With().Str("module", "outbound").Logger(), + GasPrice: chainLogger.With().Str("module", "gasprice").Logger(), + Headers: chainLogger.With().Str("module", "headers").Logger(), + Compliance: logger.Compliance, + } + return ob +} + +// Stop returns the stop channel for the observer. +func (ob *Observer) Stop() chan struct{} { + return ob.stop +} + +// OpenDB open sql database in the given path. +func (ob *Observer) OpenDB(dbPath string) error { + if dbPath != "" { + // create db path if not exist + if _, err := os.Stat(dbPath); os.IsNotExist(err) { + err := os.MkdirAll(dbPath, os.ModePerm) + if err != nil { + return errors.Wrap(err, "error creating db path") + } + } + + // open db by chain name + chainName := ob.chain.ChainName.String() + path := fmt.Sprintf("%s/%s", dbPath, chainName) + db, err := gorm.Open(sqlite.Open(path), &gorm.Config{}) + if err != nil { + return errors.Wrap(err, "error opening db") + } + + // migrate db + err = db.AutoMigrate(&clienttypes.ReceiptSQLType{}, + &clienttypes.TransactionSQLType{}, + &clienttypes.LastBlockSQLType{}) + if err != nil { + return errors.Wrap(err, "error migrating db") + } + ob.db = db + } + return nil +} + +// LoadLastBlockScanned loads last scanned block from environment variable or from database. +// The last scanned block is the height from which the observer should continue scanning. +func (ob *Observer) LoadLastBlockScanned(logger zerolog.Logger) (fromLatest bool, err error) { + // get environment variable + envvar := EnvVarLatestBlockByChain(ob.chain) + scanFromBlock := os.Getenv(envvar) + + // load from environment variable if set + if scanFromBlock != "" { + logger.Info(). + Msgf("LoadLastBlockScanned: envvar %s is set; scan from block %s", envvar, scanFromBlock) + if scanFromBlock == EnvVarLatestBlock { + return true, nil + } + blockNumber, err := strconv.ParseUint(scanFromBlock, 10, 64) + if err != nil { + return false, err + } + ob.WithLastBlockScanned(blockNumber) + return false, nil + } + + // load from DB otherwise. If not found, start from latest block + blockNumber, err := ob.ReadLastBlockScannedFromDB() + if err != nil { + logger.Info().Msgf("LoadLastBlockScanned: chain %d starts scanning from latest block", ob.chain.ChainId) + return true, nil + } + ob.WithLastBlockScanned(blockNumber) + logger.Info(). + Msgf("LoadLastBlockScanned: chain %d starts scanning from block %d", ob.chain.ChainId, ob.LastBlockScanned()) + + return false, nil +} + +// WriteLastBlockScannedToDB saves the last scanned block to the database. +func (ob *Observer) WriteLastBlockScannedToDB(lastScannedBlock uint64) error { + return ob.db.Save(clienttypes.ToLastBlockSQLType(lastScannedBlock)).Error +} + +// ReadLastBlockScannedFromDB reads the last scanned block from the database. +func (ob *Observer) ReadLastBlockScannedFromDB() (uint64, error) { + var lastBlock clienttypes.LastBlockSQLType + if err := ob.db.First(&lastBlock, clienttypes.LastBlockNumID).Error; err != nil { + // record not found + return 0, err + } + return lastBlock.Num, nil +} + +// EnvVarLatestBlock returns the environment variable for the latest block by chain. +func EnvVarLatestBlockByChain(chain chains.Chain) string { + return chain.ChainName.String() + "_SCAN_FROM" +} diff --git a/zetaclient/chains/base/observer_test.go b/zetaclient/chains/base/observer_test.go new file mode 100644 index 0000000000..7dd2f18081 --- /dev/null +++ b/zetaclient/chains/base/observer_test.go @@ -0,0 +1,359 @@ +package base_test + +import ( + "os" + "testing" + + lru "github.com/hashicorp/golang-lru" + "github.com/rs/zerolog/log" + "github.com/stretchr/testify/require" + + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/testutil/sample" + observertypes "github.com/zeta-chain/zetacore/x/observer/types" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" + "github.com/zeta-chain/zetacore/zetaclient/chains/interfaces" + "github.com/zeta-chain/zetacore/zetaclient/config" + "github.com/zeta-chain/zetacore/zetaclient/context" + "github.com/zeta-chain/zetacore/zetaclient/testutils/mocks" +) + +// create a temporary directory for testing +func createTempDir(t *testing.T) string { + tempPath, err := os.MkdirTemp("", "tempdir-") + require.NoError(t, err) + return tempPath +} + +// createObserver creates a new observer for testing +func createObserver(t *testing.T, dbPath string) *base.Observer { + // constructor parameters + chain := chains.Ethereum + chainParams := *sample.ChainParams(chain.ChainId) + zetacoreContext := context.NewZetacoreContext(config.NewConfig()) + zetacoreClient := mocks.NewMockZetacoreClient() + tss := mocks.NewTSSMainnet() + + // create observer + logger := base.DefaultLogger() + ob, err := base.NewObserver( + chain, + chainParams, + zetacoreContext, + zetacoreClient, + tss, + base.DefaultBlockCacheSize, + base.DefaultHeadersCacheSize, + dbPath, + nil, + logger, + ) + require.NoError(t, err) + + return ob +} + +func TestNewObserver(t *testing.T) { + // constructor parameters + chain := chains.Ethereum + chainParams := *sample.ChainParams(chain.ChainId) + zetacoreContext := context.NewZetacoreContext(config.NewConfig()) + zetacoreClient := mocks.NewMockZetacoreClient() + tss := mocks.NewTSSMainnet() + blockCacheSize := base.DefaultBlockCacheSize + headersCacheSize := base.DefaultHeadersCacheSize + dbPath := createTempDir(t) + + // test cases + tests := []struct { + name string + chain chains.Chain + chainParams observertypes.ChainParams + zetacoreContext *context.ZetacoreContext + zetacoreClient interfaces.ZetacoreClient + tss interfaces.TSSSigner + blockCacheSize int + headersCacheSize int + dbPath string + fail bool + message string + }{ + { + name: "should be able to create new observer", + chain: chain, + chainParams: chainParams, + zetacoreContext: zetacoreContext, + zetacoreClient: zetacoreClient, + tss: tss, + blockCacheSize: blockCacheSize, + headersCacheSize: headersCacheSize, + dbPath: dbPath, + fail: false, + }, + { + name: "should return error on invalid block cache size", + chain: chain, + chainParams: chainParams, + zetacoreContext: zetacoreContext, + zetacoreClient: zetacoreClient, + tss: tss, + blockCacheSize: 0, + headersCacheSize: headersCacheSize, + dbPath: dbPath, + fail: true, + message: "error creating block cache", + }, + { + name: "should return error on invalid header cache size", + chain: chain, + chainParams: chainParams, + zetacoreContext: zetacoreContext, + zetacoreClient: zetacoreClient, + tss: tss, + blockCacheSize: blockCacheSize, + headersCacheSize: 0, + dbPath: dbPath, + fail: true, + message: "error creating header cache", + }, + { + name: "should return error on invalid db path", + chain: chain, + chainParams: chainParams, + zetacoreContext: zetacoreContext, + zetacoreClient: zetacoreClient, + tss: tss, + blockCacheSize: blockCacheSize, + headersCacheSize: headersCacheSize, + dbPath: "/invalid/123db", + fail: true, + message: "error opening observer db", + }, + } + + // run tests + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + ob, err := base.NewObserver( + tt.chain, + tt.chainParams, + tt.zetacoreContext, + tt.zetacoreClient, + tt.tss, + tt.blockCacheSize, + tt.headersCacheSize, + tt.dbPath, + nil, + base.DefaultLogger(), + ) + if tt.fail { + require.ErrorContains(t, err, tt.message) + require.Nil(t, ob) + return + } + + require.NoError(t, err) + require.NotNil(t, ob) + }) + } +} + +func TestObserverGetterAndSetter(t *testing.T) { + dbPath := createTempDir(t) + + t.Run("should be able to update chain", func(t *testing.T) { + ob := createObserver(t, dbPath) + + // update chain + newChain := chains.BscMainnet + ob = ob.WithChain(chains.BscMainnet) + require.Equal(t, newChain, ob.Chain()) + }) + t.Run("should be able to update chain params", func(t *testing.T) { + ob := createObserver(t, dbPath) + + // update chain params + newChainParams := *sample.ChainParams(chains.BscMainnet.ChainId) + ob = ob.WithChainParams(newChainParams) + require.True(t, observertypes.ChainParamsEqual(newChainParams, ob.ChainParams())) + }) + t.Run("should be able to update zetacore context", func(t *testing.T) { + ob := createObserver(t, dbPath) + + // update zetacore context + newZetacoreContext := context.NewZetacoreContext(config.NewConfig()) + ob = ob.WithZetacoreContext(newZetacoreContext) + require.Equal(t, newZetacoreContext, ob.ZetacoreContext()) + }) + t.Run("should be able to update zetacore client", func(t *testing.T) { + ob := createObserver(t, dbPath) + + // update zetacore client + newZetacoreClient := mocks.NewMockZetacoreClient() + ob = ob.WithZetacoreClient(newZetacoreClient) + require.Equal(t, newZetacoreClient, ob.ZetacoreClient()) + }) + t.Run("should be able to update tss", func(t *testing.T) { + ob := createObserver(t, dbPath) + + // update tss + newTSS := mocks.NewTSSAthens3() + ob = ob.WithTSS(newTSS) + require.Equal(t, newTSS, ob.TSS()) + }) + t.Run("should be able to update last block", func(t *testing.T) { + ob := createObserver(t, dbPath) + + // update last block + newLastBlock := uint64(100) + ob = ob.WithLastBlock(newLastBlock) + require.Equal(t, newLastBlock, ob.LastBlock()) + }) + t.Run("should be able to update last block scanned", func(t *testing.T) { + ob := createObserver(t, dbPath) + + // update last block scanned + newLastBlockScanned := uint64(100) + ob = ob.WithLastBlockScanned(newLastBlockScanned) + require.Equal(t, newLastBlockScanned, ob.LastBlockScanned()) + }) + t.Run("should be able to replace block cache", func(t *testing.T) { + ob := createObserver(t, dbPath) + + // update block cache + newBlockCache, err := lru.New(200) + require.NoError(t, err) + + ob = ob.WithBlockCache(newBlockCache) + require.Equal(t, newBlockCache, ob.BlockCache()) + }) + t.Run("should be able to replace headers cache", func(t *testing.T) { + ob := createObserver(t, dbPath) + + // update headers cache + newHeadersCache, err := lru.New(200) + require.NoError(t, err) + + ob = ob.WithHeaderCache(newHeadersCache) + require.Equal(t, newHeadersCache, ob.HeaderCache()) + }) + t.Run("should be able to get database", func(t *testing.T) { + ob := createObserver(t, dbPath) + + db := ob.DB() + require.NotNil(t, db) + }) + t.Run("should be able to get logger", func(t *testing.T) { + ob := createObserver(t, dbPath) + logger := ob.Logger() + + // should be able to print log + logger.Chain.Info().Msg("print chain log") + logger.Inbound.Info().Msg("print inbound log") + logger.Outbound.Info().Msg("print outbound log") + logger.GasPrice.Info().Msg("print gasprice log") + logger.Headers.Info().Msg("print headers log") + logger.Compliance.Info().Msg("print compliance log") + }) +} + +func TestOpenDB(t *testing.T) { + dbPath := createTempDir(t) + ob := createObserver(t, dbPath) + + t.Run("should be able to open db", func(t *testing.T) { + err := ob.OpenDB(dbPath) + require.NoError(t, err) + }) + t.Run("should return error on invalid db path", func(t *testing.T) { + err := ob.OpenDB("/invalid/123db") + require.ErrorContains(t, err, "error creating db path") + }) +} + +func TestLoadLastBlockScanned(t *testing.T) { + chain := chains.Ethereum + envvar := base.EnvVarLatestBlockByChain(chain) + + t.Run("should be able to load last block scanned", func(t *testing.T) { + // create db and write 100 as last block scanned + dbPath := createTempDir(t) + ob := createObserver(t, dbPath) + ob.WriteLastBlockScannedToDB(100) + + // read last block scanned + fromLatest, err := ob.LoadLastBlockScanned(log.Logger) + require.NoError(t, err) + require.EqualValues(t, 100, ob.LastBlockScanned()) + require.False(t, fromLatest) + }) + t.Run("should use latest block if last block scanned not found", func(t *testing.T) { + // create empty db + dbPath := createTempDir(t) + ob := createObserver(t, dbPath) + + // read last block scanned + fromLatest, err := ob.LoadLastBlockScanned(log.Logger) + require.NoError(t, err) + require.True(t, fromLatest) + }) + t.Run("should overwrite last block scanned if env var is set", func(t *testing.T) { + // create db and write 100 as last block scanned + dbPath := createTempDir(t) + ob := createObserver(t, dbPath) + ob.WriteLastBlockScannedToDB(100) + + // set env var + os.Setenv(envvar, "101") + + // read last block scanned + fromLatest, err := ob.LoadLastBlockScanned(log.Logger) + require.NoError(t, err) + require.EqualValues(t, 101, ob.LastBlockScanned()) + require.False(t, fromLatest) + + // set env var to 'latest' + os.Setenv(envvar, base.EnvVarLatestBlock) + + // read last block scanned + fromLatest, err = ob.LoadLastBlockScanned(log.Logger) + require.NoError(t, err) + require.True(t, fromLatest) + }) + t.Run("should return error on invalid env var", func(t *testing.T) { + // create db and write 100 as last block scanned + dbPath := createTempDir(t) + ob := createObserver(t, dbPath) + + // set invalid env var + os.Setenv(envvar, "invalid") + + // read last block scanned + fromLatest, err := ob.LoadLastBlockScanned(log.Logger) + require.Error(t, err) + require.False(t, fromLatest) + }) +} + +func TestReadWriteLastBlockScannedToDB(t *testing.T) { + t.Run("should be able to write and read last block scanned to db", func(t *testing.T) { + // create db and write 100 as last block scanned + dbPath := createTempDir(t) + ob := createObserver(t, dbPath) + err := ob.WriteLastBlockScannedToDB(100) + require.NoError(t, err) + + lastBlockScanned, err := ob.ReadLastBlockScannedFromDB() + require.NoError(t, err) + require.EqualValues(t, 100, lastBlockScanned) + }) + t.Run("should return error when last block scanned not found in db", func(t *testing.T) { + // create empty db + dbPath := createTempDir(t) + ob := createObserver(t, dbPath) + + lastScannedBlock, err := ob.ReadLastBlockScannedFromDB() + require.Error(t, err) + require.Zero(t, lastScannedBlock) + }) +} diff --git a/zetaclient/chains/base/signer.go b/zetaclient/chains/base/signer.go new file mode 100644 index 0000000000..2585218767 --- /dev/null +++ b/zetaclient/chains/base/signer.go @@ -0,0 +1,96 @@ +package base + +import ( + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/zetaclient/chains/interfaces" + "github.com/zeta-chain/zetacore/zetaclient/context" + "github.com/zeta-chain/zetacore/zetaclient/metrics" +) + +// Signer is the base structure for grouping the common logic between chain signers. +// The common logic includes: chain, chainParams, contexts, tss, metrics, loggers etc. +type Signer struct { + // chain contains static information about the external chain + chain chains.Chain + + // zetacoreContext is the Zetacore client to interact with ZetaChain + zetacoreContext *context.ZetacoreContext + + // tss is the TSS signer + tss interfaces.TSSSigner + + // ts is the telemetry server for metrics + ts *metrics.TelemetryServer + + // logger contains the loggers used by signer + logger Logger +} + +// NewSigner creates a new base signer +func NewSigner( + chain chains.Chain, + zetacoreContext *context.ZetacoreContext, + tss interfaces.TSSSigner, + ts *metrics.TelemetryServer, + logger Logger, +) *Signer { + return &Signer{ + chain: chain, + zetacoreContext: zetacoreContext, + tss: tss, + ts: ts, + logger: Logger{ + Std: logger.Std.With().Int64("chain", chain.ChainId).Str("module", "signer").Logger(), + Compliance: logger.Compliance, + }, + } +} + +// Chain returns the chain for the signer +func (s *Signer) Chain() chains.Chain { + return s.chain +} + +// WithChain attaches a new chain to the signer +func (s *Signer) WithChain(chain chains.Chain) *Signer { + s.chain = chain + return s +} + +// ZetacoreContext returns the zetacore context for the signer +func (s *Signer) ZetacoreContext() *context.ZetacoreContext { + return s.zetacoreContext +} + +// WithZetacoreContext attaches a new zetacore context to the signer +func (s *Signer) WithZetacoreContext(context *context.ZetacoreContext) *Signer { + s.zetacoreContext = context + return s +} + +// Tss returns the tss signer for the signer +func (s *Signer) TSS() interfaces.TSSSigner { + return s.tss +} + +// WithTSS attaches a new tss signer to the signer +func (s *Signer) WithTSS(tss interfaces.TSSSigner) *Signer { + s.tss = tss + return s +} + +// TelemetryServer returns the telemetry server for the signer +func (s *Signer) TelemetryServer() *metrics.TelemetryServer { + return s.ts +} + +// WithTelemetryServer attaches a new telemetry server to the signer +func (s *Signer) WithTelemetryServer(ts *metrics.TelemetryServer) *Signer { + s.ts = ts + return s +} + +// Logger returns the logger for the signer +func (s *Signer) Logger() *Logger { + return &s.logger +} diff --git a/zetaclient/chains/base/signer_test.go b/zetaclient/chains/base/signer_test.go new file mode 100644 index 0000000000..960c508d6e --- /dev/null +++ b/zetaclient/chains/base/signer_test.go @@ -0,0 +1,74 @@ +package base_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" + "github.com/zeta-chain/zetacore/zetaclient/config" + "github.com/zeta-chain/zetacore/zetaclient/context" + "github.com/zeta-chain/zetacore/zetaclient/metrics" + "github.com/zeta-chain/zetacore/zetaclient/testutils/mocks" +) + +// createSigner creates a new signer for testing +func createSigner(_ *testing.T) *base.Signer { + // constructor parameters + chain := chains.Ethereum + zetacoreContext := context.NewZetacoreContext(config.NewConfig()) + tss := mocks.NewTSSMainnet() + logger := base.DefaultLogger() + + // create signer + return base.NewSigner(chain, zetacoreContext, tss, nil, logger) +} + +func TestNewSigner(t *testing.T) { + signer := createSigner(t) + require.NotNil(t, signer) +} + +func TestSignerGetterAndSetter(t *testing.T) { + t.Run("should be able to update chain", func(t *testing.T) { + signer := createSigner(t) + + // update chain + newChain := chains.BscMainnet + signer = signer.WithChain(chains.BscMainnet) + require.Equal(t, newChain, signer.Chain()) + }) + t.Run("should be able to update zetacore context", func(t *testing.T) { + signer := createSigner(t) + + // update zetacore context + newZetacoreContext := context.NewZetacoreContext(config.NewConfig()) + signer = signer.WithZetacoreContext(newZetacoreContext) + require.Equal(t, newZetacoreContext, signer.ZetacoreContext()) + }) + t.Run("should be able to update tss", func(t *testing.T) { + signer := createSigner(t) + + // update tss + newTSS := mocks.NewTSSAthens3() + signer = signer.WithTSS(newTSS) + require.Equal(t, newTSS, signer.TSS()) + }) + t.Run("should be able to update telemetry server", func(t *testing.T) { + signer := createSigner(t) + + // update telemetry server + newTs := metrics.NewTelemetryServer() + signer = signer.WithTelemetryServer(newTs) + require.Equal(t, newTs, signer.TelemetryServer()) + }) + t.Run("should be able to get logger", func(t *testing.T) { + ob := createSigner(t) + logger := ob.Logger() + + // should be able to print log + logger.Std.Info().Msg("print standard log") + logger.Compliance.Info().Msg("print compliance log") + }) +} diff --git a/zetaclient/chains/bitcoin/observer/live_test.go b/zetaclient/chains/bitcoin/observer/live_test.go index 51bedbf1ef..dd1053f620 100644 --- a/zetaclient/chains/bitcoin/observer/live_test.go +++ b/zetaclient/chains/bitcoin/observer/live_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/suite" "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" "github.com/zeta-chain/zetacore/zetaclient/chains/bitcoin" - clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" clientcontext "github.com/zeta-chain/zetacore/zetaclient/context" "github.com/zeta-chain/zetacore/zetaclient/testutils" @@ -49,7 +49,7 @@ func (suite *BitcoinObserverTestSuite) SetupTest() { } appContext := clientcontext.NewAppContext(&clientcontext.ZetacoreContext{}, config.Config{}) client, err := NewObserver(appContext, chains.BitcoinRegtest, nil, tss, tempSQLiteDbPath, - clientcommon.DefaultLoggers(), config.BTCConfig{}, nil) + base.DefaultLogger(), config.BTCConfig{}, nil) suite.Require().NoError(err) suite.rpcClient, err = getRPCClient(18332) suite.Require().NoError(err) diff --git a/zetaclient/chains/bitcoin/observer/observer.go b/zetaclient/chains/bitcoin/observer/observer.go index 062f00c2c7..6b93ba12cd 100644 --- a/zetaclient/chains/bitcoin/observer/observer.go +++ b/zetaclient/chains/bitcoin/observer/observer.go @@ -28,9 +28,9 @@ import ( "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/proofs" observertypes "github.com/zeta-chain/zetacore/x/observer/types" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" "github.com/zeta-chain/zetacore/zetaclient/chains/bitcoin" "github.com/zeta-chain/zetacore/zetaclient/chains/interfaces" - clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/context" "github.com/zeta-chain/zetacore/zetaclient/metrics" @@ -138,7 +138,7 @@ func NewObserver( zetacoreClient interfaces.ZetacoreClient, tss interfaces.TSSSigner, dbpath string, - loggers clientcommon.ClientLogger, + logger base.Logger, btcCfg config.BTCConfig, ts *metrics.TelemetryServer, ) (*Observer, error) { @@ -158,14 +158,14 @@ func NewObserver( ob.Mu = &sync.Mutex{} - chainLogger := loggers.Std.With().Str("chain", chain.ChainName.String()).Logger() + chainLogger := logger.Std.With().Str("chain", chain.ChainName.String()).Logger() ob.logger = Logger{ Chain: chainLogger, Inbound: chainLogger.With().Str("module", "WatchInbound").Logger(), Outbound: chainLogger.With().Str("module", "WatchOutbound").Logger(), UTXOs: chainLogger.With().Str("module", "WatchUTXOs").Logger(), GasPrice: chainLogger.With().Str("module", "WatchGasPrice").Logger(), - Compliance: loggers.Compliance, + Compliance: logger.Compliance, } ob.zetacoreClient = zetacoreClient diff --git a/zetaclient/chains/bitcoin/observer/observer_test.go b/zetaclient/chains/bitcoin/observer/observer_test.go index dfba6b3dbc..2d2494dd16 100644 --- a/zetaclient/chains/bitcoin/observer/observer_test.go +++ b/zetaclient/chains/bitcoin/observer/observer_test.go @@ -14,7 +14,7 @@ import ( "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" observertypes "github.com/zeta-chain/zetacore/x/observer/types" - clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/context" "github.com/zeta-chain/zetacore/zetaclient/metrics" @@ -75,11 +75,11 @@ func TestNewBitcoinObserver(t *testing.T) { chain := chains.BitcoinMainnet zetacoreClient := mocks.NewMockZetacoreClient() tss := mocks.NewMockTSS(chains.BitcoinTestnet, sample.EthAddress().String(), "") - loggers := clientcommon.ClientLogger{} + logger := base.Logger{} btcCfg := cfg.BitcoinConfig ts := metrics.NewTelemetryServer() - client, err := NewObserver(appContext, chain, zetacoreClient, tss, tempSQLiteDbPath, loggers, btcCfg, ts) + client, err := NewObserver(appContext, chain, zetacoreClient, tss, tempSQLiteDbPath, logger, btcCfg, ts) require.ErrorContains(t, err, "btc chains params not initialized") require.Nil(t, client) }) diff --git a/zetaclient/chains/bitcoin/signer/signer.go b/zetaclient/chains/bitcoin/signer/signer.go index 12c5b2b100..f2d47fd988 100644 --- a/zetaclient/chains/bitcoin/signer/signer.go +++ b/zetaclient/chains/bitcoin/signer/signer.go @@ -21,10 +21,10 @@ import ( "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" "github.com/zeta-chain/zetacore/zetaclient/chains/bitcoin" "github.com/zeta-chain/zetacore/zetaclient/chains/bitcoin/observer" "github.com/zeta-chain/zetacore/zetaclient/chains/interfaces" - clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/compliance" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/context" @@ -56,7 +56,7 @@ type Signer struct { func NewSigner( cfg config.BTCConfig, tssSigner interfaces.TSSSigner, - loggers clientcommon.ClientLogger, + logger base.Logger, ts *metrics.TelemetryServer, coreContext *context.ZetacoreContext) (*Signer, error) { connCfg := &rpcclient.ConnConfig{ @@ -75,8 +75,8 @@ func NewSigner( return &Signer{ tssSigner: tssSigner, rpcClient: client, - logger: loggers.Std.With().Str("chain", "BTC").Str("module", "BTCSigner").Logger(), - loggerCompliance: loggers.Compliance, + logger: logger.Std.With().Str("chain", "BTC").Str("module", "BTCSigner").Logger(), + loggerCompliance: logger.Compliance, ts: ts, coreContext: coreContext, }, nil diff --git a/zetaclient/chains/bitcoin/signer/signer_test.go b/zetaclient/chains/bitcoin/signer/signer_test.go index 6d048c7bba..74628211a4 100644 --- a/zetaclient/chains/bitcoin/signer/signer_test.go +++ b/zetaclient/chains/bitcoin/signer/signer_test.go @@ -18,8 +18,8 @@ import ( . "gopkg.in/check.v1" "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" "github.com/zeta-chain/zetacore/zetaclient/chains/bitcoin" - clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/context" "github.com/zeta-chain/zetacore/zetaclient/metrics" @@ -52,7 +52,7 @@ func (s *BTCSignerSuite) SetUpTest(c *C) { s.btcSigner, err = NewSigner( config.BTCConfig{}, tss, - clientcommon.DefaultLoggers(), + base.DefaultLogger(), &metrics.TelemetryServer{}, context.NewZetacoreContext(cfg)) c.Assert(err, IsNil) @@ -233,7 +233,7 @@ func TestAddWithdrawTxOutputs(t *testing.T) { signer, err := NewSigner( config.BTCConfig{}, mocks.NewTSSMainnet(), - clientcommon.DefaultLoggers(), + base.DefaultLogger(), &metrics.TelemetryServer{}, nil, ) @@ -396,7 +396,7 @@ func TestNewBTCSigner(t *testing.T) { btcSigner, err := NewSigner( config.BTCConfig{}, tss, - clientcommon.DefaultLoggers(), + base.DefaultLogger(), &metrics.TelemetryServer{}, context.NewZetacoreContext(cfg)) require.NoError(t, err) diff --git a/zetaclient/chains/evm/observer/observer.go b/zetaclient/chains/evm/observer/observer.go index 795aa3b13b..99db258f5a 100644 --- a/zetaclient/chains/evm/observer/observer.go +++ b/zetaclient/chains/evm/observer/observer.go @@ -30,9 +30,9 @@ import ( "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/proofs" observertypes "github.com/zeta-chain/zetacore/x/observer/types" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" "github.com/zeta-chain/zetacore/zetaclient/chains/evm" "github.com/zeta-chain/zetacore/zetaclient/chains/interfaces" - clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" clientcontext "github.com/zeta-chain/zetacore/zetaclient/context" "github.com/zeta-chain/zetacore/zetaclient/metrics" @@ -93,7 +93,7 @@ func NewObserver( zetacoreClient interfaces.ZetacoreClient, tss interfaces.TSSSigner, dbpath string, - loggers clientcommon.ClientLogger, + logger base.Logger, evmCfg config.EVMConfig, ts *metrics.TelemetryServer, ) (*Observer, error) { @@ -101,13 +101,13 @@ func NewObserver( ts: ts, } - chainLogger := loggers.Std.With().Str("chain", evmCfg.Chain.ChainName.String()).Logger() + chainLogger := logger.Std.With().Str("chain", evmCfg.Chain.ChainName.String()).Logger() ob.logger = Logger{ Chain: chainLogger, Inbound: chainLogger.With().Str("module", "WatchInbound").Logger(), Outbound: chainLogger.With().Str("module", "WatchOutbound").Logger(), GasPrice: chainLogger.With().Str("module", "WatchGasPrice").Logger(), - Compliance: loggers.Compliance, + Compliance: logger.Compliance, } ob.coreContext = appContext.ZetacoreContext() @@ -581,7 +581,7 @@ func (ob *Observer) LoadLastScannedBlock() error { if scanFromBlock != "" { ob.logger.Chain.Info(). Msgf("LoadLastScannedBlock: envvar %s is set; scan from block %s", envvar, scanFromBlock) - if scanFromBlock == clienttypes.EnvVarLatest { + if scanFromBlock == base.EnvVarLatestBlock { header, err := ob.evmClient.HeaderByNumber(context.Background(), nil) if err != nil { return err diff --git a/zetaclient/chains/evm/observer/observer_test.go b/zetaclient/chains/evm/observer/observer_test.go index bfc85e15e1..0601c083f2 100644 --- a/zetaclient/chains/evm/observer/observer_test.go +++ b/zetaclient/chains/evm/observer/observer_test.go @@ -15,9 +15,9 @@ import ( "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" "github.com/zeta-chain/zetacore/zetaclient/chains/evm/observer" "github.com/zeta-chain/zetacore/zetaclient/chains/interfaces" - "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/context" "github.com/zeta-chain/zetacore/zetaclient/keys" @@ -83,7 +83,7 @@ func MockEVMObserver( appCtx, evmCfg := getAppContext(chain, ¶ms) // create chain observer - client, err := observer.NewObserver(appCtx, zetacoreClient, tss, "", common.ClientLogger{}, evmCfg, nil) + client, err := observer.NewObserver(appCtx, zetacoreClient, tss, "", base.Logger{}, evmCfg, nil) require.NoError(t, err) client.WithEvmClient(evmClient) client.WithEvmJSONRPC(evmJSONRPC) diff --git a/zetaclient/chains/evm/signer/signer.go b/zetaclient/chains/evm/signer/signer.go index 00f6f35fd5..d49895e2a3 100644 --- a/zetaclient/chains/evm/signer/signer.go +++ b/zetaclient/chains/evm/signer/signer.go @@ -27,10 +27,10 @@ import ( crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" "github.com/zeta-chain/zetacore/zetaclient/chains/evm" "github.com/zeta-chain/zetacore/zetaclient/chains/evm/observer" "github.com/zeta-chain/zetacore/zetaclient/chains/interfaces" - clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/compliance" clientcontext "github.com/zeta-chain/zetacore/zetaclient/context" "github.com/zeta-chain/zetacore/zetaclient/metrics" @@ -52,7 +52,7 @@ type Signer struct { chain *chains.Chain tssSigner interfaces.TSSSigner ethSigner ethtypes.Signer - logger clientcommon.ClientLogger + logger base.Logger ts *metrics.TelemetryServer coreContext *clientcontext.ZetacoreContext @@ -74,7 +74,7 @@ func NewSigner( zetaConnectorAddress ethcommon.Address, erc20CustodyAddress ethcommon.Address, coreContext *clientcontext.ZetacoreContext, - loggers clientcommon.ClientLogger, + logger base.Logger, ts *metrics.TelemetryServer, ) (*Signer, error) { client, ethSigner, err := getEVMRPC(endpoint) @@ -100,9 +100,9 @@ func NewSigner( zetaConnectorAddress: zetaConnectorAddress, er20CustodyAddress: erc20CustodyAddress, coreContext: coreContext, - logger: clientcommon.ClientLogger{ - Std: loggers.Std.With().Str("chain", chain.ChainName.String()).Str("module", "EVMSigner").Logger(), - Compliance: loggers.Compliance, + logger: base.Logger{ + Std: logger.Std.With().Str("chain", chain.ChainName.String()).Str("module", "EVMSigner").Logger(), + Compliance: logger.Compliance, }, ts: ts, mu: &sync.Mutex{}, diff --git a/zetaclient/chains/evm/signer/signer_test.go b/zetaclient/chains/evm/signer/signer_test.go index 06e33571a5..186582dd24 100644 --- a/zetaclient/chains/evm/signer/signer_test.go +++ b/zetaclient/chains/evm/signer/signer_test.go @@ -15,9 +15,9 @@ import ( "github.com/zeta-chain/zetacore/pkg/constant" "github.com/zeta-chain/zetacore/testutil/sample" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" + "github.com/zeta-chain/zetacore/zetaclient/chains/base" "github.com/zeta-chain/zetacore/zetaclient/chains/evm/observer" "github.com/zeta-chain/zetacore/zetaclient/chains/interfaces" - "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/context" "github.com/zeta-chain/zetacore/zetaclient/keys" @@ -42,7 +42,7 @@ func getNewEvmSigner(tss interfaces.TSSSigner) (*Signer, error) { mpiAddress := ConnectorAddress erc20CustodyAddress := ERC20CustodyAddress - logger := common.ClientLogger{} + logger := base.Logger{} ts := &metrics.TelemetryServer{} cfg := config.NewConfig() @@ -66,7 +66,7 @@ func getNewEvmChainObserver(tss interfaces.TSSSigner) (*observer.Observer, error tss = mocks.NewTSSMainnet() } - logger := common.ClientLogger{} + logger := base.Logger{} ts := &metrics.TelemetryServer{} cfg := config.NewConfig() diff --git a/zetaclient/common/logger.go b/zetaclient/common/logger.go deleted file mode 100644 index ebe773abfc..0000000000 --- a/zetaclient/common/logger.go +++ /dev/null @@ -1,20 +0,0 @@ -package common - -import ( - "github.com/rs/zerolog" - "github.com/rs/zerolog/log" -) - -// ClientLogger is a struct that contains the logger for a chain observer -type ClientLogger struct { - Std zerolog.Logger - Compliance zerolog.Logger -} - -// DefaultLoggers returns the default loggers for a chain observer -func DefaultLoggers() ClientLogger { - return ClientLogger{ - Std: log.Logger, - Compliance: log.Logger, - } -} diff --git a/zetaclient/context/zetacore_context_test.go b/zetaclient/context/zetacore_context_test.go index 0ee7d5bc8a..d8117e124b 100644 --- a/zetaclient/context/zetacore_context_test.go +++ b/zetaclient/context/zetacore_context_test.go @@ -4,13 +4,13 @@ import ( "testing" "github.com/rs/zerolog" + "github.com/rs/zerolog/log" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" lightclienttypes "github.com/zeta-chain/zetacore/x/lightclient/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" - clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" context "github.com/zeta-chain/zetacore/zetaclient/context" ) @@ -179,7 +179,6 @@ func TestUpdateZetacoreContext(t *testing.T) { ChainId: 3, } tssPubKeyToUpdate := "tsspubkeytest" - loggers := clientcommon.DefaultLoggers() crosschainFlags := sample.CrosschainFlags() verificationFlags := sample.HeaderSupportedChains() @@ -193,7 +192,7 @@ func TestUpdateZetacoreContext(t *testing.T) { *crosschainFlags, verificationFlags, false, - loggers.Std, + log.Logger, ) // assert keygen updated @@ -285,7 +284,6 @@ func TestUpdateZetacoreContext(t *testing.T) { crosschainFlags := sample.CrosschainFlags() verificationFlags := sample.HeaderSupportedChains() require.NotNil(t, crosschainFlags) - loggers := clientcommon.DefaultLoggers() zetaContext.Update( &keyGenToUpdate, enabledChainsToUpdate, @@ -295,7 +293,7 @@ func TestUpdateZetacoreContext(t *testing.T) { *crosschainFlags, verificationFlags, false, - loggers.Std, + log.Logger, ) // assert keygen updated diff --git a/zetaclient/types/defs.go b/zetaclient/types/defs.go deleted file mode 100644 index 8bc79913fe..0000000000 --- a/zetaclient/types/defs.go +++ /dev/null @@ -1,5 +0,0 @@ -package types - -const ( - EnvVarLatest = "latest" -) From c667168df943a4016225dfd70e5472a4c18725ec Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Wed, 19 Jun 2024 20:12:10 +0300 Subject: [PATCH 6/6] ci: add infra label to issue form (#2352) * ci: add infra label to issue form * move link to description * formatting --------- Co-authored-by: Alex Gartner --- .github/ISSUE_TEMPLATE/syncing.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/syncing.yaml b/.github/ISSUE_TEMPLATE/syncing.yaml index 17884a3b32..6519c730f9 100644 --- a/.github/ISSUE_TEMPLATE/syncing.yaml +++ b/.github/ISSUE_TEMPLATE/syncing.yaml @@ -1,5 +1,6 @@ name: Having difficulties setting up or syncing a node description: Please fill out the following form to help us understand and resolve your issue with setting up or syncing a node. Provide as much detail as possible to ensure a quick and accurate resolution. +labels: ["infra"] body: - type: dropdown attributes: @@ -30,10 +31,10 @@ body: - KSYNC - type: dropdown attributes: - label: Did you build your binary from source or download it from the Releases[https://github.com/zeta-chain/node/releases] page? - description: We recommend using binaries from our releases page. + label: Did you build your binary from source or download it from the Releases page? + description: "We recommend using binaries from our Releases page: https://github.com/zeta-chain/node/releases" options: - - "Downloaded from releases page" + - "Downloaded from Releases page" - "Built locally" - type: textarea attributes: