Commit Graph

322 Commits

Author SHA1 Message Date
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