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

Add L1 data fee when estimating mining transaction profit #360

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

Conversation

syntrust
Copy link
Collaborator

@syntrust syntrust commented Jan 17, 2025

Fixes #356.

Also, implement the checking of the gas fee against the tx fee cap (e.g., --RPC.txfeecap as in geth) before submitting the tx to avoid a tx fail on the chain.

Tests:

Deployed a contract to SWC beta and did the mining tests with:

env ES_NODE_SIGNER_PRIVATE_KEY=<ES_NODE_SIGNER_PRIVATE_KEY> ./integration_tests/run_tests.sh

It also successfully mined as a member node in the SWC beta network.

@syntrust syntrust marked this pull request as ready for review January 20, 2025 02:59
@syntrust syntrust requested review from qizhou, qzhodl and ping-ke January 20, 2025 02:59
ethstorage/miner/l1_mining_api.go Outdated Show resolved Hide resolved
ethstorage/miner/l1_mining_api.go Outdated Show resolved Hide resolved
integration_tests/run_tests.sh Show resolved Hide resolved
@syntrust syntrust requested a review from qzhodl January 23, 2025 11:23
Copy link
Collaborator

@qzhodl qzhodl left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Mining gas cost estimation needs to consider l1 cost
2 participants