Commit Graph

130 Commits

Author SHA1 Message Date
bruce-riley d04328b858
Celo testnet support (#1051)
* Initial Celo support

Change-Id: Iee98ee29a8b09af9ca76945792b750d96a170702

* Watcher support

* Fix high level make file

* Remove node binary committed by mistake

* Port change from EthWatcher to CeloWatcher

* Use docker to build ABIs

* Refactor watcher to eliminate massive redunancy

* Fix lint-and-tests to handle multiple defs on link

* Minor code cleanup

* Celo should use ganache in devnet

* Prep for mainnet deploy

* Code review rework

* Remove celo from sdk package.json
2022-04-28 12:20:38 -04:00
bruce-riley 87b36399d3
Add safe mode check (#1108)
Change-Id: Ida10e1ab0c056b4ed1ce2317800235843763a7ac
2022-04-26 07:51:10 -05:00
Csongor Kiss 0f6c1e2d98 Allow specifying the timestamp in governance inject
The 'timestamp' field is now allowed in a governance prototxt, which
applies to all the messages in the struct. If the timestamp is not
specified, then it defaults to 0, which is identical to the existing
behaviour.
2022-04-19 17:52:05 +01:00
Jonathan Claudius b18a6c8c2f
Fix segfault from empty GetSignedVAARequest (#1069) 2022-04-11 19:16:59 -04:00
Jonathan Claudius bad4f7061b
Adds unit-tests and functional improvements to guardian signature verification (#1068)
* Add more comprehensive structs unit-tests

* Make VerifySignatures fail on duplicate addresses

* Adjust duplicate detection to guard on signatures instead of addresses

* Add monotonic check in VerifySignatures

* Move logic into VerifySignatures and add more test cases

* Add a paranoid check for duplicate signers

* Make VerifySignatures unit-tests less contrived

* Add more verify signature test cases

* Refactor VerifySignatures tests

* Add VerifySignature fuzz tests

* Add tc.result checking instead of hardcoded true

* Change comparison so it throws debug on failure for fuzz tests

* Add unit-tests for observation signature logic

* Fix comment typos

* Refactor observation tests

* Add missing test case

* Fix VAAInvalidSignatures test case label

* Clean up unit-tests for observation and structs

* Change errorString convention in test

* Format Signature Verification Test Cases

* Remove unnecessary casting

* Add multi-signer same key cases

* Fix err usage in test cases

* Remove duplicate getVAA
2022-04-11 19:14:41 -04:00
Leopold Schabel 1fd6e14885 node/pkg/ethereum: fix unreachable nil check
The program would've crashed on `l.Address` before it
could reach the nilness check.

commit-id:17b64899
2022-04-11 17:10:14 -04:00
Leopold Schabel 97aedff9f0
node/pkg/ethereum: restart watcher if guardian set update fails (#1010) 2022-04-11 21:07:19 +02:00
Jonathan Claudius 36cabf0e6a
Remove dead code path (#1056) 2022-04-08 19:37:23 -04:00
bruce-riley 879670c0e5
Klaytn testnet support (#1038)
* Klaytn support for testnet

Change-Id: Id0647fd6c603ab298f860c2cae20481555467315

* token_bridge client changes

Change-Id: If49ba994a67041044bdec054f19e69b4cfc2785b

* Get rid of special handling

* More cleanup

* Need to add Klaytn to structs tests

* Update SDK version

* Add SDK version

* fix klaytn bridge chain id

Co-authored-by: Evan Gray <battledingo@gmail.com>
2022-04-04 18:11:03 -04:00
bruce-riley eb898b0555
Aurora and Fantom handled wrong in a couple cases in guardian (#1044)
* Aurora and Fantom handled wrong in a couple cases

Change-Id: I09b7d2da46507e219bd99d945256e63fefad529c

* Original test covered upper / lower case

Change-Id: I0384b0aac6f63bf9782d393fcd4e4e67f353775a
2022-04-04 15:08:16 -04:00
Jonathan Claudius b7ec3ac0d3
Add unit-tests for nodekey (#1035)
* Add unit-tests for nodekey

* Move to deferred file clean up
2022-03-30 09:41:27 -04:00
Jonathan Claudius 5e00027a18
Add unit-tests for registry (#1026)
* Add unit-tests for registry

* Tweaks to registry unit-tests

* Remove duplicate unit-test

* Remove duplicate test case
2022-03-30 09:38:37 -04:00
Jonathan Claudius 3ceec1833f
Add more comprehensive structs unit-tests (#1006)
* Add more comprehensive structs unit-tests

* Abstract the vaa generation test logic
2022-03-29 12:24:56 -04:00
Jonathan Claudius 5921150f93
Add unit-test for ethereum utils (#1022) 2022-03-29 12:24:16 -04:00
Jonathan Claudius a709d6f283
Add unit-tests for deterministic devnet keys (#1032)
* Add unit-tests for deterministic devnet keys

* Extend unit-tests to do full deterministic key checks
2022-03-28 10:43:37 -04:00
Jonathan Claudius 5355f87206
Add unit test for 0 case and move to testify (#1023) 2022-03-28 09:54:18 -04:00
Jonathan Claudius b7a95484f9
Refactor Symmetric Unit-tests to Testify (#948)
* Refactor Symmetric Unit-tests to Testify

* Isolate tests for more durability

* Remove duplicate test case
2022-03-25 16:17:33 -04:00
justinschuldt b73ebd1b9c fix digest string represenation
commit-id:617ade15
2022-03-18 10:49:34 -05:00
justinschuldt d2dcb57e61 send guardian set data to prometheus
commit-id:87ec83e0
2022-03-18 10:49:34 -05:00
bruce-riley b718225e45
Testnet support for Aurora (#947)
* Testnet support

* Upgrade contract for 1conf

* Formatting changes

Change-Id: Id06481d77d770a04eb200aadb82574e23cddcd36
2022-03-15 10:41:10 -04:00
Jonathan Claudius fa237c7bb4
Add some unit-test coverage for GuardianSet (#951)
* Add some unit-test coverage for GuardianSet

* Remove mu check to fix CI run

* Remove unnecessary copy paste
2022-03-11 11:31:10 -05:00
claudijd ff62a2c7f4 Add unit-tests for payloads 2022-03-09 20:58:04 -05:00
Jonathan Claudius 991f8fdb4b
Add struct tests2 (#978)
* Add unit-tests for structs

* Remote commented imports

* Add tweaks per review feedback
2022-03-09 19:40:36 -05:00
Leo 011987867a pkg/ethereum: check receipt status code
commit-id:0b2539be
2022-03-07 17:53:42 -05:00
bruce-riley d1da11785f
Karura and Acala support (#862)
* Karura and Acala support

Change-Id: I74c88b9b7a220e419e31a11cf77931343c9a8159

* env files got dropped

Change-Id: If330887782a4e38f3419dff2efcc100a5949d3f2

* Updates for latest parameters

Change-Id: Ie25f377f6d70dfb7d4b28efabd4064088e001c0a
2022-03-03 16:40:32 -05:00
Leopold Schabel d40a70a37f
node/pkg/ethereum: log blockhash for new message publications (#910) 2022-03-03 21:31:15 +01:00
Leopold Schabel 3e51512aec
node/pkg/common: fix guardian set state cleanup (#891) 2022-03-03 21:18:41 +01:00
Hendrik Hofstadt 4bc5daa8d1
Hardening against governance message spoofing (#938) 2022-03-03 17:55:02 +01:00
Jonathan Claudius d47089741c
Add unit-test for governance (#867)
* Add unit-test for governance

* Gofmt governance_test.go

* Use structs for testing governance VAA

Co-authored-by: claudijd <jclaudius@jumptrading.com>
2022-02-21 17:23:34 -05:00
Leo 8bf1176401 node/pkg/common: add list of known mainnet emitters
commit-id:f4d2389f
2022-02-15 16:47:20 -05:00
Leo 93ee5f3d31 node: remove duplicated public RPC node definitions
commit-id:452deba7
2022-02-15 16:47:20 -05:00
Jeff Schroeder b54b7e1183 node: add fantom support
Only run in testnet until the contracts are deployed to mainnet.
2022-02-15 13:51:11 -05:00
Evan Gray 9ed71c0038 node: terra reobservation 2022-02-12 15:03:32 +01:00
Leo c28b492e03 node: add reobservation requests for Eth chains
commit-id:e4fa6adf
2022-02-12 01:06:06 +01:00
Leo 8f63e123a5 node/pkg/ethereum: add MessageEventsForTransaction
This retrieves a single transaction's MessagePublication events. This
has the same security assumptions than listening to the log events -
namely, ensuring the right contract has emitted them.

Tested locally with a mainnet transaction.

commit-id:64347ecc
2022-02-12 01:06:06 +01:00
Leo 6c02299f2b node/pkg/solana: skip failed transactions
Avoid unnecessary RPC calls/retries.

Makes no difference for safety, which relies on VAA accounts rather than
any transaction metadata.

commit-id:0cd82ed4
2022-02-08 12:41:48 +01:00
Leo 95fea79276 node/pkg/db: add db.VaaIDFromString and vaa.StringToAddress helpers
commit-id:1fb9f998
2022-02-08 12:41:10 +01:00
justinschuldt 763c62b73e supply credentials file to PubSub
commit-id:563f6718
2022-02-01 10:32:58 +01:00
Leo f200a6bd23 node/pkg/solana: fix context memory leak
commit-id:69632fa8
2022-01-27 12:43:03 +01:00
Leo f829195ea5 node/pkg/solana: kill recovery feature
This is no longer needed with SignedObservationRequest.

commit-id:9a3fbf4e
2022-01-26 13:00:23 +01:00
Leo 73a5b72857 node: implement observation requests via gossip
Limitations:

- Only supported for Solana and for confirmation level Finalized,
  which the token/NFT bridges use. Need to take a close look before
  enabling it for both (since we're bypassing the tx fetcher and would
  fetch and process accounts of the "wrong" confirmation levels).

- Rate limiting not implemented yet, will be done in a future release
  when things are not currently on fire.

Test: https://gist.github.com/leoluk/bab3a18e922057109facea1cf1f26b2f

commit-id:6a0d4c32
2022-01-26 13:00:23 +01:00
justinschuldt 79f489bd28 code review update
commit-id:55c28b21
2022-01-26 12:16:16 +01:00
justinschuldt 054d800f19 improve logging around GCP PubSub message path
commit-id:04012992
2022-01-26 12:16:16 +01:00
Leo 07c599ab68 node/pkg/telemetry: reduce log level to INFO
It appears that GCP Cloud Logging cannot handle the volume of logs
we're throwing at it... full text search slows to a crawl (LOL)

Reduce log level until we can move to something else.

commit-id:b71c3467
2022-01-25 22:36:24 +01:00
Leo 68bdd4b0b6 node/pkg/processor: expire late observations
Fixes https://github.com/certusone/wormhole/issues/685.

Example occurrence this fixes: https://i.imgur.com/gZWKf1n.png

Possible future optimizations include:

- Ignore late messages in the processor (but we can only ignore
  them post settlement time, so we need the cleanup logic regardless).

- Ignoring late observations from other nodes.

- Using the stored VAA to calculate misses.

- Drop incomplete local observations. However, this is not trivial
  since we do not know the message ID for those.

commit-id:47e1e59f
2022-01-25 22:36:24 +01:00
Leo b8c30314b5 node: avoid clobbering terminal with binary data
commit-id:222d1f31
2022-01-25 22:36:24 +01:00
Leo aff369ff4d node/pkg/solana: push recovery date
commit-id:a3c51648
2022-01-11 15:10:12 +01:00
Leo 1c0815e107 node/pkg/ethereum: increase log levels
commit-id:8ec48eb6
2022-01-11 15:10:12 +01:00
Leo af2bd5be36 node/cmd: add public telemetry for logs
commit-id:582fc943
2022-01-11 15:10:12 +01:00
Leo 870afc5193 node/pkg/ethereum: do not override outer scope's cancel function
Otherwise, we might end up cancelling the root context by accident.

commit-id:09a5287e
2022-01-11 15:10:12 +01:00