netgum / archanova

Archanova monorepo
https://archanova.io/
19 stars 11 forks source link

Transactions submitted with 0Gwei gas price | Sokol #52

Closed RyRy79261 closed 5 years ago

RyRy79261 commented 5 years ago

Description

Intermittently on Sokol, transactions will be submitted with a gas price of 0, even with explicit gas price of 1 being set. const gasPrice = anyToBN(0x3B9ACA00);

Forwarding 0.02Eth to an account: https://blockscout.com/poa/sokol/tx/0x3cb36122abbea502770acab0d0ad8c1a63a8480322ea599bc130b3880fd407b4/internal_transactions

Account deploy: https://blockscout.com/poa/sokol/tx/0x7c702258a310f4d4ac5a179bfdde19d96af8c73fd6357fce0779e5e541c8487d/internal_transactions

Account deploy: https://blockscout.com/poa/sokol/tx/0xfccc3842a1b7f9b82614154960847f358bed01b18dfb3d0524a890fbfe5f8ff4/internal_transactions

Account deploy: https://blockscout.com/poa/sokol/tx/0x11f0ba2e3fbf8872dbef5d23a1318d274e4a167cc5a8d3c56426a9224f89f5b9/internal_transactions

RyRy79261 commented 5 years ago

I have reproduced it on the Sokol playground.

Steps

PVT: 0x36c5d5fc99e74030f15f15171d9902d3b677b1a39d4a5327a2ca550ffb3634f7 Resulting tx from deploy: https://blockscout.com/poa/sokol/tx/0x43585f5d323d9a5b1228df20f41e8c3d0dca400cd15f78d298b289bd615f8a04/internal_transactions

RyRy79261 commented 5 years ago

I've found that the estimate is being generated with gas estimates of 0 for transactions.

The estimation occurs at the relayer so this would need to be addressed there.

stanislaw-glogowski commented 5 years ago

There is no possibility to submit gas price anymore. In latest version you can choose gasPriceStategy (Avg, Fast = Avg x 2)

RyRy79261 commented 5 years ago

@stanislaw-glogowski This issue is still occurring in version 1.1,0:

https://blockscout.com/poa/sokol/tx/0x232cccc317b15b1a5a5582db4909c20acad6644a027ea9e76acac50891f7408f/internal_transactions

https://blockscout.com/poa/sokol/tx/0x60844c8e65d5c0cf2470f499be15355806a50e0c4a555457d3f8acfc85cc89dc/internal_transactions

RyRy79261 commented 5 years ago

image

RyRy79261 commented 5 years ago

@stanislaw-glogowski Please reopen the issue.

RyRy79261 commented 5 years ago

I have recreated the issue in the playground image

RyRy79261 commented 5 years ago

All the console logged estimate objects prior to the hash log had gas rates of 0 image (2)

RyRy79261 commented 5 years ago

The pseudocode for the repair is as follows:

if(networkId == 77 || networkId == 100){
   estimate.gasPrice = anyToBN(1000000000);
}

@stanislaw-glogowski Please apply this to the function that generates estimates in the relayer