Commit Graph

102 Commits

Author SHA1 Message Date
Leo 1686b35587 node/pkg/ethereum: remove emitGuardianSet flag
Change-Id: Ic275220080d29b5a834f6487502619df877059c9
2021-07-28 16:34:24 +00:00
Leo 863e0e69ec node/pkg/ethereum: configurable chain ID and name
Fixes wormhole/issues#247

Change-Id: Ieb792b73970603283e4ffc4a8b9217c85964fb9f
2021-07-28 16:34:24 +00:00
Leopold Schabel 933442ac8a node: create valid key file when an empty description is provided
Fixes certusone/wormhole#257

Change-Id: If0d9883513f4908cdd8303f24a999d1d612fad30
2021-07-27 12:40:46 +00:00
Leo a191017d22 node: add "admin list-nodes" command
Change-Id: Idbcfb449be300e0dc7f4a655b3f1fc455e4d8158
2021-07-22 15:11:35 +02:00
Leo 4fdfbcdea4 node: expose publicrpc service in admin socket
This makes the publicrpc service available to the admin CLI
regardless of whether the publicrpc socket is enabled on the node.

Change-Id: If0265f3cd14af44a7f8e9726af796f8879dd7a4b
2021-07-22 13:31:46 +02:00
Leo 54b2e51379 publicrpc: move runnable to cmd/guardiand
This matches the adminrpc implementation, removing the runnable
and socket listener from pkg/publicrpc API surface.

Change-Id: Ia6461c2ff839f39462391c5afd2694b1619b30b6
2021-07-22 13:26:19 +02:00
Leo e58730168d node: add no-op required dataDir flag
Change-Id: I8090550bbfb26686dcc5f30c3c3dcd66aae8ec10
2021-07-21 19:52:51 +00:00
Leo abe95522b1 node: remove terra fee payer argument
Forgot this when cleaning up the Terra submitter

Change-Id: Ied5af6570decf68e5e29c0d793da5e02509a2245
2021-07-21 18:41:42 +02:00
Leo af31436915 node: remove VAA submission and channel
Change-Id: Iae82b6353852dc052a7e220f483e5557a0f157c4
2021-07-20 23:17:47 +02:00
Leo 584bfcba2d node: remove terra fee payer
Change-Id: Iffdf5a790fd546b9b43137ee03018da3d94d3ac8
2021-07-20 23:17:47 +02:00
Leo d509693367 node: remove Solana VAA submitter and agent connection
Change-Id: I6201b00f3cbf9f0fee0cc14ce8fdc8ca8583ce97
2021-07-20 23:17:47 +02:00
Leo 772922c9a6 node: remove terraEnabled flag
Terra is now always enabled

Change-Id: I2a898dd1a5027d1981cc4c65a65d14bd7c0f9fb0
2021-07-20 23:17:46 +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 79d846eed1 Update guardian software chain watcher and VAA submitter
Change-Id: I10c05c57e934662ff005e6b50067195502d23c0f
2021-06-29 13:55:44 +02:00
Leo c1d0f165d6 Merge branch 'main' into dev.v2
# Conflicts:
#	bridge/pkg/solana/submitter.go

Change-Id: I45b6e8f398b879915793987c5db38c839e8d1cc9
2021-06-22 18:54:15 +02:00
Leo 79cc6a9f46 bridge: allow specifying skip_preflight in debug VAA submission
This allows forcibly submitting a failing VAA on-chain in cases where
the preflight check would hinder debugging.

It does not change behavior of guardiand.

Co-authored-by: Hendrik Hofstadt <hendrik@nexantic.com>
Change-Id: I63df22049ad27f659dc0638190edd20628b7a338
2021-05-31 13:33:43 +00:00
Leo a2ff5ca73c bridge/debug: add post-vaa-solana command
Co-authored-by: Hendrik Hofstadt <hendrik@nexantic.com>
Change-Id: I482487f39eae1a3aebd1c7fdbe10e5b9c2dd44ad
2021-05-31 13:33:36 +00:00
Leo 45639b18fb bridge/pkg/solana: fix package name and remove unused lockChan
Increase VAA submission timeout.
Change-Id: I5e774f2930e2f0d865d733eee2f0bb01da1b82f3
2021-05-31 13:33:32 +00:00
Leo b04dd1cc2f bridge/debug: refactor
Move the debug command out of vaa.go in preparation for adding
additional comments.
Change-Id: Id387eace5d488952331f5d7f16c43b235676df24
2021-05-31 13:27:34 +00:00
jschuldt 16157d339d Add publicrpc endpoint for external clients.
- Distribute raw heartbeats via new proto package publicrpc

- Manage channel subscription on client req/close.

- Expose publicprc endpoint in devnet Service.

Change-Id: Ic96d624733961aa56e00b03c3b5cff6af11523a4
2021-05-24 13:38:58 -05:00
Hendrik Hofstadt 9f514e2786 rename ChainLock to MessagePublication
Change-Id: If74e74c00957c202c7de1cc61204b6cc12ad3a8a
2021-04-19 14:27:06 +02:00
Leo a0633645cb bridge: delete vaa-test commands
These no longer compile, and using a manual process to generate test
fixtures is not ideal anyway.

