Commit Graph

268 Commits

Author SHA1 Message Date
Leo 63b77714ec proto: add strict linting and fix up existing protos
Passing the strict lint checks requires a number of backwards-
incompatible changes:

- Rename the NodePrivileged service to NodePrivilegedService.
  This is only used in CLI tooling, which are upgraded at the same
  time as the server binary.

- The Publicrpc service was renamed to PublicRPCService.

- The EmitterChain type is renamed to ChainID.

- The default value for the ChainID type is renamed to
  CHAIN_ID_UNSPECIFIED. This value wasn't referenced anywhere.

- The response and request types for GetLastHeartbeats were updated
  to match the rpc method name.

Change-Id: I3954130d3b25ab1f859390407bba3d3c02ffe03c
2021-08-25 14:26:33 +00:00
Leo aeb673a164 Add presubmit CI test that runs "tilt ci"
- Use "npm ci" instead of "npm install" in a couple of places.

- Migrate generate-wasm.sh to a Dockerfile so it can be cached.

- Disable namespace creation and explorer build in CI.

Change-Id: I2e6ee806438863ca81ada701e14684f9f4cc0a76
2021-08-24 17:08:36 +02:00
justinschuldt cf980cf290 devnet Guardian fix
Change-Id: I8fbcc60295e42e9bcc947d9e047cde760515785c
2021-08-24 13:10:46 +00:00
justinschuldt d3acd39c71 Add grpc-web dependency to bridge
Change-Id: Ib659e2207e9235c34ecfa5b9d4fcda1ead959e4f
2021-08-23 15:15:10 -05:00
justinschuldt 44cb47c2d8 Write attestation events to BigTable
Change-Id: I90fd86ff83a2e963ca306b7189528b415f5511d2
2021-08-23 09:54:28 -05:00
Leo 3ec4ad6ad3 node: remove raw heartbeat stream
As discussed with Justin, we no longer need this endpoint.

Removing it means we no longer have to worry about
long-lived connections.

Change-Id: I75020652d383a6b5f79a3cad1b52ae87d323f012
2021-08-23 10:51:09 +00:00
Leo dc94553751 node/cmd: add support for systemd listener sockets
This enables zero-downtime restarts for --publicWeb

Change-Id: I074ff91bebb456bd5d21b4facbb76ecd1fb1fad4
2021-08-23 10:51:09 +00:00
Leo 739e0f2bb9 node/pkg/ethereum: fetch guardian set at startup
Rather than waiting 15s for the timer to tick, request the
guardian set immediately at startup.

This has the added advantage of being able to crash the
runnable if the guardian set can't be fetched initially.

Change-Id: Ib4cb476c05e92ecd06496043d248eb3ca25b8065
2021-08-23 10:51:09 +00:00
Leo 369a18a21c node/cmd: gRPC logging and metrics
Change-Id: Ie2fb7bb7244bd7d786867ad456f4a9531f81f879
2021-08-23 10:51:09 +00:00
Leo a35604f811 node/cmd: rename publicREST to publicWeb
Should be early enough to make this backwards-incompatible change.

Change-Id: I5ef119e286cac48839c7e20acd7b5efd0513ac78
2021-08-23 10:51:09 +00:00
Leo a587316e7d node/cmd: add support for grpcweb and tls auto-provisioning
Change-Id: I41d76216fe4095772740e127adb0d62b05964d94
2021-08-23 10:51:09 +00:00
Evan Gray d09abac78f devnet: fix eth addresses
Change-Id: I83bd59f35b65e87b14183410e49dd9aca6c62c85
2021-08-19 17:06:18 +00:00
Leo 9d22d89f7f node/pkg/p2p: demote invalid signed heartbeat errors to debug level
This is a normal occurrence with people bringing up additional
nodes for testing purposes.

Change-Id: If333656333cf1da80b2c16f597c90a55a5a5153b
2021-08-13 11:18:58 +00:00
Leo 29939502cc node/cmd: add "do not parse" notice
Change-Id: I5af53cbb306b0d8cfd9c8c262feb71ececb68fcb
2021-08-13 11:18:58 +00:00
Leo 9a030b310f node/cmd: add contract addresses and error count to list-nodes
Change-Id: I5ec7ac13a59a51da1b5a56aef8ce5cca1ca5a5e4
2021-08-13 11:18:51 +00:00
Leo 3f81840e69 node/pkg/p2p: use mutex for error counters
Change-Id: Idde862e034c567b7ac2d5648bec0b3505f032b0c
2021-08-10 18:47:50 +02:00
Leo 212e04a72d node/pkg/ethereum: poll for guardian set changes
The new set of Eth contracts no longer emits an event.

