maticnetwork / bor

Official repository for the Polygon Blockchain
https://polygon.technology/
GNU Lesser General Public License v3.0
1.01k stars 489 forks source link

legacyTx unsupport by polygon #989

Closed gzelda closed 1 year ago

gzelda commented 1 year ago

Overview of the problem

Reproduction Steps

Please mention the steps required to reproduce this issue.

https://polygonscan.com/tx/0x2a2a6547f2b50a37c3d62887a835475ecf7218547070445e33931a697c6899ab

The transaction with gasPrice nearly 500Gwei cannot be packed into a valid block for nearly several hours. It seems the polygon network only supports eip1559 dynamicTx. Cannot support legacyTx anymore.

Logs / Traces / Output / Error Messages

manav2401 commented 1 year ago

We still do support legacy (type 1) txs. Moreover, it also depends on the base fee at that moment. In case of high on-chain activity, I don't think 500gwei would be enough. Can you use a gas estimation and try sending a bit high value?

gzelda commented 1 year ago

We still do support legacy (type 1) txs. Moreover, it also depends on the base fee at that moment. In case of high on-chain activity, I don't think 500gwei would be enough. Can you use a gas estimation and try sending a bit high value?

It's a little bit werid when I saw the standard base is around 170Gwei and my 500Gwei tx kept pending for around 2 hours. I thought 500Gwei is super competitive to 170Gwei base tx, but it seems the bor program are avoiding packing my tx in some degree.

Actually I haven't seen the details in the eip 1559 upgrade part. Maybe u guys can do some test on the scenerios I mention above. @manav2401

Issue closed.

manav2401 commented 1 year ago

@gzelda it might be the case that when you're trying to send a transaction the base fee at that moment would've been high. Is it possible that the max gas limit you're trying to pass is low that the tx fails to execute? It might be great if you can share some more details on the tx params you set.

Also, we've tested the eip 1559 update on custom devnets as well as we have sufficient unit tests for the same. But, thanks for bringing to notice, I'll definitely re-check once. Thank you!

gzelda commented 1 year ago

Is it possible that the max gas limit you're trying to pass is low that the tx fails to execute? I think it is not correct, because after 2hrs (I haven't change any base infomation for the tx after I sent it.), the tx is successful finally. From my understanding the tx execution gas limit cannot range a lot, because the onchain-execution gas computation doesn't range a lot.

image And the tx cost only less than 75% of the gas limit in the end. No proof about the gas limit worked in this case. @manav2401