neo-go
neo-go copied to clipboard
Do not reupload existing blocks to NeoFS block storage
Is your feature request related to a problem? Please describe.
Currently upload-bin finds latest incomplete batch of blocks and starts reuploading from the first block in this batch. Due to https://github.com/nspcc-dev/neo-go/issues/3647#issuecomment-2444172577 objects with the same block index but different OIDs may be created using this way of uploading.
Describe the solution you'd like
Don't upload the same block twice. Instead, search for the latest incomplete batch, then search for the missing block indexes in this batch and upload only missing blocks.
Describe alternatives you've considered
Leave it as is. It works, but a lot of useless duplicating objects are created which makes SEARCH request slower.