Commit Graph

410 Commits

Author SHA1 Message Date
bruce-riley 2ae9f65a76
Governor: Increase the CoinGecko interval (#1837)
* Governor: Increase the CoinGecko interval

Change-Id: I4f97a012284c75d544a1fe7d43e5914210c4b441

* Suppress a chatty message for pythnet

Change-Id: I2149b056bfc430b6dedd180e951f345180e8a56d
2022-11-01 10:13:19 -05:00
bruce-riley a7d79407f4
Node: Don't log "Transaction failed" in solana (#1835)
Change-Id: I31ed7c57102dbdcd5956270e99859b9bdeaafb13
2022-11-01 10:13:00 -05:00
Evan Gray f60e6669ec node: commit proto and matching test fixes #1769 2022-10-31 12:45:30 -04:00
Evan Gray 9fa943eecd node: support for heartbeat spying fixes #1768 2022-10-31 11:40:55 -04:00
bruce-riley 61454a39bd
Node: remove support for Ropsten (#1818)
* Node: Remove support for Ropsten

* Node: Remove support for Ropsten

* Fix build  error
2022-10-31 09:14:01 -05: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
bruce-riley 914aa99a60
node: arbitrum watcher fix (#1812)
* node: arbitrum watcher fix

* Add comment

* Update the comment
2022-10-28 08:15:01 -04:00
bruce-riley a99c4a1a7c
node: arbitrum mainnet deploy changes (#1786)
* arbitrum mainnet deploy changes

* Change test for no governed tokens on Arbitrum

* Add arbitrum to to devnet guardian config
2022-10-27 14:50:01 -04:00
bruce-riley e1a6a1f85a
Node: governor not handling duplicates properly (#1772)
* Node: governor not handling duplicates properly

* Minor tweaks

* Logging changes to help debugging
2022-10-27 14:32:09 -04:00
Paul Noel b0f424b4d2 sdk/vaa: add verify function to vaa 2022-10-27 14:10:18 -04:00
Bruce Riley 16f79539b8 Should not have checked in unsafeDevMode to false 2022-10-27 12:43:01 -04:00
Bruce Riley 6a6c258015 Node: arbitrum watcher redesign 2022-10-27 12:43:01 -04:00
bruce-riley ea50bee9d2
Node: Upgrade to solana-go v1.7.1 (#1799)
Change-Id: Ia83b193d524e4c8571bfb8f3dd3075da8b5581cf
2022-10-27 11:14:42 -05:00
Josh Siegel 9fd4c7d6e1 minimal-tilt-fix: Lets make this ready even if the chain is not ticking 2022-10-27 07:52:24 -04:00
Bruce Riley 4a88c0a468 Node: update governor limits for Moonbeam 2022-10-26 13:22:50 -04:00
bruce-riley 49b3b6ab61
Node: make karura/acala watcher use finalized blocks (#1747)
* Node: acala watcher use finalized blocks

* node: acala not in safe mode assume finalized mode

* Remove unused function

* Changes signature of checkForSafeMode()

* Beef up the safe mode check

* Remove unnecessary function
2022-10-25 15:13:36 -05:00
Conor Patrick 91bd9a5c36 rename all wormholechain and wormhole-chain references 2022-10-24 17:59:52 -04:00
bruce-riley ed41a9a4ea
node: update solana watcher to use new solana-go version (#1760)
* node: remove the replace directive for solana-go

This commit that necessitated the fork:

    25b9f3025b

Has been merged upstream:

    9a01ac4f45

We need to pull in the latest solana-go to get support for MaxSupportedTransactionVersion.

* node: upgrade solana-go

This is the output from:

    go get -u github.com/gagliardetto/solana-go

It is required for the MaxSupportedTransactionVersion from:

    6ead48adf2

Co-authored-by: Jeff Schroeder <jeffschroeder@computer.org>
2022-10-24 12:22:56 -05:00
Hendrik Hofstadt e45e04bb09
node: move wormchain watcher (#1783)
Change-Id: If26681fe1a19396032947d22587d4c899153849c
2022-10-24 18:01:32 +02:00
jumpsiegel 6f38e42119
dev.v2: Modernize algorand watcher and improve logging (#1766) 2022-10-24 09:08:05 -05:00
Evan Gray 6c6661f621 js: make packages comply with ci rule 2022-10-20 17:11:13 -05:00
Paul Noel 40279fe668
node/cmd - refactor (#1762)
* node/cmd - refactor

* node/cmd - add logging

* node/cmd - refactor

* node/cmd - add logging

* node/cmd: address inspection comments
2022-10-20 11:43:43 -05:00
Josh Siegel 80e39a8128 aptos/watcher_fix: make it just try again instead of restarting the watcher 2022-10-20 07:16:49 -05: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 c31776c345
node: fix nil reference in evm watcher (#1758) 2022-10-19 10:20:46 -05:00
Hendrik Hofstadt a6d6586d39 node: minor refactoring of aptos watcher
Change-Id: Ideac6ef7e26d9d7272b4cda32a80cf007d62a8a5
2022-10-17 07:30:35 -05:00
Jonathan Claudius bc6b5af095
governor: raise limits on moonbeam (#1739) 2022-10-16 22:15:42 -04:00
claudijd 89c2b252c7 Revert limit decrease 2022-10-16 18:39:54 -04:00
bruce-riley 7d53c1814f
node: governor updates for Aptos (#1740)
* node: governor updates for Aptos

* Tweak governor limits for aptos
2022-10-16 17:20:29 -05:00
Bruce Riley 9257443a4f node: aptos initial governor config
Change-Id: I9c1d5dfbc80c30baf3c51aeda325df235fb72915
2022-10-15 15:17:36 +01:00
Josh Siegel 6b670e3abf aptos/watcher: allow it to run in mainnet 2022-10-15 15:17:36 +01:00
Josh Siegel 2a31454d29 aptos/watcher: Update comments and errors 2022-10-15 15:17:36 +01:00
Josh Siegel 1a7098553c aptos/watcher: aptos and sui were missing from a bunch of spots 2022-10-15 15:17:36 +01:00
Josh Siegel daf689cf2a node: aptos watcher 2022-10-15 15:17:36 +01:00
Jeff Schroeder ab9252efab Fix xpla readiness for mainnet
The xpla readiness was correctly registered for testnet, but not for
mainnet. This fixes that small omission.
2022-10-12 21:59:40 -04:00
bruce-riley 67f57b797e
XPLA Mainnet Deploy (#1703)
* Prepare to deploy Xpla to mainnet

* Update SDK version

* Fix messed up error message

* Allow tests to pass with no XPLA tokens

* Make deploy script support testnet

* Update token bridge addresses after redeploy
2022-10-12 16:47:03 -04:00
bruce-riley 2fe56754d2
node: arbitrum watcher fix (#1699) 2022-10-12 10:04:54 -05:00
claudijd 3ac55339c9 Lower Solana Governor Limits 2022-10-11 22:30:01 -04:00
Chirantan Ekbote 8569d43ba4 node: solana: Store `lastSlot` more persistently
When the solana watcher is restarted (due to network errors, for
example) then the `lastSlot` state is lost.  This means that any
transactions in between the last processed slot and the most recent slot
will be lost and require manual re-observation.  Fix this by making the
`lastSlot` state persistent across watcher restarts.
2022-10-12 10:02:23 +09:00
bruce-riley 248fd5a588
node: neon watcher fix (#1694) 2022-10-07 13:45:37 -05:00
tbjump d5368b32c4
Revert "node: governor listen to quorum gossip (#1487)" (#1682)
This reverts commit 0dbd0b6628.
2022-10-06 07:57:25 -05:00
bruce-riley dd2b8e2bd2
node: poller timeout (#1670)
* node: poller timeout

Change-Id: Ia324f1ac482fa9c5bea2b501970f0b22b16e67ce

* Add a comment explaining readiness change

* Add comment explaining why we are using a timeout

* Retry if polling fails
2022-10-06 00:19:31 -05:00
Paul Noel 9657f41561
node: XPLA watcher (#1676) 2022-10-05 08:05:31 -05:00
Jonathan Claudius 59882d963d Re-add BOTX 2022-10-04 10:06:03 -05:00
Jonathan Claudius 517352706d Re-add manual token listings 2022-10-04 10:06:03 -05:00
Jonathan Claudius b4d79591a8 Update Governor tokens list 2022-10-04 10:06:03 -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 7fcbabe720
node: eth publish immediately (#1664)
* node: eth publish immediately

Change-Id: I242f02d0ed5bcced5ed366a512c07d5757b300e8

* testing: immediate publish test

* Move magic number to the sdk

Change-Id: I806f73d4442af4736aa6e5fc1c8e48e434c4a6d4

Co-authored-by: Evan Gray <battledingo@gmail.com>
2022-09-30 11:03:01 -05:00
Evan Gray 6a8ac2304f node: don't require algorandIndexerToken 2022-09-30 09:07:53 -04:00
Chirantan Ekbote afda43a2a0 node: Run `go mod tidy`
Commit "02cf08531 node: move watchers to dedicated package (#1647)"
removed a lot of packages from the node dependency list.  Run `go mod
tidy` to clean up the go.mod and go.sum files.
2022-09-30 16:12:30 +09:00
Bruce Riley aebbbdcb9a Code review rework 2022-09-29 22:38:27 -04:00
Bruce Riley d45a1e95cb Implement finalizer 2022-09-29 22:38:27 -04:00
Bruce Riley 0b6cc9ab44 Basic guardian support 2022-09-29 22:38:27 -04:00
Hendrik Hofstadt 02cf08531e
node: move watchers to dedicated package (#1647)
* node: reorganize watchers into own package

Change-Id: Idda82def1c8e1e07376bdc46a50fc02bd6f2386d

* node: rename terra to cosmwasm

Change-Id: Iebe5ccc7c66b772962425a42997bd2cfb66c6908
2022-09-28 15:27:13 +02:00
Hendrik Hofstadt ddd4f26f20
Refactor ethwatcher (#1618)
* reduce code duplication in ethereum watcher

Change-Id: I1d78e9cb86cb126e42959ef5805c0ee1b83e23a6

* reorganize finalizers

Change-Id: I64c61ebd8a03d4ba9f27ce82fbc4cae8b35f19d2

* rename ethereum to evm

Change-Id: I6d1e56df65c74edb3643b3506adcff8588e0a87b

* reorganize connectors

Change-Id: I21b31fb00f34dd6501e957b8f528723d5f548a52

* restructure into modular connectors

Change-Id: I111403a29464acfccad18b261658f59176a8795d
2022-09-28 13:15:57 +02: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
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
bruce-riley fb9f93e892
node: add command to purge pythnet VAAs (#1636)
* Add command to purge pythnet VAAs

* Add test for purging a single emitter address

* Fix lint error

* Using the wrong delete primative

Change-Id: I80d5294c17279d4e49220d81807e5964a5591721
2022-09-26 09:04:30 -05:00
Jeff Schroeder 239e27ca91
Remove solana and pythnet websocket flags (#1649)
They're both unused since the solana watcher uses http and not a
websocket for getting info.
2022-09-26 14:56:39 +01:00
Hendrik Hofstadt 5993a231fa
node: prevent reobservation of unreliable messages (#1627) 2022-09-26 13:11:22 +02:00
claudijd a670a6bab3 Drop Solana back down to pre-merge limit 2022-09-22 19:30:35 -04:00
Hendrik Hofstadt eaa1012cd3 node: add buffer to chain specific reobservation channels
Change-Id: I59743a605c92bbff82789c5d981dca882be8bbbe
2022-09-22 15:22:51 -04:00
Chirantan Ekbote 5be3c5f072 node: Don't block on reobservation channel
The per-watcher channels for reobservation requests don't have a
buffer, which means that if sending on any one channel blocks then _all_
reobservation requests get blocked.  Make the send fallible and log if
it blocks instead.
2022-09-22 15:22:51 -04: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 9989730d8f node: common: Fix racy test
Use a channel instead of concurrently accessing the same variable from 2
different goroutines.
2022-09-21 09:47:15 +09:00
Josh Siegel 42779b3a5f near/timestamps: timestamp simplifcation 2022-09-19 12:10:53 -05:00
Bruce Riley 3fc357ebcd Log block hash if watcher fails to read timestamp 2022-09-19 12:45:02 -04:00
Chirantan Ekbote cbce1e7c1f node: processor: Fix incorrect fallthrough in `handleCleanup`
When processing pending observations, the `handleCleanup` function
checks if we already have a stored quorum VAA and deletes the in-memory
observation if one is found.  If a stored quorum VAA is not found, then
we're supposed to continue evaluating the other conditions and take
the appropriate action.  This was implemented using a `fallthrough`
statement.

Unfortunately, this is not how `fallthrough` works.  `fallthrough`
simply tells the compiler to execute the body of the next branch in
the switch block, *without evaluating the condition*.  It also doesn't
evaluate the conditions for any of the other branches in the switch.

In practice what this meant is that for local observations that didn't
have quorum we would always take the first branch, fall through to the
second branch, and then exit the switch.  Only once we had a quorum
(`s.submitted == true`) would we actually consider any of the other
branches in the switch.  It also meant that there was no case where we
would take the branch for re-observing messages that hadn't reached
quorum.

Fix this by moving the stored quorum VAA check into an if statement and
then falling through to the switch statement if one is not found.
2022-09-16 18:17:45 -04:00
Kevin Peters e31f3e603d node: Fixed potential latest block nil dereference 2022-09-16 14:08:31 -04:00
Christine Eun aae1ea1c3f spy: Fixed obsvReqC hanging issue 2022-09-15 16:11:46 -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 2d8ec345cd Move node Dockerfile to parent directory
The node package needs access to the sdk directory so move the
Dockerfile up one level so that both directories can be added to the
build.
2022-09-15 14:35:46 +01:00
Evan Gray 8ad0cf0a02 node: fix finalized only for eth (not moonbeam) 2022-09-14 17:33:13 -04:00
Evan Gray 58186b8d75 node: eth finalized check 2022-09-14 13:39:16 -04:00
Josh Siegel e0843bf2bc near/watcher_fix: improve metrics 2022-09-14 09:22:25 -05:00
jumpsiegel ae0da5654e
node: increase near limits (#1589) 2022-09-13 14:17:46 -04:00
Kevin Peters 002de06ab5 node: doubled solana governor limits 2022-09-13 09:35:31 -04:00
kev1n-peters cda45a85ab
Moonbeam mainnet deploy (#1579)
* Moonbeam mainnet deploy

* Add eth migrate command to just deploy bridges

* node: Added moonbeam emitter addresses and governor limits

Co-authored-by: Bruce Riley <briley@jumptrading.com>
2022-09-12 18:41:39 -05:00
claudijd 2ad0245a2a Fix linter error on time.Until 2022-09-12 18:51:10 -04:00
claudijd 570feb79f4 Fix failing unit-tests after maxEnqueuedTime change 2022-09-12 18:51:10 -04:00
Evan Gray 780d004bbd node: migrate governor maxEnqueuedTime 2022-09-12 18:51:10 -04:00
claudijd 67b2dc5859 Shorten the wait period for maxEnqueuedTime 2022-09-12 18:51:10 -04:00
claudijd a5f21debe8 Update unit-test expectation comments 2022-09-12 18:32:41 -04:00
claudijd 26bf5e77bd Update unit-test expectations 2022-09-12 18:32:41 -04:00
claudijd a73e4f2f42 Update governor limits for Oasis/Solana 2022-09-12 18:32:41 -04:00
kev1n-peters ac2264c1af
node: Added sweatcoin to governor limits (#1580) 2022-09-12 17:08:13 -05:00
Justin Schuldt d83e44cf6b
proto - BatchVAA gossip and publicrpc (#1563) 2022-09-09 12:30:22 -05:00
claudijd 77c0f80e70 Add Terra limit bump 2022-09-08 09:35:15 -04:00
claudijd 48240db99a Bump Klaytn and Celo Governor limits 2022-09-08 09:35:15 -04:00
tbjump 09548300a0
comment danger of potential future VM.version increases (#1401)
comment danger of potential future VM.version increases
2022-09-07 12:33:35 -07:00
Bruce Riley df25eb737c Fix algorand token bridge in guardian
Change-Id: I1612ac29664f203407dea553a54962e5a8930c5d
2022-09-07 10:42:43 -05:00
Chirantan Ekbote 5cc2c07157 node: Remove deprecated grpc method
This is triggering the lint check.
2022-09-07 10:02:35 +09:00
Chirantan Ekbote d0eb7dd96c node: Fix formatting with go 1.19
Produced by running `goimports -w .` in the node/ directory.
2022-09-07 10:02:35 +09: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
bruce-riley b357ad7061
Script to generate change registration governance (#1508)
* Script to generate change registration governance

Change-Id: If99e78b031dcd4049a9ee40b09914eeb93e7518a

* Rework from code review

Change-Id: I93cf3166c1ab961add2c524084de1981a44b194e

* Change chain_id to chain-id

Change-Id: Iae6f9854a64d8559d03c56949d03043a94dbf7f6
2022-09-06 08:20:51 -05:00
Jeff Schroeder 214c3bc73a Fix guardiand admin list-nodes for pythnet
Thanks @maiquanghiep

Reported-By: Quang-Hiep Mai <maiquanghiepdl@gmail.com>
2022-09-01 11:24:46 -04:00
Jonathan Claudius 03746c7752
Up dailyLimit/bigTransactionSize for vaa.ChainIDCelo and vaa.ChainIDTerra (#1501) 2022-09-01 11:21:35 -04:00
bruce-riley bfeaa93716
node: governor auto release (#1452)
* Initial code

* Add test cases

* Get rid of excessive logging of price updates

* Add big tx size to available notional query

* Add tool to verify  price query still works

* Fix lint error

* Rename check_query.go

* Set big transaction sizes

* More rework

* Add unit-test for big transfer config

* Fix unit tests after updates for Near

* Add a couple more test cases

Co-authored-by: claudijd <jclaudius@jumptrading.com>
2022-08-30 11:28:18 -05:00