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
tbjump 17e732c741
node/p2p: enforce ObservationRequest signature payload >= 34 bytes (#1992)
Co-authored-by: tbjump <>
2022-11-28 10:42:39 -06:00
tbjump 200fee61a8
node/p2p: enforce minimum heartbeat message length (#1958)
Co-authored-by: tbjump
2022-11-28 10:23:34 -06:00
ckeun 557a32b8f4
node: Added gov gossip support to p2p (#1755)
* node: Added gov gossip support to p2p

* node: Added nil parms for spy & guardian
2022-10-19 22:32:05 -05:00
bruce-riley 2b582b10b8
node: governor publish gossip (#1538)
* Governor publish gossip

Change-Id: I2b8b1ea84a0c411101a7027acd3a27a6d6464d59

* Update the config publish time

Change-Id: Ic6abf84befb1c20756da2ff66b15a8325dc46067

* Not setting value on enqueued VAAs correctly

Change-Id: I9fd3a5d8fc574f8382125445fa688efdae45b88c

* Publish at most 20 VAAs, not 20 per chain

Change-Id: Ic9dff99c59ee89d57fd79158844a1fe1a0003112

* Switch to using signed messages

Change-Id: I66cddc7477cd477aa77bdadfc346b588f2ae645b

* Publish status only once per minute

Change-Id: I972fb0cf868e89c6f74ae4441471a55df389f4dd

* Minor comment change

Change-Id: I0d3e443cbec7edd282f89c1a5cce5d5ec8776d55
2022-09-26 11:24:30 -05: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 9e92f9dbbf node: Update libp2p to v0.22.0
Needed to build with newer go toolchains (up to 1.19).  Many of the
libp2p subpackages have been merged as sub-directories of the main
libp2p package so update the imports to use the newer versions.
2022-09-07 10:02:35 +09:00
kev1n-peters 536a97066e
node: configure p2p routing table with bootstrapping nodes (#1455)
Configure the bootstrapping nodes that we will connect to to seed and refresh
the Routing Table if it becomes empty.

Fixes an issue where the spy stops receiving gossiped messages after the node
is restarted, because the Routing Table becomes empty and is never refreshed.
2022-08-24 18:27:59 +02:00
bruce-riley 8557b6d232
More governor code review rework (#1404)
* More code review rework

Change-Id: I0ae094b16a8e0469f83f711e7118936abf70b109

* Fix lint error

Change-Id: Ie3bdcc61a8c475018a8f72c9cc84678779447d16

* Code review rework

Change-Id: Ief1119e7c9687db855fbee90d32f631630380e60

* Add features list to gossip heartbeat message
2022-08-09 23:22:14 -04: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
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 c28b492e03 node: add reobservation requests for Eth chains
commit-id:e4fa6adf
2022-02-12 01:06:06 +01:00
Leo 73a5b72857 node: implement observation requests via gossip
Limitations:

- Only supported for Solana and for confirmation level Finalized,
  which the token/NFT bridges use. Need to take a close look before
  enabling it for both (since we're bypassing the tx fetcher and would
  fetch and process accounts of the "wrong" confirmation levels).

- Rate limiting not implemented yet, will be done in a future release
  when things are not currently on fire.

Test: https://gist.github.com/leoluk/bab3a18e922057109facea1cf1f26b2f

commit-id:6a0d4c32
2022-01-26 13:00:23 +01:00
Leo b8c30314b5 node: avoid clobbering terminal with binary data
commit-id:222d1f31
2022-01-25 22:36:24 +01:00
Leo bc48b1b51d node: add spy service
Change-Id: Ieb04e6d26c7778d8a8afbbeaee79d764d9f2cd31
2021-12-03 02:01:56 +01:00
Leo 621962982a node/pkg/common: guardian set state node cleanup
This feature is dedicated to Chorus One, who really like to rotate
node keys! :-)

https://github.com/certusone/wormhole/issues/304

Change-Id: Ic0f1e52095676222970752b1e2ac893d7f0915ec
2021-10-29 19:13:10 +00:00
Leo 7914512797 node: handle inbound SignedVAAWithQuorum messages
Change-Id: I539155bb4e59d728ea528e6e2f70b6fbb3338a41
2021-09-13 17:51:47 +00:00
Leo 4ac19518bd node: remove remaining "bridge" mentions
Ensure there's no core vs. token bridge ambiguity.

Breaking changes to the CLI:

* "guardiand bridge" CLI is now "guardiand node"
* --solanaBridgeAddress is now --solanaContract
* --bridgeKey is now --guardianKey

The Heartbeat proto message had one of its fields renamed from
BridgeAddress to ContractAddress, but this won't break the wire
format and the only consumer appears to be the CLI.

Change includes a "go mod tidy" - it insisted.

Change-Id: Id8b312827737f07f2d5f3944ebce469d946e7f51
2021-08-31 08:58:17 +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