You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While writing some tests for further Ethereum JSON-RPC coverage in the
"eth/rpc/rpcapi" directory, where an EVM transaction was successfully executed
with its txHash usable to retrieve the tx using "eth_getTransationReceipt".
import (
"github.com/ethereum/go-ethereum/ethclient""github.com/NibiruChain/nibiru/v2/eth/rpc/rpcapi"
)
typeSuitestruct {
ethClient*ethclient.Client// Import from geth based on Ethereum defaultsethAPI*rpcapi.EthAPI// Nibiru implementation
}
txHash, err:=s.ethAPI.SendRawTransaction(txBz)
s.Require().NoError(err)
_=s.network.WaitForNextBlock()
txReceipt, err:=s.ethClient.TransactionReceipt(blankCtx, txHash)
s.Require().NoError(err)
s.NotNil(txReceipt)
txHashFromReceipt:=txReceipt.TxHashs.Equal(txHash, txHashFromReceipt)
// 🚨🚨 Requesting with the same tx hash fails with "ethAPI" but succeeds with "ethClient".tx, isPending, err:=s.ethClient.TransactionByHash(blankCtx, txHash)
s.NoError(err)
s.NotNil(tx)
txJson, err:=s.ethAPI.GetTransactionByHash(txHash)
// ...
Ammendment - Date: 2024-09-11
If this test is done on a live node where the EVMIndexer is disabled, and you
query eth_getTransactionByHash from JS (ethers) with default settings, the TX
is returned successfully.
"But if I modify the config app.toml to enable-indexer = true, tx search
fails"
Takeaway: The EVM Indexer is not working properly.
Likely, it's not wired properly or enabled correctly on node start.
Possible Solution(s)
Add testnetwork integration tests that perform sanity check operations on the indexer. We need to verify that the indexer service starts properly and that CRUD works as transactions go through.
Unique-Divine
added
x: evm
Relates to Nibiru EVM or the EVM Module
S-triage
Status: This issue is waiting on initial triage. More Info: https://tinyurl.com/25uty9w5
and removed
S-triage
Status: This issue is waiting on initial triage. More Info: https://tinyurl.com/25uty9w5
x: evm
Relates to Nibiru EVM or the EVM Module
labels
Nov 12, 2024
Problem
While writing some tests for further Ethereum JSON-RPC coverage in the
"eth/rpc/rpcapi" directory, where an EVM transaction was successfully executed
with its
txHash
usable to retrieve the tx using "eth_getTransationReceipt".Ammendment - Date: 2024-09-11
If this test is done on a live node where the
EVMIndexer
is disabled, and youquery
eth_getTransactionByHash
from JS (ethers) with default settings, the TXis returned successfully.
Likely, it's not wired properly or enabled correctly on node start.
Possible Solution(s)
testnetwork
integration tests that perform sanity check operations on the indexer. We need to verify that the indexer service starts properly and that CRUD works as transactions go through.Version
A v2 pre-release
The text was updated successfully, but these errors were encountered: