mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2026-03-01 04:28:51 +00:00
FindStates length != FindStorageByHashHistoric length for specific contract #1539
Labels
No labels
I1
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U3
U3
U4
blocked
bug
bug
cli
compiler
config
config
consensus
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
neotest
network
oracle
performance
question
rpc
security
smartcontract
task
task
task
test
vm
wallet
windows
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neo-go#1539
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ixje on GitHub (Jul 22, 2025).
Current Behavior
Using the same stateroot I get a different number of results while dumping all states related to a specific contract (
0x341cbe084b3b15fccf15064c7b7790f5f0f659d2). For other contracts it works as expected.Expected Behavior
I expect the length of the results of
FindStatesto equal that ofFindStorageByHashHistoricSteps to Reproduce
currently outputs
@ixje commented on GitHub (Nov 18, 2025):
So I'm running into this issue again, but now also to the point that it's returning duplicate keys where Csharp does not and as a result neo-express can't download the contract state using a neo-go node.
This
fails when using a neo-go node with the error
but this works with a neo-cli node
I did a little bit of high level investigation using this code and found that neo-go returns duplicate keys
For Csharp it indicates that the keys are unique. But for neo-go it indicates they are not unique and prints 58 duplicates.
Further more if I call findstates with these params (note: this was a print from neo-express)
then sort the keys and perform a diff, there is exactly 1 key different between neo-cli and neo-go in the first 100 results. The last 2 keys of the sorted results for neo-cli are
but for neo-go are
This might be a starting point for investigation.
@roman-khimov commented on GitHub (Nov 18, 2025):
Thanks a lot for info, it seems like some off-by-one error, we'll try to get to it soon.
@roman-khimov commented on GitHub (Nov 18, 2025):
Can also be related to #3103.
@ixje commented on GitHub (Nov 18, 2025):
That does look pretty related
Except this statement of anna doesn't seem to match anymore. If I don't manually sort the keys then the response is very different. Fwiw; the order didn't really affect me