Commit Graph

284 Commits

Author SHA1 Message Date
bruce-riley b7631bfbba
Deploy Holesky Testnet (#3630) 2024-01-08 16:42:10 -06:00
bruce-riley 818038ef80
Deploy Sepolia based L2s (#3606)
* Deploy Sepolia based L2s

* Code review rework
2023-12-20 08:56:14 -06:00
Evan Gray 094a404902 tilt: remove additional root CA support 2023-12-12 14:22:05 -06:00
iwantanode a348dfa68d fix typo token_verification.md 2023-12-12 11:24:41 -06:00
Dirk Brink da2bdd67be ccq: Extra docs for validateEthCallData 2023-12-12 00:45:32 -06:00
Dirk Brink 39f51b0766 CCQ: Remove max block time/num from validation helpers 2023-12-12 00:45:32 -06:00
Dirk Brink 4cce7d5392 CCQ: Fuzz tests for helpers 2023-12-12 00:45:32 -06:00
Dirk Brink 3c243e0e87 CCQ: High level validation helpers + slight refactor 2023-12-12 00:45:32 -06:00
bruce-riley a2cb2a1226
Deploy Mantle to testnet (#3438) 2023-12-11 10:26:56 -06:00
Csongor Kiss 0cc1f677e5 drop mention of the terra NFT bridge from docs and scripts 2023-12-06 20:40:17 +00:00
Evan Gray 08455a7770
tilt: eth relayer pin tsx (#3565) 2023-11-30 11:44:28 -06:00
Dirk Brink a2022c77e1
ethereum: Fix flaky governance replay attack test (#3555) 2023-11-23 13:40:58 -08:00
Dirk Brink 49549eb01c ethereum: Fix flaky tests 2023-11-20 09:05:28 -05:00
Dirk Brink 01d4855373
CCQ: QueryResponse fuzzing + extra safety checks (#3519)
* CCQ: Fuzzing for parseAndVerifyQueryResponse

* CCQ: Fuzz signature checking and improve request body check

* CCQ: Use forge bounding & improve test coverage
2023-11-14 12:20:08 -05:00
bruce-riley 0a89e23589
Deploy scroll to testnet (#3429)
* Deploy scroll to testnet

* Don't allow scroll in mainnet

* Add scroll to ccq, use batch poller
2023-11-08 14:14:47 -06:00
derpy-duck 33c0adbf82
relayer: Improve IWormholeReceiver docstring (#3488)
* IWormholeReceiver docs good

* note to verify
2023-11-02 13:05:05 -04:00
Csongor Kiss d6a410d7b2 ethereum/relayer: fix comment about storage slot derivation 2023-10-31 19:06:40 -04:00
bruce-riley af8138d4fb
CCQ/EVM: eth_call_by_timestamp and eth_call_with_finality support (#3468)
* CCQ/EVM: ethCallByTimestamp & ethCallWithFinality

* Code rework

* Code review rework
2023-10-31 17:05:19 -04:00
Bruce Riley 5afd9eab2d Code review rework 2023-10-26 12:59:24 -04:00
Jeff Schroeder e613486b92 ethereum: QueryDemo updates
* Use custom errors in place of require() to match the error handling
style overall of QueryResponse.
2023-10-26 12:59:24 -04:00
Jeff Schroeder 1eb481b2c9 ethereum: QueryDemo updates
* Gas bad
* Natspec updates
* Some address(0) checks in the constructor
2023-10-26 12:59:24 -04:00
Jeff Schroeder 50f6ca9fc7 ethereum: more QueryResponse tests 2023-10-26 12:59:24 -04:00
Jeff Schroeder f3b44e322b ethereum: move custom errors out in QueryResponse
If you don't do this, in the tests you have to do:

    vm.expectRevert(bytes4(keccak256("UnsupportedQueryType()")));

Whereas with this change, you can simply import the contract and do:

    vm.expectRevert(UnsupportedQueryType.selector);
2023-10-26 12:59:24 -04:00
Jeff Schroeder e219e2fd8c ethereum: QueryResponse test tyop fix 2023-10-26 12:59:24 -04:00
Jeff Schroeder 841f041c7e ethereum: update QueryResponse tests
Instead of the test contract inheriting directly from the QueryResponse
contract, it instantiates an instance of it and uses that for the
testing. This seems to work much nicer with the forge coverage tools.

With this commit, the coverage for QueryResponse shows 85.1% line
coverage, 100% function coverage, and 50% branch coverage.
2023-10-26 12:59:24 -04:00
Jeff Schroeder 15e1dcd3dd ethereum: update the QueryResponse contract
By moving the structs out of the abstract contract, you can use them
directly in any contract that imports QueryResponse.sol *without*
requiring that contract to inherit from the QueryResponse contract. This
seems to work much better with forge's coverage tooling.
2023-10-26 12:59:24 -04:00
Jeff Schroeder b4a27f4aed ethereum: Query.t.sol --> QueryResponse.t.sol
To follow standard forge testing practice, you use the same filename
for a test contract as for the file it is testing, but make the
extension .t.sol.
2023-10-26 12:59:24 -04:00
Jeff Schroeder c40323828b ethereum: limit deps in the QueryDemo contract
- Context is generally a worthless import
- Ownable is totally unused and a worthless import
2023-10-26 12:59:24 -04:00
Bruce Riley faea3bab8d CCQ: EVM Library and Demo Contract 2023-10-26 12:59:24 -04:00
derpy-duck bebcf281e6
relayer: allow override target chain refund (#3430)
* refund address handling improvement

* fix compilation error

* Remove unnecessary line

* restrict to view

* fix comment

* Improve handling of gas limits

* get test to pass - check that the return data is appropriately long before decoding

* modification to checking inequality

* modification to checking inequality - use unchecked

* clean functions around - add untrustedBaseDeliveryPrice

* make quote_length_bytes a constant

* seperate pay into two overloads

* change inequality to equality for checking return data length

* renaming functions

* allow override of refund per gas unused

* test modification

* note
2023-10-13 17:19:56 -04:00
derpy-duck 6c3ff43d6a
Auto relayer refund address handling improvement (#3428) 2023-10-13 00:10:50 -04:00
Jeff Schroeder c19e6b972e ethereum: add default slither config
* Add solc remappings so it can find the dependencies
* Ignore external stuff and mocks
2023-10-06 17:13:43 -04:00
Csongor Kiss 3425c821f7 ethereum: remove mention of batched vaas in README 2023-09-28 17:44:10 -04:00
derpy-duck faa397ca4f
AutoRelayer: v1.1 Release (#3313)
* AutoRelayer: remove forwards

* AutoRelayer: reentrancy guard

* AutoRelayer: remove forwards from sdk

* AutoRelayer: VaaKey -> MessageKey internals

* AutoRelayer: check delivery provider supports keyType

* AutoRelayer: VaaKey backcompat wire format

* AutoRelayer: sdk fix

* AutoRelayer: Add supported keys to delivery provider

* AutoRelayer: reintroduce reentrancy guard, revert when replay protection triggered

* AutoRelayer: fix manual delivery test

* AutoRelayer: review flups

* AutoRelayer: move libraries within relayer folder

* AutoRelayer: fix delivery provider config script

Also fix delivery provider revert bug

* AutoRelayer: Andreas code review flups

* AutoRelayer: js sdk includes MessageKey serde

* AutoRelayer: update sdk to use message key

* AutoRelayer: Simplify executeInstruction to internal call (#3352)

* refund instead of revert for replay protection (#3371)

* refund instead of revert for replay protection

* Remove mention of forward from IWormholeReceiver

* AutoRelayer: 1.1 reintroduce forwards (#3385)

* forward fallback WIP

* forward fallback no tmp storage

* Re-introduce testing of 'forward'

* Reintroduce forwards with original or default behavior for refund info + delivery provider info

* Reintroduce reentrant, only store refund information

---------

Co-authored-by: Joe Howarth <josephehowarth@gmail.com>
Co-authored-by: Joe Howarth <jhowarth@jumptrading.com>
2023-09-22 15:07:59 -04:00
Csongor Kiss 4d51f8e57e ethereum/relayer: fix storage constant comments
The hash preimages for storage calculations were wrong for two storage
slots. The updated preimages can be verified to be correct with e.g. the
`chisel` command line tool from the foundry suite.
2023-09-18 10:02:52 -04:00
Jeff Schroeder a9437e8dc2 ethereum: add arrayElementLocation() test helper
Review feedback from @kcsongor in #3363
2023-09-11 14:03:51 -04:00
Jeff Schroeder d9aacf1485 ethereum: fix some intermittently failing tests
Fix the assumptions to match the storage layout correctly.
2023-09-11 14:03:51 -04:00
Jeff Schroeder 049ca971df ethereum: tighten up some test funcs to pure/view
Fallout from #2956
2023-09-11 14:03:51 -04:00
lucasmt 406a43d03e
ethereum: Add property tests and instructions for running them with KEVM (#2956)
* ethereum: Add Foundry tests written by RV

* ethereum: Add scripts and instructions to run proofs using KEVM

* ethereum: Fix typo on testSetup_after_setup_revert_KEVM

* ethereum: Edit Makefile to skip KEVM tests when running forge test

* ethereum: Fix commented-out lines in Foundry tests

* ethereum: Refactor GovernanceStructs invalid-size tests

* ethereum: Replace assume with bound in Foundry tests

Co-authored-by: Jeff Schroeder <jeffschroeder@computer.org>

* ethereum: Apply review suggestions to run-kevm script

Co-authored-by: Jeff Schroeder <jeffschroeder@computer.org>

* ethereum: explicit cast to uint8 for some vars

The bound() calls need to be explicitly cast to uint8 from the uint256
that forge-std's bound() returns.

* ethereum: updating some of the RV tests

The definitions don't compile with newer forge/solc.

* ethereum: Add assumption to test that guardian count > 0

Prevents an arithmetic over/underflow error in testCannotVerifySignaturesWithOutOfBoundsSignature, in the expression bound(outOfBoundsGuardian, 0, params.guardianCount - 1)

---------

Co-authored-by: Lucas MT <lucas.tabajara@runtimeverification.com>
Co-authored-by: Jeff Schroeder <jeffschroeder@computer.org>
2023-09-06 11:24:00 -04:00
bruce-riley 1cabbe8a2d
sdk: Rootstock readonly (#3235) 2023-08-14 13:17:47 -04:00
Joe Howarth 88b092e648
AutoRelayer: replay protection (#3272)
* AutoRelayer: replay protection

* AutoRelayer: store block number on failure and success, use for replay protection and indexing

* AutoRelayer: add 'deliveryAttempted' view fn; clear failure mapping on success
2023-08-09 13:51:44 -07:00
derpy-duck 5c399cdb4f
Relayer: base testnet deploy and script improvements (#3230)
* Relayer: base testnet deploy and script improvements

* remove operating chains
2023-07-24 11:39:53 -04:00
chase-45 14a1251c06
ethereum: pin ethereum docker forge evm version to london (#3120) 2023-07-18 12:16:51 -04:00
bruce-riley d1cfbdf46c
Node: Base deployment (#3213)
* Node: Base deployment

Change-Id: I9ccd5cbc6c44d1891acb9d443e9e2b29b25afa3c

* Add governance VAAs

Change-Id: I426107fd7ad2e6bef063b8f178c1683a6590a54e

* Update contract addresses

Change-Id: I1cf92bb08d1c45b22dec195e2d076e7aabf3e369

* Update URL in repair script

* Add baseRPC to devnet/node.yaml
2023-07-18 08:17:27 -04:00
derpy-duck 51f992021e
ethereum readme update (#3180)
* Makefile and readme update

* readme update

* README update

* remove code duplication

* Makefile and readme update

* readme update

* README update

* remove code duplication

* Still use make test

* restore makefile

* remove run-ganache
2023-07-12 11:32:31 -04:00
gator-boi d5f809df8b evm: add TransferRedeemed event to Bridge.sol 2023-07-07 09:29:15 -05:00
derpy-duck 44c8146c3f
relayer/ update delivery provider addresses (#3115) 2023-06-23 18:43:41 -04:00
derpy-duck 12b18d4ccc
Relayer new delivery provider implementation (#3088)
* WIP

* Pricing Wallet test

* Give owner same permissions as price oracle
2023-06-14 17:01:14 -04:00
derpy-duck 0fbfa816ba
relayer: fix messageTest + rm lib/forge-std + rm lib/openzeppelin (#3044) (#3089)
* relayer: fix messageTest + rm lib/forge-std + rm lib/openzeppelin

* save

* useLastRun -> false

Co-authored-by: Joe Howarth <jhowarth@jumptrading.com>
2023-06-14 11:09:42 -04:00
Csongor Kiss b07278c331 ethereum/Makefile: split test-identifiers from test-forge target
This way, running `test-forge` is quicker. `make test` still runs all
the tests.
2023-06-13 17:33:14 -04:00