Commit Graph

33 Commits

Author SHA1 Message Date
Hendrik Hofstadt 9fbb8d76c9 Remove persistence remainders from the guardian
Change-Id: I1c4c02820c2e5c0aca0c07402b854ffebd5cff0b
2021-07-20 23:50:38 +02:00
Hendrik Hofstadt af4e29978d Add commitment level to VAAs
This allows requesting attestations for various commitment/confirmation levels. This is helpful for low-latency applications like Pyth.

Change-Id: Ib49ace163365106b227613d2f66b787b3e5f5461
2021-07-19 07:11:45 +00:00
Hendrik Hofstadt 0f854dc08b Track optional persistence in guardian and terra
Also reformatting

Change-Id: Ibdc426aa09a74a6f564090bb838be1b037a9fce1
2021-07-05 18:02:04 +00:00
Hendrik Hofstadt 79d846eed1 Update guardian software chain watcher and VAA submitter
Change-Id: I10c05c57e934662ff005e6b50067195502d23c0f
2021-06-29 13:55:44 +02:00
Hendrik Hofstadt 9f514e2786 rename ChainLock to MessagePublication
Change-Id: If74e74c00957c202c7de1cc61204b6cc12ad3a8a
2021-04-19 14:27:06 +02:00
Leo 9c1d6ee00c bridge: add network heights and guardian address to heartbeat message 2021-02-10 01:57:54 +01:00
Leo 8735b587cb bridge/pkg/ethereum: fix guardian set update processing
We reused an expired context. No direct impact because the routine would crash
and re-fetch the guardian set.
2021-02-03 00:09:46 +01:00
Yuriy Savchenko d9bb5f6802
Added missing e2e tests between Terra and Ethereum/Solana (#168)
* Added missing e2e tests between Terra and Ethereum/Solana

* Review comments fixed

* Uncommented Solana<->ETH code, missing Ethereum utils file added
2021-02-01 20:38:13 +01:00
Leo b23f43ed1e bridge: add metrics for ethereum, p2p and solana 2021-01-27 14:46:01 +01:00
Leo 120dfab49e bridge: type alias for readiness components 2020-11-29 17:07:15 +01:00
Leo 30278397f7 bridge: add erc20 abi for use in tests 2020-11-29 17:07:15 +01:00
Leo 561852d499 bridge: simple readiness check 2020-11-29 17:07:15 +01:00
Leo a3c745ace7 bridge/pkg/ethereum: remove channel unsubscribes
Unsubscribe() does blocking I/O that ignores the runnable context
and can block forever: #107

It would appear that removing the Unsubscribe calls is the only
way to work around this go-ethereum bug.

ghstack-source-id: 93f287efc0
Pull Request resolved: https://github.com/certusone/wormhole/pull/109
2020-11-19 12:57:21 +01:00
Leo fd27570637 bridge: remove all supervisor.SignalHealthy calls
Supervisor does not back off tasks that failed in a healthy state.

There are a couple places where we rely on supervisor for
application-level backoff, so we always want back-off. The distinction
is meant to enable runnables to implement their own specific back-off
logic, which we don't, so we can safely ignore it.

Fixes #37

ghstack-source-id: c756381b1b
Pull Request resolved: https://github.com/certusone/wormhole/pull/64
2020-10-28 22:47:12 +01:00
Leo 08156ca438 bridge: move initial guardian set fetching to pkg/ethereum/watcher.go
This removes the special case in the processor. The initial guardian set
is now treated like a regular guardian set update, and the devnet
update check is executed on every update.

Fixes an edge case where processing a guardian set update would fail
with a spurious `abi: attempting to unmarshall an empty string while arguments are expected`
error, leaving the node in a bad state since restarting ethwatch
wouldn't cause the guardian set to be re-fetched.

ghstack-source-id: e580a65e90
Pull Request resolved: https://github.com/certusone/wormhole/pull/46
2020-10-22 12:20:12 +02:00
Leo 7e366b5da6 Update all Go dependencies to latest
...except for libp2p, which broke compatibility
between go-libp2p and go-libp2p-core:

https://github.com/libp2p/go-libp2p-core/issues/168

I explicitly updated all transitive dependencies using
go get -u ./..., so the top-level go.mod file grew to include those.
2020-10-16 20:48:53 +02:00
Hendrik Hofstadt f6750a3762 all: consider decimals on wrapped assets, fix VAA posting, fix solana account parsing 2020-08-28 15:10:42 +02:00
Hendrik Hofstadt 8e6dc495dc bridge: remove VAA timeout
Closes #35
2020-08-28 08:49:46 +02:00
Leo ef2aab5998 Decouple lifecycle of processor and ethwatch
We now do an independent fetch of the guardian set.
2020-08-22 00:21:57 +02:00
Leo 30d921ec25 Always cancel contexts to avoid leaking goroutines 2020-08-21 23:48:02 +02:00
Leo b663e2dc56 Generalize token lockup processor 2020-08-21 13:00:44 +02:00
Leo f1f2d0c8b8 Solana VAA submission stub 2020-08-20 21:48:58 +02:00
Leo da8840e363 Update ABI for 9b3f7999 2020-08-20 21:04:32 +02:00
Leo e1c760af6d Update ABI for 9b3f7999 2020-08-20 20:26:21 +02:00
Leo d6ef9c932c bridge: listen to eth lockups and aggregate signatures from all nodes
Improved devnet setup to generate deterministic node and guardian keys.

Devnet setup routine that configures a dynamic guardian set on Ethereum.

Configurable number of nodes in Tiltfile.
2020-08-19 14:24:38 +02:00
Leo 69d8125c67 ethereum: emit guardian set IDs in LogGuardianSetChanged
go-ethereum is having trouble parsing a log with structs.
2020-08-19 11:47:29 +02:00
Leo 8b34a3c534 ethereum: add getGuardianSet accessor 2020-08-18 16:19:28 +02:00
Leo 12873e5819 Add tooling to regenerate the Go ABI 2020-08-17 23:02:06 +02:00
Leo 7903402fa6 Deterministic hashes for ETH lockups
We're missing a nonce for truly unique hashes - for now, two
identical transfers will only be executed once.
2020-08-17 19:29:25 +02:00
Leo d049aa08e7 pkg/ethereum: fix watcher lifecycle 2020-08-17 14:56:22 +02:00
Leo 28fef7efca bridge: make sure the process crashes if we can't connect to any bootstrap peers
Supervisor rescheduling doesn't do the trick since the p2p socket doesn't clean up reliably.
2020-08-16 15:02:11 +02:00
Hendrik Hofstadt 9a4e1f396d Track confirmations in watcher 2020-08-06 19:14:31 +02:00
Hendrik Hofstadt b6c85217b6 Add ETH tracking 2020-08-06 15:43:45 +02:00