Leopold Schabel
b0a9e98648
Asynchronously fetch Terra block height ( #177 )
2021-02-05 15:16:31 +01:00
Yuriy Savchenko
8bf501879b
Added Terra node height monitoring ( #176 )
...
* Added Terra node height monitoring
2021-02-04 19:48:54 +01:00
Leo
966d0f0bc6
bridge/pkg/terra: add stub metrics
2021-02-04 14:20:49 +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
Leo
02c750bc7e
bridge: fix terra devnet retry
2021-02-02 12:35:17 +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
6d555789d6
Add version stamp to binary and include in heartbeat
2021-01-28 21:46:09 +01:00
Hendrik Hofstadt
2b30a30601
upgrade solana sdk version ( #166 )
...
* upgrade solana sdk version
Commitment levels were deprecated and the fastest confirmation level is `Processed`.
Also the upgradeable loader now requires the program to be writeable.
* Add deprecation comment
* update agent commitment level
2021-01-28 17:44:54 +01:00
Leo
b23f43ed1e
bridge: add metrics for ethereum, p2p and solana
2021-01-27 14:46:01 +01:00
Leo
bc356a5e51
bridge: count misses for settled VAAs
2021-01-27 01:58:18 +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
3449ca4d6e
bridge: retry Terra devnet submission
...
This fixes an e2e test race condition.
2021-01-25 20:18:00 +01:00
Leo
c48c198188
bridge: always sign lockups and store gs in aggregation state
...
This fixes #160 by making sure that nodes will sign *any*
lockup they see using their guardian key, and storing
the gs in the aggregation state when we see a lockup.
2021-01-25 20:18:00 +01:00
Leo
14441680d0
bridge: add initial set of basic Prometheus metrics
2021-01-25 20:17:58 +01:00
Leo
76cb95c51b
bridge/pkg/processor: ignore observations while waiting for guardian set fetch
...
Fixes crash https://gist.github.com/leoluk/17d77fef7c0fd44dd6c3fe3e65bb23a7 .
2021-01-21 14:25:27 +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
108f050c0e
Clarify public keys vs public key's hashes in comments and docs
2021-01-21 00:59:50 +01:00
Leo
cc1e4d0bdc
bridge: remove mentions of lockup observations
...
We now support different kinds of observed events, not just lockups.
Change the log messages and comments accordingly.
2021-01-21 00:35:52 +01:00
Leo
562eaf5ce7
Log aggregation state of incomplete VAAs
2021-01-21 00:28:15 +01:00
Yuriy Savchenko
eeb560cb5c
Terra integration added to e2e tests
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
ad5950ffe7
Make it official that we support exactly 19 validators
...
Fixes #86
2021-01-11 15:07:28 +01:00
Leo
770393b94e
bridge: rename misleading "pending" counter
...
It includes completed transactions that haven't been timed out yet.
2020-12-08 11:12:11 +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
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
540fbbb31b
Clarify that we do not automatically rate limit spammy guardians
2020-11-27 19:08:13 +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
0152a00114
all: rename LockupObservation to SignedObservation
...
We observe things other than lockups, account for it.
2020-11-20 22:35:00 +01:00
Yuriy Savchenko
ee5d07c929
Fixes to VAA submission to Terra smart contract ( #115 )
...
* Terra smart contract binary interface changed from vector to base64 string
* Added initial guardian set submission to Terra
2020-11-19 20:05:05 +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: 93f287efc09be7eb12921a431effb282aea78510
Pull Request resolved: https://github.com/certusone/wormhole/pull/109
2020-11-19 12:57:21 +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: 92489c2455e677433414dfa66c6917a577e4c4a5
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: c22885f1219fe9a0cb2a84983743c0c198366660
Pull Request resolved: https://github.com/certusone/wormhole/pull/103
2020-11-19 12:57:21 +01:00
Leo
5f8ca60ab1
bridge: refactor out broadcastSignature to prepare for injection path
...
ghstack-source-id: e3b8aee5a055bdd4b2492de5204ac7cffb6d24da
Pull Request resolved: https://github.com/certusone/wormhole/pull/102
2020-11-19 12:57:21 +01:00
Yuriy Savchenko
84600ad9f5
terra: include block timestamp in VAAs ( #94 )
...
Fixes #93
2020-11-18 19:16:29 +01:00
Leo
bbf479871f
pkg/devnet: split up deterministic key generation functions
...
Only moved code, no functional changes.
2020-11-18 14:30:25 +01:00
Leo
7d617095e2
terra: fix watcher ws argument
2020-11-16 16:59:58 +01:00
Leo
f072e8c36a
Clean up some style nits.
2020-11-16 13:34:19 +01:00
Yuriy Savchenko
1ca2e29916
Terra support added ( #79 )
...
This commit adds initial support for the Terra blockchain.
2020-11-16 13:28:07 +01:00
Leo
aed8f6637c
Remove outdated TODO comments
2020-11-13 11:44:09 +01:00
Leo
58ba151013
bridge/pkg/p2p: actually increment counter
2020-11-06 12:50:54 +01:00
Leo
2df0fe50c0
bridge/pkg/p2p: clarify comment
2020-11-06 12:48:12 +01:00
Leo
47ce567498
bridge: promote heartbeat messages to logger.Debug
2020-10-29 15:51:45 +01:00
Leo
9f75d19d11
bridge: implement aggregation timeouts and retransmissions
...
Fixes #21
ghstack-source-id: a89630d9e3
Pull Request resolved: https://github.com/certusone/wormhole/pull/72
2020-10-29 10:14:12 +01:00
Leo
a853317421
bridge: refactor out devnetVAASubmission in observation.go
...
ghstack-source-id: 93e811b135
Pull Request resolved: https://github.com/certusone/wormhole/pull/71
2020-10-29 10:14:12 +01:00
Leo
aa33dc4565
bridge: split up processor.go
...
No code changes except for `break` -> `return`.
ghstack-source-id: ed7784c590
Pull Request resolved: https://github.com/certusone/wormhole/pull/70
2020-10-29 10:13:14 +01:00
Leo
6c7ca964e4
Remove outdated TODO comments
...
- Metrics tracked in #11 .
- Timeout and retransmits covered in #21 .
- Dependency injection doesn't make sense at this scale.
- `-1` on `GenerateKeyPair` means "this doesn't make sense for Ed25519,
please crash if anyone ever tried to generate RSA keys".
ghstack-source-id: 895162835186df360bcc526a5fb904b1567b5da9
Pull Request resolved: https://github.com/certusone/wormhole/pull/66
2020-10-28 22:47:12 +01:00