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

Added some more data fields for block collector #24

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mw2000
Copy link

@mw2000 mw2000 commented Jun 7, 2023

A PR for adding more data fields into the block creator. I think it would be beneficial if we had the base_fee_per_gas, the total gas, timestamp, and the extra_data of the block being collected.

Open question:
I've set the base fee to be 0 for blocks previous to London. Maybe there's a cleaner way to do this.

P.S.: I'm new to rust and the library, so I wanted to draft a small PR as I learn and explore Artemis further.

@pistomat
Copy link
Contributor

pistomat commented Jun 7, 2023

If we are adding more data fields, is returning the whole block as ethers::types::Block<TxHash> an overkill?

@FrankieIsLost
Copy link
Collaborator

Agree with @pistomat, let's make this a Collector<ethers::types::Block<TxHash>> instead of Collector<NewBlock> to avoid having to do manual destructuring

@mw2000
Copy link
Author

mw2000 commented Jun 8, 2023

Okay, added block as a subitem of NewBlock. block is of type Block<TxHash> and modified some stuff that would change due to this.

@mw2000 mw2000 marked this pull request as ready for review June 9, 2023 05:59
@mw2000
Copy link
Author

mw2000 commented Apr 12, 2024

@FrankieIsLost was revisiting some old PRs, is this still merge-worthy or close?

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.

None yet

3 participants