Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this?
This is a PR to add MESC to ethereum-etl.
MESC is an RPC configuration standard that allows a user to share a single RPC configuration across all of the tools on their system. ethereum-etl does not currently allow for configuring a default rpc provider or configuring separate network-specific defaults. Adopting a standardized approach will increase ethereum-etl's interoperability and make it easier for users to manage multiple endpoints across multiple networks.
More information about MESC can be found in the MESC docs.
Backward Compatibility
MESC is an opt-in standard and this PR integrates it into ethereum-etl in a backward-compatible way. MESC is only used when a user has enabled MESC in their environment. Behavior of ethereum-etl is unchanged for users that have not enabled MESC.
Behavioral Changes
This PR introduces two behavioral changes to ethereum-etl:
The follow commands are affected:
export_all
export_blocks_and_transactions
export_contracts
export_receipts_and_logs
export_tokens
extract_tokens
get_block_range_for_date
get_block_range_for_timestamps
stream
-p
/--provider-uri
argument now allow users to specify providers using 1) an endpoint name, 2) a network name, 3) a chain id, or 4) a URI (as before). For example, each of the following is now allowed:specify by endpoint name
export_blocks_and_transactions -p local_goerli ...
specify by network name
export_blocks_and_transactions -p goerli ...
specify by chain id
export_blocks_and_transactions -p 5 ...
specify by uri
export_blocks_and_transactions -p http://localhost:8545 ...
Dependency Changes
The
mesc
python implementation has no dependencies and is compatible with python 3.7 through python 3.12.How to set up MESC?
There are two basic steps: create a
mesc.json
and setMESC_PATH
to the path of this file. Details can be found in the MESC Quickstart Guide. The setup process can also be performed interactively with themesc
cli tool.Why would ethereum-etl integrate MESC?
A longer form discussion of these advantages can be found on the Why MESC? page of the MESC docs.
What do you think?
Let me know what you think and if you have any general questions about MESC.