sui
sui copied to clipboard
sui_getEvents ascending order, cursor pagination not working. many transactions missing
Steps to Reproduce Issue
I used sui_getEvents RPC endpoint to fetch first 10 records initially, then pass the nextCursor to cursor like "{ "txSeq": 4516692, "eventSeq":6 }" . But I didn't get full events. some event data missed. So didn't get the some transaction
e.g.
{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_getEvents",
"params": [
{
"MoveModule": {
"package": "0x5eeb79fe18f214fcf1bcdb0cf65ef268e4ffc713",
"module": "proxy"
}
},
null,
10
]
}
Problem is in fetching ascending order with cursor and MoveModule . Some transaction in a same package and module not getting
I am observing the same issue.
https://explorer.sui.io/transaction/BrHucLA3jcwsPZ5xFWvoENctYMzegQnQpYxQM9U41XSs?network=devnet
This tx has associated MoveEvents:

However, using WS subscribe events or sui_getEvents RPC with filters
const { data, nextCursor } = await this.client.provider.getEvents(
{
MoveModule: {
package: "0xa976f024a87b6f03bf19f0cf0aa94fe173963d6a",
module: "ob",
},
},
null,
100,
"ascending"
);
doesn't return the events. Using "@mysten/sui.js": "^0.24.0" and devnet version is 0.23.0.
Here's the source code for the transaction: https://github.com/Origin-Byte/nft-protocol/blob/0fd7ac007d8be3cfb50629bad411236f97071406/sources/trading/ob.move#L185
When running the same code against a local validator, I observed some errors in the console related to events and objects not being found. In this tx, I am deleting two objects, one is wrapped by another, both being deleted. In previous versions (I wanna say 0.21.0), this behaviour caused my local validator to crash. This was fixed with 0.21.1.