nspcc-dev / neo-go

Go Node and SDK for the Neo blockchain
MIT License
123 stars 79 forks source link

Not all blocks are uploaded using `upload-bin` #3634

Closed AliceInHunterland closed 3 weeks ago

AliceInHunterland commented 3 weeks ago

Current Behavior

Searching for objects with block GE 70000 and LE 79999...
Found 9944 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 80000 and LE 89999...
Found 9903 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 90000 and LE 99999...
Found 10000 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 100000 and LE 109999...
Found 10000 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 110000 and LE 119999...
Found 9995 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 120000 and LE 129999...
Found 10000 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 130000 and LE 139999...
Found 10000 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 140000 and LE 149999...
Found 10000 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 150000 and LE 159999...
Found 10000 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 160000 and LE 169999...
Found 9998 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 170000 and LE 179999...
Found 9998 objects: Skipping batch as it matches or is less than the step size.
Searching for objects with block GE 180000 and LE 189999...
Found 10082 objects:

the https://github.com/nspcc-dev/neo-go/issues/3630 leads to more than 10000 objects found in the batch, but why do we sometimes have fewer?

Expected Behavior

Equal to the batchSize search results.

Possible Solution

the problem could be in https://github.com/nspcc-dev/neo-go/blob/e332c15e4f80609b7ae955d80c7a21fd224bc978/cli/util/uploader.go#L228

Steps to Reproduce

Searching in fschain mainnet container 5oAvDsnVcpGEf8KM4nxNB52wqZASjbr4CSszbW9iseCk