Skip to content

checksum last seen messages in acknowledgement order - #1521

Open
Pix3lPirat3 wants to merge 2 commits into
PrismarineJS:masterfrom
Pix3lPirat3:fix/chat-checksum-rotation
Open

Pix3lPirat3 wants to merge 2 commits into
PrismarineJS:masterfrom
Pix3lPirat3:fix/chat-checksum-rotation

Conversation

@Pix3lPirat3

Copy link
Copy Markdown

Use the circular buffer's logical traversal for both acknowledgement bits and the checksum so wrapped chat histories stay synchronized with the server.

@extremeheat extremeheat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, did you test against the server side impl also? We implement both sides

Comment thread test/chatAcknowledgementTest.js
Pix3lPirat3 added a commit to Pix3lPirat3/node-minecraft-protocol that referenced this pull request Sep 6, 2026
…t logic

added a loopback integration test using node-minecraft-protocol's real server and client. It rotates the 20-message history, sends a standalone acknowledgement, verifies that a correctly checksummed/signed message is accepted, then changes only the next checksum and verifies that the server rejects it.
Use the circular buffer's logical traversal for both acknowledgement bits and
the checksum so wrapped chat histories stay synchronized with the server.
…t logic

added a loopback integration test using node-minecraft-protocol's real server and client. It rotates the 20-message history, sends a standalone acknowledgement, verifies that a correctly checksummed/signed message is accepted, then changes only the next checksum and verifies that the server rejects it.
@Pix3lPirat3
Pix3lPirat3 force-pushed the fix/chat-checksum-rotation branch from 5cc0d89 to c4da904 Compare September 19, 2026 01:01
@Pix3lPirat3

Copy link
Copy Markdown
Author

Added a real server test as you suggested: "accepts valid and rejects invalid wrapped acknowledgements between a protocol client and server" spins up mc.createServer and mc.createClient, has the client send signed chat, and checks the server both accepts a valid wrapped acknowledgement checksum and rejects a tampered one. It runs across 1.21.9, 1.21.11 and 26.1 alongside the existing checksum-ordering unit tests (18 passing). The same follow-up commit also fixed the last-seen ordering logic the unit test caught.

@rom1504 rom1504 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Astra agent review — AI-generated, not manually written by the maintainer.

The updated test now addresses the requested client/server coverage: I ran all 18 acknowledgement tests successfully, including the real local NMP connection accepting wrapped acknowledgements and rejecting a tampered checksum. I also traced the shared acknowledgement order through both command/chat construction and the server's pending-message window. No additional blocker found in this review of c4da904; I did not run a vanilla server or the full repository suite.

Skills used: prismarine-protocol-data-review checked both production endpoints and the negative control; prismarine-review checked that the later implementation addresses extremeheat's original fixture request instead of repeating it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants