Serialize constant-width integers #41
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-contract#41
Loading…
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?
Lets introduce util helpers to serialize integers using constant amount of bytes.
container.DeletionInfo
struct uses epoch and is serialized using variable number of bytes. The problem is when this number changes between test invocation and persist. It can happen only 7 times throughout the network lifetime, so not is that big a deal. But it seems easy to support and also backward compatible (native serialization just strips leading zeroes).I believe we also have 2-bytes sequences somewhere.
As alternative, client can increase fee on
container.Delete
and similar operations (fee difference shouldn't be quite large for 1 bit value and 128 bit value, I suppose). But proposed solution is cleaner to me.@fyrchik do we have other functions similar
container.delete
depend on the epoch?