Closed billyadelphia closed 2 years ago
Hi billyadelphia, could you please provide more detailed information, like your environment config, the command you ran and the error message?
@Loverush it just RPC call, example like this
example with web3 js
web3.eth.call({
to: "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", // contract address
data: "0xc6888fa10000000000000000000000000000000000000000000000000000000000000003"
}, "pending")
.then(console.log);
> "0x000000000000000000000000000000000000000000000000000000000000000a"
I'ts not about any error, but with pending
as the 2nd parameter, the return value should be state on pending transactions, rather than from latest block.
For example, I send a transaction that changed the a value on the contract. If I use "pending" as the parameter, the return value should be the new value even if that transaction isn't confirmed yet. But on BSC the state changes only if the transaction is confirmed.
@billyadelphia Yes, to improve the performance, we had made some changes. Now both eth.getBlock('pending') and eth.getBlock('latest') will return the latest block. For more information, you can refer to #358.
@Loverush I want that feature to be able to check state on the pending transactions. It is possible if I change some code to enable that feature for my own build of geth ?
@billyadelphia You can try to compare geth miner module with BSC miner module and do some modification. PLEASE NOTE, this may lead to other bugs, I'm not sure.
Does enabling the --mine flag fixes the issue ?
@billyadelphia did you manage to make the changes ?
Using the --mine flag didn't work and resulted in corrupted node. How can I access the pending block?
@DawkliCrypto @ofarukcaki , I gave up, modifying the code didn't help me.
@Loverush can I request to re-enable this feature ? Some people need this. The feature doesn't have to be enabled by default, only if we specify a flag like --enable-pending-block
358
Did you able to find a solution to this problem yet?
It does not make any sense to make such critical change on the codebase. BSC fork of the geth is full of problems
Is there any solution now?
I tried to check the state changes on the pending transactions using
eth_call
RPC withpending
as the block parameter, it doesn't seem to work on geth BSC. It works fine on GETH for Ethereum. Does BSC change anything regarding of this capability ?