Change-Id: I6c3654c88960b08b5548ed72cf09e555b079ef3a
2021-08-10 17:39:10 +02:00
Leo 08e70a5aaf node/cmd: list missing guardians in list-nodes
Change-Id: I12e2aacbeb37c0bae5ad1e796e009a1c7b2312e1
2021-08-10 17:35:33 +02:00
Leo e9491d25f8 node/pkg/publicrpc: add GetCurrentGuardianSet RPC call
This is required for network explorers to know about missing guardians
(the GetLastHeartbeats call won't contain those nodes at all).

Change-Id: I28d8621023d79e6fa94c40f36a239c34aa12f1b0
2021-08-10 17:35:33 +02:00
Leo 67793cd144 node/pkg/p2p: add per-chain error counters
Change-Id: I47700ccb2dc93aefefa8ab6b6f0659f30912e142
2021-08-10 13:24:43 +00:00
justinschuldt 6126cfaf40 SignedObservation validation log message
Change-Id: I372f2ee703b5cc82a6a7e1f4df031357304b174b
2021-08-09 17:38:19 -05:00
Leo 8718e31fb4 node/pkg/p2p: remove support for plain heartbeats
Change-Id: I621467615c2a46ab08ecae6227021b1e4efc1196
2021-08-09 13:16:55 +00:00
Leo 73b0fce440 node/pkg/p2p: add metric for guardian network heights
Change-Id: Ie09d203d316a448dba5d4ac9269113467e2da78e
2021-08-09 13:16:55 +00:00
Leo 61a90136ca proto: add boot_timestamp to Heartbeat
Allows for precise uptime calculation.

Change-Id: I57d022ec10a56df57a4a1f79ae892eb8899f7154
2021-08-09 13:16:55 +00:00
Leo c7662d611e node: store heartbeats for multiple nodes per guardian
It's safe to break the proto API at this point.

Change-Id: I235100c5fef3abc9259d28f68d9bb7bf2be0ae5e
2021-08-09 13:16:55 +00:00
Leo e46d70bbe2 node/pkg/readiness: be even more explicit about readyz
RTFM!

Change-Id: I6f4eefb8f6d22fcd620b24658b3c2cfd0b48c949
2021-08-09 13:16:55 +00:00
Leo 61dd1c1052 node/cmd: unary list-nodes call with details
Change-Id: I9953b45d92461887b075b3456bdd9e161eefd263
2021-08-09 13:16:55 +00:00
Leo 336f373bb5 node/pkg/p2p: store own heartbeat in GuardianSetState
Change-Id: I6b9ab2ce267161d20c17d5d528fd7741c2eb48b4
2021-08-09 13:16:55 +00:00
Leo 3dcf1f1998 node/pkg/common: add GetAll accessor for GuardianSetState
Change-Id: I7ce71d356f9fc83cc751e98835cbae070deb8640
2021-08-09 13:16:55 +00:00
Leo aa608b9396 node/cmd: rename list-nodes to list-nodes-stream
Change-Id: I07df1c0bb7634f6a9f65db150d353e30a681d2bc
2021-08-09 13:16:55 +00:00
Evan Gray 017af5534b bridge: fix default statusAddr
Change-Id: Ief8d3e8a5dd140c239485b5e229ef7448451b8c7
2021-08-07 19:31:40 +00:00
Leo 8cee72ba9c node: add disableHeartbeatVerify flag
During network boot, the guardian set is empty and we temporarily
need this flag to figure out everyone's status.

Change-Id: I8ba23848310837080ae845d55ece5d3818181b98
2021-08-06 15:14:17 +00:00
Chanwoo Lee 95c752247b fix --statusAddr not working
Closes https://github.com/certusone/wormhole/pull/298

Change-Id: Id89fa57e9d05739980696de79cf8887e407a6567
2021-08-06 15:14:07 +00:00
jschuldt 9e16baa040 Devnet arguments for BigTable connection.
Change-Id: Idc893dc87739d1b309ffefcc67d98641f4bccd9a
2021-08-05 12:53:56 +00:00
Leo 82731c22c0 node: add GetLastHeartbeats RPC call
This aggregates verified guardian heartbeats server-side so they
can be fetched via unary calls.

Change-Id: I8458b139bb5d75f87ed700b50684a5ff8ca594fa
2021-08-04 14:26:26 +00:00
Leo b77d408235 node/pkg/ethereum: readiness status for bsc
Bug: certusone/wormhole#292
Change-Id: Ibb176dc70beeb2c00c7faf7d85395e93d53e9e4c
2021-08-02 14:30:29 +02:00
Leo 855be15ab8 node: refuse to run as root
While it works, it's not good operational practice, particularly when
running guardiand alongside other services like a Solana node.

Even inside a container, it's best to run as non-root.

Change-Id: I331533ef37eaab6e73f6759d7eb779bbda849384
2021-08-02 13:26:57 +02:00
Leo 3af233e3eb node: add GuardianSetState and verify heartbeat signature
Bug: certusone/wormhole#267
Change-Id: Ica8015fbbd52506d800670d933051f410bb1caa7
2021-07-31 19:02:09 +02:00
Leo 08a8f390ca node/pkg/version: panic on empty version
Change-Id: I72207193e459122596f9731b36f45f619ccdad6c
2021-07-31 17:15:51 +02:00
Leo fddbb0c2a4 node: remove outdated TODOs
Change-Id: I05c2e2599e081fb439fd186ee853c0b7ca508969
2021-07-31 16:32:54 +02:00
Leo 2ebf473531 node: introduce SignedHeartbeat
Bug: certusone/wormhole#267
Change-Id: Ia34fa053240d7b340287cc4cc1e15556d3ff2893
2021-07-31 16:21:38 +02:00
Leo 723cf5fe95 node: add GetSignedVAA endpoint
Works:

$ curl 'http://localhost:7071/v1/signed_vaa/1/1268b2bf4a[...]/0'
{"vaaBytes":"AQAAAAABACbK50nrmgWPtTmRlYf/[...]"}

Bug: certusone/wormhole#282
Change-Id: I09eade00c4649c550f06a2efe350d6d9ff9da3ae
2021-07-31 03:03:37 +02:00
Leo 8da1eaa6b1 node: add REST proxy for publicRPC service
Bug: certusone/wormhole#282
Change-Id: I2aebd60b8839c59705ad1ab3425462ccaefc7e13
2021-07-31 03:03:37 +02:00
Leo 9c9c48ef3b Migrate proto generation to buf
Bug: certusone/wormhole#282
Change-Id: Ib20d8b9bcf19a26b12a586532281d83e95f0653e
2021-07-31 03:03:36 +02:00
Leo 7e0bbdbe6e node/pkg/db: store signed VAAs in database
Bug: certusone/wormhole#282
Change-Id: Iecd4ff74a1e73655ac3240991a4dc36e572cdb15
2021-07-31 03:03:35 +02:00
Leo b2495ca43e node/pkg/solana: fix solanaConnectionErrors panic
Change-Id: I75889897e47902abe54cc45153934e73f1f3dcd4
2021-07-30 22:46:20 +02:00
Leo d37375e9a3 node/pkg/solana: simplify client method signatures
Change-Id: Ic317c78d7415dc11baf39d696ebdd57336b219bc
2021-07-30 09:06:25 +00:00
Leo 493b7ee855 node/pkg/solana: filter by requested consistency level
certusone/wormhole#248

Change-Id: Ib40b6016bda19e17c4700db6b39dbf340dfc0f4c
2021-07-29 15:55:57 +00:00
Leo 5bfa3b0055 node/pkg/solana: run one Solana watcher per consistency level
certusone/wormhole#248

Change-Id: I98abc6b4e635b8b5679fcda5342c90b0e5c96077
2021-07-29 14:27:04 +00:00
Leo b9633d6d65 node/pkg/solana: fork solana-go to add GetConfirmedTransactionWithOpts
certusone/wormhole#248

Change-Id: I093d619cb82b35b963447cf4a5dc18ef6be1a0f5
2021-07-29 14:14:09 +02:00