Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support unsigned 64-bit integers for sequence numbers #50

Closed
JohnGreenan opened this issue Mar 13, 2023 · 2 comments · Fixed by #52
Closed

Support unsigned 64-bit integers for sequence numbers #50

JohnGreenan opened this issue Mar 13, 2023 · 2 comments · Fixed by #52
Assignees

Comments

@JohnGreenan
Copy link

JohnGreenan commented Mar 13, 2023

Per https://www.fixtrading.org/groups/continuousmkts/
Sequence number resets are a bore.

The implementation proposed is to use an unsigned 64 bit integer for a sequence number.

Using 1 billion sequence numbers per second, that will last for 584 years until they run out.

So we can leave the problem to our great, great, great (more) grandchildren to solve!

Would be good to include a set of test cases so that testing with a counterpart engine that maybe uses an int32 or uint32 can be picked up quickly. And cover all the other firles that use the seqnum "datatype"

Describe alternatives you've considered
See attached "Continuous Markets WG- 24x7 FIX Best Practise Working Draft_v0.015.docx"
Continuous Markets WG- 24x7 FIX Best Practise Working Draft_v0.015.docx
delete_me

da4089 added a commit that referenced this issue Mar 16, 2023
There's no internal arithmetic or other operations that use the values
of SeqNum fields.  And Python's integers will scale transparently from
fixed length to arbitrary length as required.

Added test cases for both encoder and decoder, checking that it can
handle values up to 2**64, which (per the bug report) is a billion
messages a second for 584 years, so ... all good.
@da4089
Copy link
Owner

da4089 commented Mar 16, 2023

@JohnGreenan thanks for the report.

Looks like there's no problem with 64 bit (or larger) sequence numbers, but I've added unit tests to ensure that any future changes don't break that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants