Add Isthmus ERC-20 bridge devnet-sdk test#14631
Conversation
|
/ci authorize 061ab2f |
This commit also makes changes to devnet-sdk and kurtosis-devnet that enable the new tests.
061ab2f to
31f4e0c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #14631 +/- ##
===========================================
- Coverage 46.73% 45.46% -1.27%
===========================================
Files 1040 982 -58
Lines 89406 84719 -4687
===========================================
- Hits 41785 38521 -3264
+ Misses 44533 43285 -1248
+ Partials 3088 2913 -175
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| GasPrice(ctx context.Context) (*big.Int, error) | ||
| GasLimit(ctx context.Context, tx TransactionData) (uint64, error) | ||
| PendingNonceAt(ctx context.Context, address common.Address) (uint64, error) | ||
| ChainConfig() (*params.ChainConfig, error) |
There was a problem hiding this comment.
genuine question: should the ChainConfig be an interface i nstead of params.ChainConfig?
same for the Block type below.
I guess I'm a bit worried about the feasibility of providing alternative implementations of these concepts if we leak the concrete types here.
There was a problem hiding this comment.
Ideally it would be possible to have access to the op-geth chain config in the event that we're testing op-geth specifically, and access to a higher-level interface if we don't care which execution client we're working with. I'd be happy to add the interface for now.
| ) | ||
|
|
||
| func init() { | ||
| slog.SetDefault(slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{Level: slog.LevelDebug}))) |
There was a problem hiding this comment.
Need a rebase for removing slog usage. Please refer #14644
| clients *clientManager | ||
| registry interfaces.ContractsRegistry | ||
| mu sync.Mutex | ||
| chainConfig *params.ChainConfig |
There was a problem hiding this comment.
Feels like we need a unification here. #14668 adds descriptors.ChainConfig.
| if err != nil { | ||
| return fmt.Errorf("failed to add L1 chain: %w", err) | ||
| } | ||
| fmt.Println("L1 chain ID: ", l1.ID()) |
There was a problem hiding this comment.
Maybe this print should be removed?
| func (s *system) addChains(chains ...*descriptors.Chain) error { | ||
| for _, chainDesc := range chains { | ||
| if chainDesc.ID == "" { | ||
| if chainDesc.Name == "Ethereum" { |
|
Closing in favor of smaller PRs such as #14668 |
This PR ports a few tests from the op-e2e test framework to the devnet-sdk framework, and makes a few necessary changes to the devnet-sdk framework. Since devnet-sdk tests are not run as part of CI yet, you can run tests with the following procedure.
Running devnet-sdk tests in kurtosis-devnet/tests
You will see certain tests get skipped because they target a different fork than simple-devnet runs (Holocene). Feel free to try with different devnets.
Change Summary
New Test Files Added:
tests/fees/fees_test.go: Tests for L1 and L2 fee calculations across different fork configurations (pre-regolith, regolith, ecotone, fjord)tests/fjord/check_scripts_test.go: Tests for thecheck-fjordscript functionalitytests/isthmus/erc20_bridge_test.go: Tests for ERC20 token bridging between L1 and L2 chainstests/isthmus/withdrawal_root_test.go: Tests that the withdrawal root is properly set on the block header as a withdrawal is performed.Core Framework Enhancements:
devnet-sdk/system/interfaces.go:ChainConfig()BlockByNumber()LatestBlock()BlockByHash()Addresses()Artifactstruct indevnet-sdk/kt/fs/fs.gowith improved file extraction capabilities (allows multiple reads from a single artifact object).devnet-sdk/testing/testlib/validators/forks.goTesting Infrastructure Improvements:
Documentation Updates:
std_output.mdfor devnet descriptor generationChain Configuration Updates:
IsthmusTimeOffsetThe changes maintain backward compatibility while adding new testing capabilities that will help ensure the reliability of the Optimism network across different configurations and features.