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

Devnet configurations reject transactions when BaseFee is below 7 #8289

Closed
jyellick opened this issue Sep 25, 2023 · 1 comment · Fixed by #8367
Closed

Devnet configurations reject transactions when BaseFee is below 7 #8289

jyellick opened this issue Sep 25, 2023 · 1 comment · Fixed by #8367
Assignees

Comments

@jyellick
Copy link
Contributor

This is a re-opening of ledgerwatch/erigon-lib#1112 which was assigned to @somnathb1 before the repository was archived. Since Github does not allow any comments or updates on issues for archived repositories, I thought I would re-open it here.

I've run into an issue where on a dev network, when the block baseFee is adequately low (say, 1 Wei), that the txpool begins rejecting transactions claiming they have an insufficient fee when their fee is in fact adequate. I traced it down to the following bit of code:

erigon-lib/txpool/pool.go

Unfortunately, there's no comment, but it looks to me like this function is probably supposed to implement some heuristic based on the pending block base fee to compute a 'protocol base fee' (maybe say, some fraction of the pending base fee?), but instead returns a constant 7.

Doing a git blame shows @AskAlexSharov as the author in ledgerwatch/erigon-lib@29bf077 and that the protocolBaseFee used to be an atomic that got set and retrieved. But, I wasn't able to glean much from the PR ledgerwatch/erigon-lib#48 it came in with.

So, can anyone explain to me why this function returns a constant 7? Is there some other behavior it should be doing that's documented? Would a patch which returns something equivalent to min(7, baseFee) be accepted as a fix for these devnet transactions being rejected when the basefee is adequately small?

I first raised this on Discord, but @AskAlexSharov suggested I create this in an issue https://discord.com/channels/687972960811745322/687972960811745326/1149164360644706355

I think you are right and it’s something mainnet-specific hardcode. Let’s do next way: create github issue from this comment - i will ask somebody in team to take a look. Likely we need “add support of non-mainnet chains to txpool”.

From the other issue @AskAlexSharov commented

adding link to pool docs: https://github.com/ledgerwatch/erigon/wiki/Transaction-Pool-Design

@somnathb1 somnathb1 self-assigned this Oct 3, 2023
@somnathb1 somnathb1 linked a pull request Oct 4, 2023 that will close this issue
@jyellick
Copy link
Contributor Author

jyellick commented Oct 5, 2023

Many thanks!

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 a pull request may close this issue.

2 participants