Change-Id: Ic1f378f330699909a403ba429a527c825fd0fba9
2021-04-17 14:59:24 +00:00
Leo 9c1d6ee00c bridge: add network heights and guardian address to heartbeat message 2021-02-10 01:57:54 +01:00
Leo 04e3ad772a bridge: add "debug decode-vaa" 2021-02-04 11:48:31 +01:00
Yuriy Savchenko f36ecc34f7
Terra support enabled in production mode (#173)
* Terra support enabled in production mode
2021-02-04 11:26:01 +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 5256d2025a bridge: refuse to use deterministic keys in production 2021-01-29 12:40:55 +01:00
Leo 6d555789d6 Add version stamp to binary and include in heartbeat 2021-01-28 21:46:09 +01:00
Leo ff298ffac6 bridge: fix one more Terra typo 2021-01-27 14:52:32 +01:00
Leo c5b59ac6a0 bridge: fix terraChainID typo
I share the blame for missing this during review :P
2021-01-27 01:58:18 +01:00
Leo 14441680d0 bridge: add initial set of basic Prometheus metrics 2021-01-25 20:17:58 +01:00
Hendrik Hofstadt fd6c54de83
bridge/pkg/solana: use polling GetProgramAccounts watcher (#156)
This mitigates https://github.com/solana-labs/solana/issues/9909 by
polling GetProgramAccounts with a server-side filter. It also removes
the agent dependency for the lockup observation logic - the agent is now
used for transaction construction only.
2021-01-21 11:31:32 +01:00
Leo c0eef2fe9b adminGuardianSetUpdateToVAA: check for duplicate guardian keys
Sanity check.
2021-01-21 00:25:38 +01:00
Leo ea21b1782f Explicitly document required command line arguments
Cobra does not support automatic documentation of positional arguments
(see https://github.com/spf13/cobra/issues/378).
2021-01-21 00:01:34 +01:00
Yuriy Savchenko 701154457c New tests and fixes in Terra Wormhole contracts
- added new descriptive errors in terra wormhole contract
- 0-expiration guardian sets error fixed
- added script for test VAAs generation
- added full test coverage for the VAA processing in the contract
- fixed cargo clippy/fmt warnings
2021-01-19 16:50:26 +01:00
Hendrik Hofstadt efa03ef73c
Implement upgradeability (#151)
* Implement contract upgrade VAA action

* naming and (╯°□°)╯︵ ┻━┻

* Carefully unflip table and replace broken cutlery ┬─┬ノ( ◕◡◕ ノ)

* fix and automate upgradeability

* document contract upgrade call

* Update comments

* Exhaustiveness check in VAA payload switch

* Fix typo

Co-authored-by: Leo <leo@certus.one>
2021-01-19 13:01:45 +01:00
Leo b077104086 bridge: log own peer ID at startup 2020-12-06 20:26:12 +01:00
Yuriy Savchenko cc412605c7
Terra key moved out from env variable, VAA submission on Terra made async (#129)
* Terra fee payer key moved from environment variable into the separate file

* Removed closed issues from the comments, VAA submition made async

* Review comments fixed
2020-11-30 19:24:39 +01:00
Leo 106fecca00 bridge: always gate Terra features on the main feature flag 2020-11-30 17:13:48 +01:00
Leo 120dfab49e bridge: type alias for readiness components 2020-11-29 17:07:15 +01:00
Leo c31777d1b3 e2e: add bidirectional end-to-end tests 2020-11-29 17:07:15 +01:00
Leo 561852d499 bridge: simple readiness check 2020-11-29 17:07:15 +01:00
Leopold Schabel 8306a83833
solana/agent: listen on UNIX socket (#122)
This allows us to use UNIX filesystem permissions for access control.

Previously, any process in the network namespace could connect to it,
which is insecure for obvious reasons.

Verified that correct permissions are set:

```
# ls -lisa /run/bridge/
total 8
31996269 4 drwxrwxrwx 2 root root 4096 Nov 23 21:58 .
14676759 4 drwxr-xr-x 1 root root 4096 Nov 23 21:58 ..
31996306 0 srwx------ 1 root root    0 Nov 23 21:58 agent.sock
```

Fixes #119
2020-11-24 09:48:44 +01:00
Leo 471417cd6e bridge: use GPG-armored binary protobufs for keys 2020-11-20 22:40:42 +01:00
Leo 0152a00114 all: rename LockupObservation to SignedObservation
We observe things other than lockups, account for it.
2020-11-20 22:35:00 +01:00
Leo 3e3e9dd651 bridge: fix typo in flag errors 2020-11-20 21:18:29 +01:00
Leo 66430cb5be bridge: implement guardian set update submission node admin service
Tested on a live devnet via `scripts/test-injection.sh 0`.

ghstack-source-id: 92489c2455
Pull Request resolved: https://github.com/certusone/wormhole/pull/104
2020-11-19 12:57:21 +01:00
Leo 7545d2b803 terra: disable in production mode
ghstack-source-id: c22885f121
Pull Request resolved: https://github.com/certusone/wormhole/pull/103
2020-11-19 12:57:21 +01:00
Leo 798ffec09c bridge: implement keygen command
Tested using `/guardiand keygen /bar --desc foobar`.

ghstack-source-id: 9f96ce7c0c
Pull Request resolved: https://github.com/certusone/wormhole/pull/91
2020-11-19 12:57:21 +01:00
Leo d9f8174d76 bridge: implement bridge key serialization
ghstack-source-id: f218021514
Pull Request resolved: https://github.com/certusone/wormhole/pull/90
2020-11-19 12:57:21 +01:00