Commit Graph

212 Commits

Author SHA1 Message Date
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 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
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
Jonathan Claudius 3044d8f4af
Add mainnet chains and token config unit-tests (#1461)
* Add mainnet chains and token config unit-tests

* Fix Imports

* Update mainnet config checks

* Fix goimports and comments

* Fixups per PR review

* Clean up from code review

* Fix linting error
2022-08-29 08:39:20 -07:00
Bruce Riley f24be29937 Raise limit for klaytn 2022-08-27 18:57:50 -04:00
bruce-riley 4a42c29c0f
Near mainnet deploy (#1467)
* Initial commit

* Updated mainnet_tokens with Near token

* Near CLI changes

* More CLI tweaks

* Revert ethers in cli

* Fix lint error

* Testnet emitter is wrong

Co-authored-by: Christine Eun <ceun@jumptrading.com>
2022-08-26 12:46:37 -04:00
Josh Siegel 0384d31a9b near/audit: Fix go lint error 2022-08-25 09:16:32 -05:00
Josh Siegel a752e1309c near/audit: audit feedback 2022-08-25 09:16:32 -05: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
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
Chirantan Ekbote 4712a6f774 node/pkg/common: Fix race condition in PostObservationRequest
Any goroutine can push into a channel so the current implementation has
a race condition where the channel can become full immediately after the
length check, causing the subsequent send on the channel to block.

Fix this by wrapping the send on the channel with a select block.
Control will fall through to the default case only if the actual send
operation blocks, avoiding the potential race with other goroutines.
2022-08-24 17:59:42 +09:00
ckeun e47f9e481e
Updated mainnet gov'r cfgs with natives and stables for all chains limits for larger chains (#1437) 2022-08-17 11:22:49 -05:00
bruce-riley 7d956818f0
node: governor tweaks (#1422)
* Non-critical tweaks for the next scheduled deploy

* Make tests fail if mainnet config is invalid

* Make the test pass

* Add test to verify testnet config

* Add support for included token list to script

* Initial include list and algorand token addresses

* Fix typo in algorand token

* Lowering min notional to zero
2022-08-16 15:22:24 -05:00
Paul Noel eae0b51d37
Algorand mainnet deploy (#1434)
* algorand mainnet deploy

* Changes to sdk/js

* Update sdk changlog

Co-authored-by: Bruce Riley <briley@jumptrading.com>
2022-08-16 10:14:48 -05:00
bruce-riley 99fb46d549
Don't allow obs reqs if the queue is full (#1429)
Change-Id: Ifb0d038fa3adeddc6226e2289fe9dbfc8e39b4e7
2022-08-15 07:33:45 -05:00
Bruce Riley 7da21a60b6 Should not govern algorand yet 2022-08-10 14:31:19 -04:00
Bruce Riley 5ca2faa9a3 Governor should handle duplicate coin gecko ids 2022-08-10 12:59:32 -04:00
Josh Siegel 7e958c1643 near/backwards: RPC jumping causes us to think the chain went backwards 2022-08-10 10:10:05 -05:00
Bruce Riley edfd9987aa Initial gonvernor mainnet config
Change-Id: Ia84a9bd79bb15a4915e54cf019be23f8eee0fdcf
2022-08-10 10:28:24 -04: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
jumpsiegel 3f965da33b
node: add near support (#1397)
* node: add near support

* Tweaks suggested in zoom review

Co-authored-by: Bruce Riley <briley@jumptrading.com>
2022-08-05 13:49:16 -04:00
bruce-riley 126c9dcf57
Add is_enqueued_vaa query to governor (#1395) 2022-08-04 11:51:04 -05:00
Evan Gray e0fd3e788f
node: pythnet testnet support (#1380) 2022-07-28 12:30:00 -05: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
Chirantan Ekbote 508d140aa4 node/pkg/common: Refactor KnownEmitters
Create separate variables for the known tokenbridge and nft bridge
emitters and dynamically build KnownEmitters from those lists.  Having
separate variables for the tokenbridge and nft emitters will make it
easier to look them up without having to iterate over the whole emitter
list every time.

Also add a devnet_consts file to list the known emitters in the
development network.
2022-07-15 10:34:27 -04:00
Jeff Schroeder deeabc096d
Update injective url/s (#1350)
* node/pkg/terra: remove setEvents

The guardian set should only be authoritative from ethereum, so having
this code in the terra watcher is unnecessary. Getting this information
on injective requires a few more hoops to jump through but it is never
used. It is easier to maintain less code, so remove it.

* node/cmd/guardiand: remove setEvents from cosmwasm

This removes the set events from:

* terra 2
* injective
* terra classic

* node/pkg/terra: don't query guardianset from cosmwasm

* node/pkg/terra: support injective

* node/pkg/terra: update queryLatency metric

To show the query latency of fetching the latest block height from rpc
2022-07-14 13:41:31 -04:00
Jonathan Claudius 38a2aba318
Add unit tests for db (#1062)
* Add unit tests for db

* Fix error checks and clean up tempdirs

* Add string explainer in the absence of a panic

* Remove unnecessary comment

* Fix NoError suggestion

* Add linter exception for panic test
2022-07-11 11:36:32 -04:00
bruce-riley d7b7cefa99
Guardian support for Injective (#1327) 2022-07-06 10:19:57 -04:00
Jonathan Claudius 0c22d6c3d6
Add unit-test coverage for marshaling (#1205)
* Add unit-test coverage for marshalling

* Add test to see if Unmarshal will panic on a > 1000 payload

* Error instead of truncate on payloads over 1000 bytes

* Clarify intents and tests for vaa.Unmarshal
2022-06-28 14:25:13 -04:00
Csongor Kiss 3328a86778 node: Allow "msu" in node 2022-06-28 16:41:43 +01:00
Hendrik Hofstadt f1dba4adfe
Allow account reuse for message posting (#1077)
* Implement message posting with account reuse

Change-Id: I195f493f6816048f5f8f76e1f0f6e561fa0fe692

* Use different magic for unreliable messages

* guardiand: Ignore solana instructions with empty data

Co-authored-by: Csongor Kiss <ckiss@jumptrading.com>
2022-06-27 09:57:25 +01:00