* node/cmd/guardiand: pythnet for mainnet
Pythnet is a read only chain that will only use the core bridge to
transfer messages to other chains. No tokens will be transferred
to pythnet, so it has no token or nft bridge.
* node/cmd/guardiand: fix help for solana flags
Commit `1753bb3: Send re-observation request when re-broadcasting local
observations` changed the processor code to automatically send
re-observation requests. If multiple guardians do this around the same
time that would lead to multiple re-observation requests for the same
transaction.
Deduplicate re-observation requests by keeping a cache of the requests
that were received in the last 11 minutes. Any request that's already
in the cache will not be forwarded to the chain-specific observation
code. The 11 minute value was chosen because the guardians will send
these requests approximately every 5 minutes.
Also move the re-observation code into a standalone function so that it
can be more easily tested.
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.
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.
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.
* 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
* 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>
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.
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.
* 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
* 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
* node: Shrink final docker image size
* Tiltfile: guardiand should run the build stage
* node: allow building without -race
* node: Support development builds
A development build must use the --unsafeDevMode flag.
* CI: build docker image
Co-authored-by: Csongor Kiss <ckiss@jumptrading.com>
* 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
* 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>