Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(geth): add ethereum support for the geth binary #1230

Merged
merged 51 commits into from
Aug 24, 2024
Merged

Conversation

misko9
Copy link
Contributor

@misko9 misko9 commented Aug 23, 2024

Tested to also support Binance Smart Chain (v1.2.13)

Copy link

vercel bot commented Aug 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
interchaintest-docs ⬜️ Ignored (Inspect) Visit Preview Aug 23, 2024 9:38pm

@misko9 misko9 marked this pull request as ready for review August 23, 2024 23:28
@misko9 misko9 requested a review from a team as a code owner August 23, 2024 23:28
Comment on lines +161 to +167
switch cfg.Bin {
case "anvil":
return foundry.NewAnvilChain(testName, cfg, log), nil
case "geth":
return geth.NewGethChain(testName, cfg, log), nil
default:
return nil, fmt.Errorf("unknown binary: %s for ethereum chain type, must be anvil or geth", cfg.Bin)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice, I like this design pattern a lot for this. clean & great UX

@@ -36,7 +37,7 @@ func TestEthereum(t *testing.T) {
ctx := context.Background()

// Get default ethereum chain config for anvil
anvilConfig := ethereum.DefaultEthereumAnvilChainConfig("ethereum")
anvilConfig := foundry.DefaultEthereumAnvilChainConfig("ethereum")
Copy link
Member

@Reecepbcups Reecepbcups Aug 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self:

  • add release note that we support both foundry & geth now
  • modifications to local-ic required? nope you handled! ty!

_, _, _ = val0.Exec(ctx, val0.TxCommand(keyName, command...), val0.Chain.Config().Env)
// We are running many nodes, using many resources. This function is similar to
// testutils.WaitForBlocks(), but does not hammer calls as fast as possible.
func NiceWaitForBlocks(ctx context.Context, delta int64, chain ibc.Chain) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I like the idea for this function, but I think adding a time.Duration in the function params would be better suited so its more general? or maybe just a better name, as nice in what context to a user? Leaving that to scope for a future PR if desired.

WaitForBlocksWithDelay(ctx context.Context, delta int64, chain ibc.Chain, searchDelay time.Duration)

local-interchain/interchain/logs.go Show resolved Hide resolved
@Reecepbcups Reecepbcups merged commit ef70987 into main Aug 24, 2024
18 checks passed
@Reecepbcups Reecepbcups deleted the steve/geth branch August 24, 2024 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants