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

Txpool: about discard transactions without enough fees for L1gas #243

Open
hsyodyssey opened this issue Mar 7, 2023 · 5 comments
Open

Comments

@hsyodyssey
Copy link

hsyodyssey commented Mar 7, 2023

Hi, for this part, transactions that don’t have enough fees will be dismissed directly by the transaction pool.

I think it could be hard for the user to know if their transactions are rejected. Because transaction pool will not give the user a feedback of the transaction being discarded, such events are hard to directly notify users unless they are monitoring all the tx pools? This issue may become more difficult for users after enabling decentralized sequencers 

@0xmountaintop
Copy link

IIRC,

func (b *EthAPIBackend) SendTx calls func (pool *TxPool) AddLocal

func (pool *TxPool) AddLocal calls func (pool *TxPool) AddLocals

func (pool *TxPool) AddLocals calls func (pool *TxPool) addTxs with local=true

it then calls func (pool *TxPool) addTxsLocked and then func (pool *TxPool) add

so the error can be returned.

that is, if user call SendTx to send an insufficient l1_fee tx then he will know such a rejection.
(But I agree that if someone don't run our codes and accept such a tx into tx_pool then broadcast the tx, user will not know the tx will be rejected.)

@hsyodyssey
Copy link
Author

The accurate representation is that it is harder for general wallet users to get timely feedback. Yes, I agree, it's ok if the user runs the node. But for wallet users, it may be more difficult. Perhaps it could be marked for a while to see user feedback.

@0xmountaintop
Copy link

0xmountaintop commented Mar 10, 2023

The accurate representation is that it is harder for general wallet users to get timely feedback. Yes, I agree, it's ok if the user runs the node. But for wallet users, it may be more difficult. Perhaps it could be marked for a while to see user feedback.

But user can still know it's rejected if using metamask with our RPC. (you can test by sending max ether in your wallet.)
They will know it's rejected (tho they probably won't know it's because of l1fee).

if they want to know the exact reason (rejected because of l1fee) we will probably require support from metamask?

@hsyodyssey
Copy link
Author

yep, it would require the help of various wallets to support reminders of why a transaction was rejected. As a user and I would like to know why my transaction failed.

@hsyodyssey
Copy link
Author

Or more precisely for the transactions captured from the P2P network, giving them feedback seems to be difficult. via: https://github.com/scroll-tech/go-ethereum/blob/staging/core/tx_pool.go#L890-L892

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

No branches or pull requests

3 participants