trezor / blockbook

:blue_book: Trezor address/account balance backend
https://trezor.io
GNU Affero General Public License v3.0
663 stars 650 forks source link

Identical Ethereum servers showing different fees for a transaction #984

Closed mattmartinez closed 11 months ago

mattmartinez commented 1 year ago

First transaction from ETH server 1:

{"txid":"xxx","vin":[{"n":0,"addresses":["xxx"],"isAddress":true}],"vout":[{"value":"0","n":0,"addresses":["xxx"],"isAddress":true}],"blockHash":"xxx","blockHeight":17871195,"confirmations":613591,"blockTime":1691509691,"value":"0","fees":"4883600000000","ethereumSpecific":{"status":1,"nonce":3978,"gasLimit":49189,"gasUsed":48836,"gasPrice":"100000000","data":"0x095ea7b3000000000000000000000000df3309771d2bf82cb2b6c56f9f5365c8bd97c4f2000000000000000000000000000000000000000000000000003485f1f004af1b","parsedData":{"methodId":"0x095ea7b3","name":""}}}

Same transaction from ETH server 2:

{"txid":"xxx","vin":[{"n":0,"addresses":["xxx"],"isAddress":true}],"vout":[{"value":"0","n":0,"addresses":["xxx"],"isAddress":true}],"blockHash":"xxx","blockHeight":17871195,"confirmations":613595,"blockTime":1691509691,"value":"0","fees":"1550714490739504","ethereumSpecific":{"status":1,"nonce":3978,"gasLimit":49189,"gasUsed":48836,"gasPrice":"31753511564","data":"0x095ea7b3000000000000000000000000df3309771d2bf82cb2b6c56f9f5365c8bd97c4f2000000000000000000000000000000000000000000000000003485f1f004af1b","parsedData":{"methodId":"0x095ea7b3","name":""}}}

You can see that the "fees" and "gasPrice" are different despite both being the same transaction.. What could cause something like this? We're currently rebuilding the index of the first server to see if that solves it. We're speculating it could be an issue with Coingecko somehow. According to Etherscan the values listed are:

0.001550714490739504 is the fee 4883600000000 is the Gas usage

These values line up with the second server data but not the first server.

Thoughts?

mattmartinez commented 11 months ago

Update on this, on the effected EC2 instance we deleted the blockbook /db folder and let it rebuild the index from scratch. After it finished rebuilding the index we checked again and the return data matched our first EC2 instance and etherscan data expected.