You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given hashes [0x00, 0x01, ..., 0x0e, 0x0f], we should expect the following results:
BlockLocator created with sampleAfter value 0: [0x0f, 0x0e, 0x0c, 0x08, 0x00]
BlockLocator created with sampleAfter value 1: [0x0f, 0x0e, 0x0d, 0x0b, 0x07, 0x00]
Current actual value: [0x0f, 0x0e, 0x0c, 0x08, 0x00]
BlockLocator created with sampleAfter value 2: [0x0f, 0x0e, 0x0d, 0x0c, 0x0a, 0x06, 0x00]
Current actual value: [0x0f, 0x0e, 0x0d, 0x0b, 0x07, 0x00]
In the last example above, [0x0f, 0x0e] would correspond to non-sampled indices and and [0x0d, 0x0c, 0x0a, 0x06, 0x00] would correspond to sampled indices. From my perspective, there are two problems with current implementation:
There is no difference between BlockLocator created with sampleAfter value of 0 and 1.
The initial delta of indices for "sampling" starts with 2 not 1.
Given starting index $n$, I think the cleanest way to define the act of "sampling indices" would be the following:
Given hashes
[0x00, 0x01, ..., 0x0e, 0x0f]
, we should expect the following results:BlockLocator
created withsampleAfter
value0
:[0x0f, 0x0e, 0x0c, 0x08, 0x00]
BlockLocator
created withsampleAfter
value1
:[0x0f, 0x0e, 0x0d, 0x0b, 0x07, 0x00]
[0x0f, 0x0e, 0x0c, 0x08, 0x00]
BlockLocator
created withsampleAfter
value2
:[0x0f, 0x0e, 0x0d, 0x0c, 0x0a, 0x06, 0x00]
[0x0f, 0x0e, 0x0d, 0x0b, 0x07, 0x00]
In the last example above,
[0x0f, 0x0e]
would correspond to non-sampled indices and and[0x0d, 0x0c, 0x0a, 0x06, 0x00]
would correspond to sampled indices. From my perspective, there are two problems with current implementation:BlockLocator
created withsampleAfter
value of0
and1
.2
not1
.Given starting index$n$ , I think the cleanest way to define the act of "sampling indices" would be the following:
Or in a more compact form:
Or in a closed form:
The text was updated successfully, but these errors were encountered: