sui icon indicating copy to clipboard operation
sui copied to clipboard

getTransactionsFromAddress and getTransactionsToAddress not working

Open li-shihao opened this issue 2 years ago • 3 comments

Steps to Reproduce Issue

Install sui fullnode using the official docs

Expected Result

Receiving a list of transactions involving accounts. Tried the exact same query using https://fullnode.devnet.sui.io/ and works

{
	"jsonrpc" : "2.0",
	"id": "1",
	"method": "sui_getTransactionsFromAddress",
	"params": ["0x5fe6daf1b84e52c2d1e8f77f3c7b0b148d771da1"]
}

Actual Result

{
	"jsonrpc": "2.0",
	"result": [],
	"id": "1"
}

System Information

  • OS: 5.18.16-arch1-1
  • Compiler: rustc 1.63.0 (4b91a6ea7 2022-08-08)

li-shihao avatar Sep 05 '22 15:09 li-shihao

Update: okay, so it appears that only transactions that take place after the full node starts to run are included in the result of the above two calls, even though this behavior is not exhibited in account balance, account objects and others.

Is this intended or does that mean that each time devnet is wiped we must update our fullnodes ASAP in order to get correct results?

li-shihao avatar Sep 06 '22 06:09 li-shihao

Is this intended or does that mean that each time devnet is wiped we must update our fullnodes ASAP in order to get correct results?

When devnet is wiped, you should re-install fullnode form the latest sources. (Sometimes, older software will continue working, but it isn't guaranteed).

Additionally, you must wipe the fullnode's data directory when devnet is wiped. Fullnode tracks the state of the network and isn't designed to detect network wipes. Obviously in main net there never will be a network wipe, so we don't want to add code to support that.

mystenmark avatar Sep 09 '22 16:09 mystenmark

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Nov 09 '22 02:11 github-actions[bot]