Commit Graph

1051 Commits

Author SHA1 Message Date
bruce-riley bb342612d1
Deploy HyperEVM in mainnet (#4389) 2025-05-29 13:31:57 -05:00
John Saigle c10d627dbd
deps: Remove Go-Spew and add new debugging function for VAAs (#4385)
* deps: Remove Go-Spew and add new debugging function for VAAs

- Removes go-spew (https://github.com/davecgh/go-spew) as it has not
  been updated in 7 years.
- Replaces the Go Spew functionality with a new function
  DebugString() that can be used to get a spew-like output.
2025-05-29 14:14:45 -04:00
Dirk Brink 6264a604e9
node: Governor token list update (#4368)
* node: governor token list update

* Add moonbeam bridged USDC to expected depeg list

---------

Co-authored-by: djb15 <djb15@users.noreply.github.com>
2025-05-22 10:33:28 -04:00
Dirk Brink b72f252edf node: Add initial tokens for SeiEVM and Ink 2025-05-21 09:43:28 -07:00
Aaron Clark 79d918eae1
Mezo mainnet deployment (#4378)
* Mezo mainnet deployment

- Provides .env.mezo.mainnet used for deploying WH Core and Token Bridge
  contracts to Mezo Mainnet

* Add Mezo mainnet values to node and SDK

Adds support for Mezo on mainnet.

    Core contract here
    Token bridge contract here

To enable Mezo on mainnet, use the following config parameters:

```
--mezoRPC YOUR_MEZO_RPC
--mezoContract 0xaBf89de706B583424328B54dD05a8fC986750Da8
```

Verification
~~~
|- go run verify.go --chainId 50
Verifying prod mezo...
   Verifying EVM chain ID for prod mezo ✓
   Verifying finality values for prod mezo ✓
   Verifying contract address for prod mezo ✓
Verifying test mezo...
   Verifying EVM chain ID for test mezo ✓
   Verifying finality values for test mezo ✓
   Verifying contract address for test mezo ✓
~~~

* Update mainnet_tokens_test.go

SeiEVM -> Mezo in comment

---------

Co-authored-by: Adam <20446095+aadam-10@users.noreply.github.com>
2025-05-21 12:09:05 -04:00
Fernando Garcia 5752197a6e
node/admin: add template for core bridge set message (#4369)
* node/admin: add template for core bridge set message

* lint

* add nosec G115

* admin server and payloads

* fix types in payloads.go

* lint

* fix types in payloads.go

* PR comments

* PR comments

* PR comments

* p

* lint

* add test case for BodyCoreBridgeSetMessageFee

* lint
2025-05-21 15:55:42 +01:00
John Saigle 9e92d879c3
deps: Replace godo/fswatch with fsnotify/fsnotify (#4357)
* deps: Replace godo/fswatch with fsnotify/fsnotify

- The fswatch repository seems to be abandoned, whereas fsnotify is
  actively supported and appears to be popular.

* Fix fsnotify usage

* fix typo in code comment: touch does NOT trigger

* Change level from Warn -> Info
2025-05-21 09:28:27 -04:00
Jason Matthyser 33074a6ebd
Docs: Update Guardian Key/Signer Documentation (#4273)
* update guardian key/signer whitepaper and documentation

* small changes to docs

* update guardian signer references

* add words for spellchecking

* capitalise guardian

---------

Co-authored-by: pleasew8t <jason@asymmetric.re>
2025-05-20 10:05:06 -04:00
Evan Gray 55c0c6412d sdk: reserve Sonic chain ID 2025-05-06 10:07:40 -04:00
bruce-riley 8c8e21acb5
Node/CCQ: Add waiting for peer warning (#4366) 2025-05-01 12:45:49 -05:00
John Saigle 094e10ad1a
node: Extend flow cancel by configuring allow-list of chain ID pairs ("corridors") (#4229)
* node: Add ability to limit Flow Cancel to pairs of chains

- Add a concept of "pipes" which consist of a pair of chains
- Add field in the Governer that enables flow cancel only for "pipes"
  which are explicitly enabled
- Set the Eth-Sui pipe as the only flow cancel-enabled pair. Sui is the
  only chain with frequent governor congestion so it is the only one
  that really needs the Flow Cancel capabilities. Ethereum is the main
  chain that Sui is interacting with in terms of volume moving in and
  out of Sui.
- Refactor calling sites for flow cancel transfer functions so that all
  checks are done in one place. (Should help prevent bugs where only one
  calling site is updated.)

* node: Call pipe.valid() when adding a flow cancel transfer

* node: Add unit tests for Governor pipes. Modify pipe equality check

- Add unit tests to ensure that the flow cancel feature works iff valid
  pipes are configured
- Adds unit tests for the pipe type (validity, equality between two
  pipes)
- Modifies pipe.equals() to always return false for invalid pipes

* Fix linter errors

* Restore continue on error. Improve comments and error messages

* Fix lint

* Remove redundant validity check, add comment

* Add unit test for mainnet deployment of flow cancel pipes

* Remove continue statement when flow cancel returns error

* Improve unit test coverage for pipes

* lint

* re-order error checking; avoid early return if flow cancel fails

* Remove pipe configuration in devnet

* Change default allocation

* rename pipes to corridors

* cleanup after rebase
2025-04-30 10:56:26 -04:00
John Saigle 8a5f6a4ec6
ci: detect unused function arguments with unparam (#4353)
* ci: detect unused function arguments with unparam

* fix lints in SDK

* fix bad copy-paste on comments
2025-04-24 17:23:47 -04:00
Dirk Brink db62f81e68 node: Reduce Governor Limits on Sei, Injective, Celo & Algorand 2025-04-24 11:17:26 -07:00
John Saigle 239790452b
deps: Remove status-im/keycard-go (#4355)
- This dependency was being used only to print hex-encoded bytes, but
  this can be done by passing %x to fmt.Printf()
2025-04-24 14:09:54 -04:00
John Saigle 0ecffabc05
deps: Use stable slices package instead of experimental release (#4356)
- The adminserver.go file was using an experimental version of the
  slices package. This isn't necessary as the functions it uses are all
  available in the stable package.
2025-04-24 14:09:26 -04:00
John Saigle 8cb392c2fe
txverifier: fix out of bounds panic for logs with no topics (#4360)
* txverifier: fix out of bounds panic for logs with no topics

- Adds handling for logs with no topics, fixing a panic in the code.
- Adds a unit test that passes a valid receipt with a log with no topics
  to ensure the code does not panic

An in-the-wild example of this occurring is the transaction
0xa3692c2469b2ac9e7010aa07e550a26f3f35a959e8c20b23fb0abc03d81e54b4

* update comment

* Update node/pkg/txverifier/evm.go
2025-04-24 12:20:50 -04:00
bruce-riley 71127ab1e8
Node: Clean up feature flags (#4352)
* Node: Clean up feature flags

* Node: Clean up feature flags
2025-04-22 14:55:16 -05:00
John Saigle a0349d8a3f
ci: upgrade golangci-lint to v2.1.2 (#4354)
* ci: update golangci-lint to 2.1.2

* fix importShadow violations

- Upgrading to golangci-lint 2.1.2 raised many new issues relating to
  the importShadow rule from go-critic
2025-04-17 15:36:59 -04:00
John Saigle 6c0177ba40
deps: Remove miguelmota/go-ethereum-hdwallet; delete unused code (#4347)
* deps: Remove miguelmota/go-ethereum-hdwallet; delete unused code

- Remove the pkg/devnet/constants.go file which was largely unused. Most
  of this code has also not been updated in a long time, and it refers
  to both Ganache and Truffle where we now use Foundry for testing.
- Move the "Ganache" constant to the new devnet constants file under
  SDK
- Delete the rest of the unused code
- Ran `go mod tidy` and committed the results, which removed one direct
  dependency and a couple of indirect ones

* change format of new SDK constant
2025-04-17 14:33:38 -04:00
John Saigle eae85c9978
ci: Add nolintlint to golangci-lint (#4346)
* ci: Add nolintlint tool

* nolint --> nosec
2025-04-15 13:38:42 -04:00
bruce-riley 5d368eb612
Node/Solana: Minor watcher cleanup (#4348)
* Node/Solana: Minor cleanup

* Code review rework

* Don't count wrong commitment as an observation
2025-04-15 07:46:56 -05:00
John Saigle 540b2efd39
deps: Remove use of tendermint/random for non-Cosmos code (#4338)
- Removes references to tendermint/random.
This package was being used to generate random Uint32 and Uint64 values
for sequence and nonce values. This dependency was added to the
	admintemplate many years ago and there isn't a justification in
	the commit for adding it instead of using std library functions.
- Adds new random functionality in the form of Uint32 and Uint64
  functions.

These changes make it so that the only parts of the node that reference
Tendermint are the ones directly related to Cosmos code.

Note that both Tendermint and the CometBFT fork have either deleted or
deprecated this functionality anyway.
https://github.com/tendermint/tendermint/issues/2956
https://github.com/cometbft/cometbft/blob/main/libs/rand/random.go
2025-04-14 14:20:14 -04:00
John Saigle 1b93161604
deps; Remove benbjohnson/clock as a direct dependency (#4339)
- Replaces the archived dependency's mock clock capabilities with an
  interface defined in the files that use it. The implementation is
  similar to how the library does it.
- Update go.mod via `go mod tidy`
- Minor refactoring of reobserve.go to change in-line durations to named
  constants.
2025-04-14 13:31:25 -04:00
Dirk Brink 4e03f24d0f
node: Governor token list update (#4321)
* node: governor token list update

* Keep Scroll WETH

---------

Co-authored-by: djb15 <djb15@users.noreply.github.com>
2025-04-11 13:52:35 -07:00
John Saigle a31e5ba792
ci: golangci-lint major version upgrade (#4322)
* new version of golangci-lint does not need to manually add prefix

* fix violation in watcher

* Update golangci-lint version in github workflow
2025-04-10 11:46:49 -04:00
John Saigle 28e2d01298
node: Enable transfer verifier for the node in devnet (#4320)
* node: Enable transfer verifier for the node in devnet

* Info --> Debug
2025-04-09 14:06:49 -04:00
bruce-riley 78f4e24bf2
Node: Alternate publishers (#4318)
* Node: Alternate publishers

* Code review rework

* Add support for feature flag in heartbeat

* Code review rework
2025-04-09 12:24:23 -05:00
John Saigle 56a9510e93
node: add targets for linting to Makefiles (#4308) 2025-04-09 13:01:14 -04:00
Maxwell "ꓘ" Dulin cc9d822285
Golang linter improvements PR (#4323)
* Add several simplier linters

* misspell
* dupword
* predeclared
* errorlint
* bodyclose
* exhaustive
* bidichk

* Add new golangci.yml file

* Add initial gocritic linters

* Revert "Add initial gocritic linters"

This reverts commit 5fb533e273.

* Add contextcheck linter

* Linter fixes for recent changes

* Fix exclusion path on 'generated_mainnet_tokens'

* Remove duplicate 'to' from sdk file

* Added comments to several nolints and first misspelling of a few words

* Fix previous typo

---------
2025-04-07 15:41:02 -07:00
bruce-riley 1206cda00e
Node: Fogo support (#4330) 2025-04-07 09:46:07 -05:00
bruce-riley 33dd6a5654
Node: Add Solana shim feature flag (#4332)
* Node: Add Solana shim feature flag

* Code review rework
2025-04-07 09:06:29 -05:00
bruce-riley a97c4215f0
Node: Allow Mainnet Solana shim (#4329) 2025-04-04 08:18:46 -05:00
Dirk Brink 553c09e4f8
ci: Bump golang linter version (#4224)
* ci: Bump golang linter version

* Fix initial set of lints

* Fixing more lints

* Fix more lints

* More linting updates

* More linting

* Almost there with the lints

* Last set of lints before rebase

* New lints with rebase

* PR feedback + fix test

* Update error string in algorand watcher

* Comments for watchers, revert adminserver change, remove unnecessary line in script

* Fix new lints from rebase

* Rebase fix

* Updating lints for Solana shim

* PR feedback
2025-04-01 09:30:51 -07:00
John Saigle 553a358809
node: Remove go-homedir dependency (#4316) 2025-03-27 19:44:48 -04:00
bruce-riley e5487b5e96
Node/EVM: Add contract address to chain config (#4299) 2025-03-21 13:51:34 -05:00
bruce-riley 7d140ef517
Node: Add reobservation metric (#4303) 2025-03-20 10:28:38 -05:00
bruce-riley 4ba560af10
Deploy SeiEVM mainnet (#4305) 2025-03-20 08:36:21 -05:00
John Saigle 983dd07551
node: Integrate Transfer Verifier into the Ethereum watcher (#4233)
- Create a TxVerifier instance in the Run function of the EVM watcher
- Wrap all instances where a message would be published to the broadcasting msg channel with a new function, verifyAndPublish
- Messages are published with a new status: VerificationState.
- Modified the Transfer Verifier pkg API so that we can call the method with either an existing Receipt or a txHash.
- Added unit test in the watcher for new functionality

If Transfer Verifier is enabled:
- Messages that are token transfers will undergo Transfer Verification
- Message will be published with a status of Valid or Rejected depending on the result
- The calling code can then decide what to do based on this status

If Transfer Verifier is not enabled
- Existing behaviour will be preserved, but messages will be published with a status of NotVerified. No further actions are taken when a Message Publication has this status

Design Considerations
Modifying MessagePublication
This PR modifies MessagePublication to add a new status based on whether the Message Publication is verified. This decision was made to handle Transfer Verification cases across many chains. For example, the EVM logs are reliable enough that we can confidently rule a message as Valid or Rejected. Other ecosystems (i.e. Sui, but perhaps also Solana, etc.) are not so clear cut. In this case, we may want to mark a transaction as Anomalous rather than outright rejecting it.

Using this new enum allow us to do this.

Other potential benefits:

- Decouples the Verification of a Message from whether or not this can be published.
- Avoids scope-creep for the Watchers: they only watch messages, but do not need to reject them. (Instead this could be handled by the processor or some other security mechanism akin to the Governor or Accountant.)
- Allows configuring targeted action on a per-chain and per-status basis. For example, we may want to delay Anomalous messages but drop Rejected ones.
- Preserves a NotApplicable state that can be used as a fallback mechanism if the Transfer Verifier is disabled outright or on a particular chain
This status could be used in other cases beyond Transfer Verification, but should not interfere with existing message handling.
2025-03-20 09:28:29 -04:00
bruce-riley df918bb527
deploy_mezo_testnet (#4300) 2025-03-18 08:42:54 -05:00
bruce-riley 4e4eaa6f81
Node/Solana: Shim watcher cleanup (#4269)
* Node/Solana: Shim watcher cleanup

* Code review rework
2025-03-17 11:03:59 -05:00
bruce-riley 60e2b6b658
Node: Buffer log messages (#4294)
* Node: Buffer log messages

* Should shutdown the new go routine

* Go back to using a delay to get shutdown messages

* Redesign shutdown

* Tweak shutdown logic

* Remove wormhole_loki_write_failed metric

* Code review rework
2025-03-13 15:12:51 -05:00
bruce-riley 242cad064c
Node / Solana: Fix reobservation ID in log msg (#4297) 2025-03-13 11:59:07 -05:00
bruce-riley 307c2e674f
Update Berachain testnet (#4296) 2025-03-12 16:32:16 -05:00
bruce-riley a9efee20a2
Deploy Ink mainnet (#4295) 2025-03-06 10:19:49 -06:00
bruce-riley d36a16cac3
Node/P2P: Add protected peers list (#4292)
* Node/P2P: Add protected peers list

* Add support for spy and CCQ proxy

* Add tests
2025-03-05 09:36:46 -06:00
djb15 8bdc1627cb node: governor token list update 2025-03-04 13:55:36 -08:00
John Saigle c91313587f node: update after running "go mod tidy"
Deletes the celo-blockchain package from go.mod. This is no longer
needed because recent updates to Celo resulted in the Guardian being
able to handle Celo connections using a general connector. The source
code that needed this dependency has already been deleted, so this
commit is just a cleanup.

To verify:
- Checkout main
- Run `go mod why -m $dep` on one of the deleted dependencies. It should
  report that the dependency is not needed.
- RUn `go mod tidy` and it should give the same results as this PR.
2025-03-04 11:04:05 -05:00
bruce-riley be21309e8d
Node/EVM: Update repair tool (#4291) 2025-03-03 13:49:19 -06:00
bruce-riley 6de7cd2399
Node/EVM: Berachain not instant finality (#4285) 2025-02-28 12:11:50 -05:00
bruce-riley 2f6f4399d7
Node/EVM: Add instant finality to chain config (#4283)
* Node/EVM: Add instant finality to chain config

* Code review rework

* Update Berachain testnet URL
2025-02-28 11:32:46 -05:00