Skip to content

Protocol Tracker #613

Open
Open

Description

@Purdze

Pomme's traffic is checked against real vanilla 26.2 traffic by capturing both through a proxy and diffing them packet by packet, grouped by client tick. This issue tracks the conformance gaps that check has found, and the scenarios that still need a Pomme capture, so the work is visible in one place and not rediscovered per PR.

Findings are produced with Peel. Its fixtures/26.2/ holds vanilla captures of five scenarios, with the setup and the steps for each in fixtures/README.md: a flat GameTestServer world on seed 0, offline mode, vanilla's default options. Record Pomme on that same setup, swapping the vanilla client for ours, or the diff reports the differences in setup as well:

just fixture-server <server.jar>     # terminal 1
just fixture-capture <scenario>      # terminal 2
# terminal 3: join 127.0.0.1:25566 with Pomme, follow the scenario's steps
peel diff <scenario>.trace --against fixtures/26.2/<scenario>.trace

Traces can also be opened and compared in the browser at peel.pomme.rs; they are decoded locally and never uploaded. A finding should name the packet, the tick it appears in on each side, and the reference class that decides the behaviour, so it can be checked without re-running the capture.

What counts as a conformance bug

Being faster than vanilla is fine. Skipping vanilla's conditions is not.

  • A trace diff that differs only in tick numbers is not a bug. Pomme reaches some states sooner because it does the same work faster, and hand-played captures never agree on tick numbers anyway.
  • A condition that was skipped rather than met faster is a bug. So is a changed packet order, and anything acted on before its precondition holds (faster attack rate, quicker block breaking, acting on chunks that are not loaded yet).
  • Differences that are intentional are listed at the bottom. Please check that list before filing.

Join sequence

From walking.trace. The Pomme side of this one was captured against a different server than the fixture, so it is worth re-running on the fixture setup before reading anything further into its chunk pacing.

  • select_known_packs replies with an empty list, so the server sends full registry data instead of skipping what the client already has. Vanilla replies with the offered packs it holds (KnownPacksManager.trySelectingPacks). Fixed for 26.2 in claim the core pack in select_known_packs #614.
    • Known-pack tables for the other versions, 26.3 included: they still reply with an empty list
  • set_carried_item is sent once on join. Vanilla only sends it when the selected slot changes (MultiPlayerGameMode.ensureHasSentCarriedItem, carriedIndex starts at 0). Covered by align vanilla packet lifecycle ordering #609.
  • player_loaded is sent several ticks early, and movement starts with it. Vanilla gates it on LevelLoadTracker, which align vanilla packet lifecycle ordering #609 implements. Conditions from that class worth confirming end up covered:
    • the LEVEL_CHUNKS_LOAD_START game event, which moves the tracker from waiting-for-server to waiting-for-player-chunk
    • SectionUpdateTracker.hasAllNeighbors: the camera section's 3x3 column neighbourhood loaded and light-enabled before that section may first compile. This accounts for most of the gap in the capture. Readiness now waits on it; compiles are still not gated (TODO in in_game.rs)
    • the section's geometry reaching the GPU, not just being built
    • the camera position rather than the player's feet
    • re-arming on respawn and dimension change
  • accept_teleportation is answered on the network thread, so it overtakes chunk batch acknowledgements. Vanilla defers handleMovePlayer to the main thread and sends the acknowledgement and its position echo together, while answering chunk batches inline. Covered by align vanilla packet lifecycle ordering #609.
  • chunk_batch_received asks for max(batch_size, 25) chunks per tick. Vanilla runs ChunkBatchSizeCalculator, which opens at 3.5 and ramps from measured time per chunk. This changes how fast the world streams in on join. Ported in net/chunk_batch.rs.

Gameplay actions

Vanilla fixtures for these already exist in Peel; what is missing is a Pomme capture of each and a diff. This is where "faster than vanilla" stops being harmless, so these matter more than the join sequence.

Clientbound handling

Compared with peel diff --all. Packets Pomme never handles are invisible to a serverbound diff, so they are listed here rather than discovered later.

  • Play-phase ping gets no pong, and configuration-phase ping is unhandled too. No handler exists in net/handler.rs or net/connection.rs. align vanilla packet lifecycle ordering #609 adds a Ping event; the reply now goes out from the main thread, and config pings are answered inline
  • update_tags is logged and dropped in configuration, and unhandled in the game phase. Pomme carries its own block tables, so decide whether tags are needed at all and record the answer either way. Block, item and dialog tags are now forwarded in both phases (block tags drive climbing and physics)
  • Audit the rest of the clientbound catch-all: list what falls through the _ => {} arm and mark each as needed or deliberately ignored

Older wire versions

Translation gaps for pre-26.2 servers are marked // TODO: at the rewriter in pomme-client/src/net/translate.rs and listed in that module's per-version changelog. They have not been trace-checked yet. Peel covers every version from 1.20 through 26.3 and ships 26.3 fixtures as well, so the same scenarios can be run per version.

  • Capture and diff one join per supported protocol, starting with 1.21.8 and 1.20.1
  • 26.3 against fixtures/26.3/ (join 26.3 servers #591 merged, joins work)

Intentional differences

These are not bugs and should not be filed:

  • custom_payload brand is pomme
  • client_information fields follow the user's own settings, so view distance and language differ per machine. The defaults match vanilla's
  • Pomme's own menus and panorama are deliberately not vanilla

Related work

This issue tracks what a capture can settle. The behaviour work behind these packets is tracked separately:

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions