Eth Dev Assistant #6200
spacesailor24
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Thanks alot Wyatt for working on this, this looks thorough and well thought out. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Idea
I've started work on a POC for a replacement of
4.x
's current testing infrastructure around creating chain instances, creating accounts, and funding accounts. In1.x
we had a tool, Geth Dev Assistant, that handled this for Geth. My idea for Eth Dev Assistant is to expand that offering to multiple execution/testing clients (i.e. Ganache and Hardhat) to make testing across different client software easier to manage, run locally, and debugThe POC
I'm creating the discussion as my repo is just a POC, and now would be the time to talk architecture and scoping out the MVP. So far the architecture is pretty basic:
Client
class to be used by all supported client softwaresClient
abstract classClient
abstract classclient.ts
And that's about it for the POC. You can see in these E2E tests how the library is intended to be used:
The Goal
Here is where I'd like everyone to spend time thinking about what would make this library useful. Below I will list some of the features of my POC that I deem are improvements on what
4.x
currently uses for testing:Currently
4.x
uses a mixture of bash scripts and TS functions to perform operations such as starting/stopping the client software, generating and funding accountsThis is improved upon in the POC by having this functionality controllable via await-able TS functions
Currently
4.x
has a bash script for starting/stopping Geth and a separate one for GanacheThe POC improves upon this by offering a standard interface (
client.ts
) that a client implementation class can extend, so that all client can be interacting with in a common wayThere are certain tests we have in
4.x
that step on the toes of other tests and therefore have to be ran synchronously or by generating and funding new accountsThe POC improves upon this by offering a TS function to start and stop the client software (using Docker containers), so that a global client can be created and used for tests that can be ran async, and individual clients can be started and stopped for synchronous test
Disclaimer This should be possible with some modification of POC. I haven't tested this, but theoretically this should work if POC is updated to handle using different port numbers for each client instance
Unimplemented Features
It should be possible to extend the POC to support client configuration using command line args when starting the Docker container
It should be possible to control consensus clients and setup the connection between it and an execution client for more holistic testing and for future web3.js packages such as a beaconchain package
It should be possible to extend the POC to support forking the mainnet chain using client software that supports forking
Beta Was this translation helpful? Give feedback.
All reactions