Commit Graph

20 Commits

Author SHA1 Message Date
bruce-riley 09aee3cfde
Node/Acct: Renaming (#2245)
Change-Id: I20783b4ae4e445a54d45280e19332af87336a92a
2023-01-17 07:30:50 -06:00
bruce-riley 499c8424e4
Node: Initial guardiand changes for accounting (#2181)
* node: guardiand support for accounting

Change-Id: I97fe1f6d6d71a5803881ff4c793e3c30f22b14d8

* Node: Tie accounting into the guardian

Change-Id: I31600d18176f516b75b3eb046fd7ac6e54e1b133

* Node: accounting tests and metrics

Change-Id: Ieb139772edf464ed1ab202861babeaf0f857ad6b

* Node: minor tweak to accounting metrics

Change-Id: Iad2b7e34870734f0c5e5d538c0ac86269a9a4728

* Node: load accounting key

Change-Id: I228ce23e63b556d751000b97097202eda48650aa

* More work in progress

Change-Id: I85088d26c05cf02d26043cf6ee8c67efd13f2ea4

* Node: send observations to accounting contract

Change-Id: Ib90909c2ee705d5e2a7e6cf3a6ec4ba7519e2eb1

* Node: Fix lint error in accounting tests

Change-Id: Id73397cf45107243a9f68ba82bed3ccf2b0299b5

* Node: Need to copy libwasmvm.so

Change-Id: I2856c8964ca082f1f4014d6db9fb1b2dc4e64409

* Node: Rename wormchain to wormconn

Change-Id: I6782be733ebdd92b908228d3984a906aa4c795f7

* Node: moving accounting check after governor

Change-Id: I064c77d30514715c6f8b6b5da50806a5e1adf657

* Node: Add accounting status to heartbeat

Change-Id: I0ae3e476386cfaccc5c877ee1351dbe41c0358c7

* Node: start of accounting integration work

Change-Id: I8ad206eb7fc07aa9e1a2ebc321f2c490ec36b51e

* Node: More broadcast tx stuff

Change-Id: Id2cc83df859310c013665eaa9c6ce3033bb1d9c5

* Node: Can actually send a request to accounting

Change-Id: I6af5d59c53939f58b2f13ae501914bef260592f2

* Node: More accounting tx broadcast stuff

Change-Id: If758e49f8928807e87053320e9330c7208aad490

* Node: config changes for accounting

Change-Id: I2803cceb188d04c557a52aa9aa8ba7296da8879f

* Node: More accounting changes

Change-Id: Id979af0ec6ab8484bc094072f3febf39355351ca

* Node/Acct: Use new observation request format

* Node/acct: use new contract interface

* Node/acct: fix minor copy/paste error

* Node: Clean up comments and lint errors

* Node: disable accounting in dev by default

* Node: Fix test failure

* Remove test code

* Switch messages to debug, rename Run()

* check for "out of gas"

* Use worker routine to submit observations

* Rename mutex to reflect what it protects

* Create handleEvents func

* Remove FinalizeObservation

* Node/Acct: Trying to use tm library for watcher

* Node/acct: switch watcher to use tm library

* Node/Acct: Need separate WS parm for accounting

* Node/Acct: Fix compile error in tests

* Node/Acct: Minor rework

* Node: add wormchain as a dep to remove stale code

* Node/Acct: GS index is not correct in requests

* Node/Acct: Peg connection error metric

* Node/Acct: Add wormchain to node docker file

* Node/Acct: Fix for double base64 decode

* Node/Acct: Change public key to sender address

* Node/Acct: Fix lint error

* Node/Acct: key pass phrase change

* Node/Acct: Pass guardian index in obs req

* Node/Acct: No go on submit observation

* Node/Acct: Don't double encode tx_hash

* Node/Acct: Remove unneeded base64 encoding

* Node/Acct: handle submit channel overflow

* Node/Acct: Added a TODO to document a review issue

* Node/Acct: Fix for checking if channel is full

Co-authored-by: Conor Patrick <conorpp94@gmail.com>
2023-01-16 06:33:01 -06:00
Bruce Riley 346b68582a Node: Just delete the PYTHNET messages 2022-10-28 14:38:03 -04:00
Bruce Riley 391781d7f7 Node: Disable PYTHNET log messages 2022-10-28 14:38:03 -04:00
tbjump d5368b32c4
Revert "node: governor listen to quorum gossip (#1487)" (#1682)
This reverts commit 0dbd0b6628.
2022-10-06 07:57:25 -05:00
Chirantan Ekbote 7f4b0d1a09 Wormhole chain integration
This is a squashed commit of all the changes needed to integrate
wormhole chain into the main repo.
2022-10-03 17:34:42 +09:00
bruce-riley 0dbd0b6628
node: governor listen to quorum gossip (#1487)
* governor listen to quorum gossip

* governor listen to quorum gossip

* Fix build error in tests

* See p2p from other guardians in devnet

* Fix test broke during merge

* Change delete function being used

* Don't reload duplicates on startup
2022-09-30 12:28:26 -05:00
bruce-riley ddd8b78160
node: don't store pythnet VAAs in the database (#1643)
* Don't store pythnet VAAs in the database

Change-Id: Ief4357ab4c909d25dc9182490c322ef253ac23d3

* Clean up logging

Change-Id: I46efea96d6c2ba65459254ffeb21f5d65abebb01

* Rework this to require less custom code

Change-Id: Ib7f521ecff62b1bd13efcb627f88413f4141de59

* Fix copy paste error

Change-Id: I067f8364042f494ad56ed88919cd917f18423073

* Fix typo

Change-Id: I22ccb56ac330bd557b6e8438cfe9c02d7593361d
2022-09-27 08:14:52 -05:00
Hendrik Hofstadt 5993a231fa
node: prevent reobservation of unreliable messages (#1627) 2022-09-26 13:11:22 +02:00
Chirantan Ekbote 0552e2fe0c node: processor: Rate-limit reobservations
We currently run the cleanup loop every 30 seconds, which means that
once 5 minutes have passed for an observation without quorum we will
send out re-observation requests to the p2p network every 30 seconds.

This is a bit excessive so limit sending these requests out to once
every 5 minutes.
2022-09-22 15:22:51 -04:00
Chirantan Ekbote 12459c4a2a Add a wormhole go sdk
The wormhole sdk is a new go module in the sdk/ directory.  This
initially contains the *_consts.go files from the common package in the
top-level sdk package and the entire vaa package as a sub-package.

For go reasons this needs to be in the sdk directory itself (rather than
a sdk/go subdir).  To prevent the go tooling from looking into the other
non-go subdirs, add an empty go.mod file in each one.  See
golang issue 42965 for more details on why we can't have nice
things (I'm deliberately not linking to stop github from spamming that
issue).
2022-09-15 14:35:46 +01:00
Chirantan Ekbote 1753bb34f0 Send re-observation request when re-broadcasting local observations
Currently if an observation hasn't reached quorum within 5 minutes, the
processor will re-broadcast the signed local observation to the other
guardians in the network. However if not enough guardians actually
observed the original tx, then no amount of re-broadcasting will help
the network reach quorum.

Fix this issue by sending a re-observation request whenever we
re-broadcast a signed local observation.  This ensures that any
guardians that missed the tx the first time it happened have a chance to
re-observe it and help the network reach quorum.
2022-08-24 17:59:42 +09:00
bruce-riley 7402259fc7
Chain governor (#1277)
* Rebase

* Reload from db on start up

Change-Id: I1deac9db28ad1157ea7e0c84af41c35b38497f4e

* Console commands

Change-Id: Ic242038312b7c837443a2df8823f100b3cdffd77

* Query prices from CoinGecko

Change-Id: I9a8c282ba374d32ef7045d11979a27ede3c52827

* Move chain config to separate file

Change-Id: I6a790eca765bce1f2caf48134e225df5c4daff15

* More code cleanup

Change-Id: Id12affa78cdc2d394d6dab0c53bb7ad06df8007e

* Few minor tweaks

Change-Id: I6cb511599d669e0b3d716d9f314ac0f26935ee92

* Create separate tests for different packages

Change-Id: Idb4da6817c9daad2a7420abc11bdaa702ae056dc

* Fix lint errors

Change-Id: I137c9e7e4574aee9c9fec22e91e19eee0e86a349

* Simplify chainlock message tests

* Add more governor db test coverage

* Next batch of review rework

Change-Id: Ife54852fca6c6990d1ffb3d60a8dd7f49d526f0a

* Still more rework

Change-Id: I43a8aa7fa4e1a7cea4d7fde68c963123c1ca8d53

* More rework

Change-Id: I9382412af4ffeda74967a834a6b0195a9d28b720

* Fix lint errors

Change-Id: Idaafce9b0314192557b7207911375d000bac5ae2

* Add rest and prometheus support

Change-Id: Ib870ed7eb305ef1ebbf6a7cedabc665c37c19171

* Add separate configs for testnet and devnet

Change-Id: I76b11d8940a8dc9935b3f276a008ed20ef60b850

* Update mainnet tokens to fix decimals

Change-Id: Iab018827766bc7748038b7be2f51342afb79b87c

* Let small enqueued VAAs go out when big ones can't

Change-Id: I7d3ef88d4579702d0c6ff4eaf5a8524799610ff6

* Tweak testnet config parameters

Change-Id: Id2c54151a7183ab3fb4af8060929198f6021ba4e

* Rework / enhancements from testnet testing

Change-Id: I1387b1d22667fa6ffe0bb1832dbc0b31196505d3

* Use known emitter maps

Change-Id: If330ee9d30ac3c2d1c6dca674f7777dc759de230

* Fix typo and out of date comments

Change-Id: I54a19792104ccc6ca023020303a710ef3ba18f74

Co-authored-by: claudijd <jclaudius@jumptrading.com>
2022-07-19 14:08:06 -04:00
Chirantan Ekbote 7a1b1344a1 node: processor: Make observation state generic
We need to reuse almost all of the gossip infrastructure for accounting
transactions, with the only difference being that accounting will use a
`Transfer` message rather than a `VAA`.

Make the observation stored in the processor state generic so that it
can be either a VAA or a Transfer.  The rest of the code is shared.
2022-07-19 10:51:15 +09:00
Bruce Riley b96ba36d25 Terra2 Mainnet Guardian Changes 2022-06-22 11:12:30 -04:00
tbjump 4575fe05d9
Better lint and formatting (#1263)
Enforce goimports, add tooling and documentation, and run it on the repo.
2022-06-21 12:18:16 -07:00
Leo 659b7b2547 node: add Discord notifications for missing signatures
Change-Id: If09643c2e02c4c166577082cd9be9124d2e775d4
2021-10-06 14:12:21 +02:00
Leo bd5f957e1b node: remove unused terraChainID command line flag
Change-Id: I5f02faa3f00098725e7242c289f65978c4879c3c
2021-10-03 21:03:43 +02:00
Leo 7914512797 node: handle inbound SignedVAAWithQuorum messages
Change-Id: I539155bb4e59d728ea528e6e2f70b6fbb3338a41
2021-09-13 17:51:47 +00:00
Leo e98463cfe3 node: rename bridge/ to node/
Calling guardiand a bridge dates back to v1 and no longer makes sense.

Change-Id: I27d24a5d7a64c3e37d6a5ce9c402c6248ad9c59e
2021-08-26 11:36:36 +02:00