Leo
d5e6c844e3
node/pkg/solana: add initial logic for block-by-block requests
...
CPI part is untested.
Commitment level is hardcoded to "finalized", but can be refactored
to use both "committed" and "finalized" later.
certusone/wormhole#248
Change-Id: I5ae7711c306b33650367e6f7a417ab9d88753612
2021-07-29 12:14:01 +00:00
Leo
b70466d185
node/pkg/solana: use gagliardetto/solana-go fork
...
This fork is up to date on latest Solana changes, while the dfuse
origin appears to be abandoned:
https://github.com/dfuse-io/solana-go/compare/master...gagliardetto:main
Change-Id: I5d2999ec7e26bd79a8302e2a5a6dddfd5e2bcbee
2021-07-28 16:34:24 +00:00
Leo
cf9ea6bfde
node: add Binance Smart Chain support
...
BSC is identical to Eth, so we can just re-use our Eth devnet.
Fixes certusone/wormhole#185
Change-Id: Ib96a71b5e5873d7cbd8f26dbb655049c6a64cef9
2021-07-28 16:34:24 +00:00
Leo
1686b35587
node/pkg/ethereum: remove emitGuardianSet flag
...
Change-Id: Ic275220080d29b5a834f6487502619df877059c9
2021-07-28 16:34:24 +00:00
Leo
f717262282
node/pkg/ethereum: rename lockup to message
...
Change-Id: I914d348940ac3f0c359a4d5175cbe5861e9fe1c2
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
514560f52c
node: use promauto to auto-register metrics
...
Fixes certusone/wormhole#188
Change-Id: I26c0e3f05993e44185b6ee2531b7673f7fbc0eb6
2021-07-26 13:01:55 +00:00
Leo
24b15bba9c
node: update Go dependencies and upgrade to Go 1.16.6
...
Accomplished by simply deleting go.mod and letting go mod tidy recreate
it. Manually bumped terra.go to include the typo I fixed in...January?
Nothing broke in any sort of obvious fashion.
Change-Id: I27ba4bc13a5a55bb6b8fa4fa1d3e83b899b6a294
2021-07-22 23:16:00 +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
a897166a0c
publicrpc: expose PublicrpcServer
...
This is necessary if we want to register the service
with an existing gRPC server, rather than a separate service.
Also renames PublicRawHeartbeatConnections to RawHeartbeatConns
for brevity and fixes some typos.
Change-Id: If508de0e2fa68738ba204c4aafa1159139c6d1f8
2021-07-22 13:18:22 +02:00
Leo
07106497f1
readiness: fix data race
...
Change-Id: If548f2b28d4ebaaa7d5a2127f684371fad6c2451
2021-07-21 19:52:51 +00:00
Leo
e58730168d
node: add no-op required dataDir flag
...
Change-Id: I8090550bbfb26686dcc5f30c3c3dcd66aae8ec10
2021-07-21 19:52:51 +00:00
Leo
052d922036
Clean up docs and packages for v2
...
Change-Id: I1020e648f4a8bd51412cf06196e78665308efdac
2021-07-21 19:46:10 +02:00
Leo
01564150db
e2e: remove
...
These were testing the token bridge and do not currently pass
(or even compile). We will bring back later some of the code.
Change-Id: I34e9ae5aa901c9b20572d1fc8d87a599fa49ad93
2021-07-21 19:02:55 +02: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
Hendrik Hofstadt
98810080cc
Fix readiness probe in guardian
...
Change-Id: Ia83ba29a7facf687d1765bf45fe012969a9835dc
2021-07-21 14:05:13 +00:00
Hendrik Hofstadt
9fbb8d76c9
Remove persistence remainders from the guardian
...
Change-Id: I1c4c02820c2e5c0aca0c07402b854ffebd5cff0b
2021-07-20 23:50:38 +02:00
Hendrik Hofstadt
c0228415f8
Fix devnet
...
Change-Id: I1d62e6323cc2169cce43581f9aeefb537bc84a76
2021-07-20 23:34:37 +02:00
Leo
4e9cc401cc
node: go mod tidy
...
Change-Id: Ia8f13037101457f51687fa98f2f1b4dc92097c4a
2021-07-20 23:17:47 +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
1b01c373c2
tools: specify build tag to remove IntelliJ error
...
Change-Id: Ieef26a1f13290e51ebb6da387c3fdfd47f77c6e5
2021-07-20 23:17:46 +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
bb446fb338
Double hashing in the guardian
...
Change-Id: Ieeb9d9c0e258cf63ae0ce1d7fd1215eef6f1ced2
2021-07-20 16:06:45 +00: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
0004dd6c2a
Reimplement terra bridge in guardian software
...
Change-Id: Ic57d0ae91355d2415f13657f463e8929212b1c97
2021-07-05 18:02:04 +00:00
Hendrik Hofstadt
d9fde6d7cc
Implement optional persistence in Solana wormhole
...
Also reformatted the token_bridge
Change-Id: I195d7e2e13295c8b28e2a0b63620e3d306dc07e6
2021-07-05 18:02:04 +00:00
Hendrik Hofstadt
b85cbacd3b
fix message attestation for Solana
...
Change-Id: Iaf79984980affe64f268c2eed9f61d5058cea0dd
2021-07-02 16:05:06 +00:00
Hendrik Hofstadt
3c5deee7ee
Fix devnet for new contracts
...
Change-Id: I5b7536884ce3d1bdf39a21a8b71b6a848ad0380f
2021-07-02 13:02:35 +02: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
Hendrik Hofstadt
02d7257ff5
Implement PostedMessage fetching in the client
...
Change-Id: I8b59cdbfaf37212e187257cf46674086ad96d19d
2021-06-18 18:50:06 +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
c7c94441a5
implement new Solana account parsing
...
Change-Id: I2f59dae3950b2f95e8c0578c4f56c460f7166d2e
2021-04-20 09:48:23 +00:00
Hendrik Hofstadt
844bd3d817
update VAA parsing and structure
...
Change-Id: Ifd712050645b1b3fad0f8bf5b2227c0fdf89df84
2021-04-19 14:27:06 +02:00
Hendrik Hofstadt
14c8606a8e
remove non-solana VAA submission
...
Change-Id: I42bb4d6f85a73f15f627d6b9279eccfeb1624664
2021-04-19 14:27:06 +02: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
Yuriy Savchenko
7a97381f18
Terra E2E tests fixed, asset registration refactoring
2021-03-23 16:19:41 +01:00
Yuriy Savchenko
f694fbdf0f
Removed contract activity killswitch, fee is now hardcoded, test scripts updated
2021-03-23 16:19:41 +01:00
Leopold Schabel
f5560eb3ff
Fix guardian set initialization race condition ( #191 )
...
Fixes #184
2021-03-23 14:07:47 +01:00
Leo
2cf4d50c23
bridge: add terra block height to heartbeats
2021-02-10 02:00:45 +01:00
Leo
9c1d6ee00c
bridge: add network heights and guardian address to heartbeat message
2021-02-10 01:57:54 +01:00
Leo
aacff406e4
bridge: build with race detector enabled
2021-02-10 01:57:54 +01:00
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
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
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
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
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
ff298ffac6
bridge: fix one more Terra typo
2021-01-27 14:52:32 +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
7201b64a77
bridge/e2e: fix panic in testSolanaToTerraLockup
2021-01-27 01:58:18 +01:00
Leo
a33505e0f9
bridge/e2e: group tests by chain
2021-01-27 01:58:18 +01:00
Leo
3282e9dbb9
bridge/e2e: increase timeouts for use with 19 validators
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
5679f67c85
bridge/e2e: fix nil panic in testEthereumLockup
2021-01-21 20:17:23 +01:00
Leo
fd4b61b736
bridge/e2e: increase Terra timeout to make it less flaky
2021-01-21 14:39:06 +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
Leo
b7c6eb7f3c
bridge: upgrade libp2p to v0.13.0
2021-01-21 12:51:19 +01:00
Leo
f563de8e31
bridge: upgrade all dependencies to latest patch releases
2021-01-21 12:51:19 +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
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
Leo
d0d00f4972
Fix crash when testSolanaLockup is executed for the first time
...
We forgot to initialize the big.Int.
2021-01-19 17:03:48 +01:00
Yuriy Savchenko
eeb560cb5c
Terra integration added to e2e tests
2021-01-19 16:50:26 +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
Leo
9f2f609bc1
Bump Go and pin all Docker images to digests
2021-01-19 16:15:54 +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
Leo
b077104086
bridge: log own peer ID at startup
2020-12-06 20:26:12 +01:00
Leo
594592e2f6
devnet: use wormhole namespace by default
2020-12-05 16:32:37 +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
Hendrik Hofstadt
bec598b41a
Fix subsidization and fees ( #127 )
...
* Revert "solana: partially revert #82 subsidization changes"
This reverts commit 2967653e
* fix subsidization
* fix deleted grpc tag dependency
* revert devnet changes
* verify system instruction action
* ┬─┬ノ(ಠ_ಠノ)
2020-11-30 11:09:08 +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