Skip to content

python: add new pigeonhole API#43

Open
david415 wants to merge 97 commits intomainfrom
update_python_pigeonhole
Open

python: add new pigeonhole API#43
david415 wants to merge 97 commits intomainfrom
update_python_pigeonhole

Conversation

@david415
Copy link
Member

@david415 david415 commented Feb 7, 2026

No description provided.

…cancel tests

- Add error codes 14-24 to Rust thin client (matching Go daemon)
- Fix Python error strings for codes 19/20 to match Go
- Add unit test for error code completeness (no daemon required)
- Add integration tests for cancel_resending
- Add PigeonholeGeometry to ConfigFile and Config structs
- Fix serde rename to use MaxPlaintextPayloadLength (matching Go)
- Add ThinClient::pigeonhole_geometry() accessor method
- Update testdata config to match generated mixnet config
- Fix tombstone tests to use geometry from config instead of hardcoded values
The replica_epoch is already embedded in the EnvelopeDescriptor,
making the parameter redundant.

- Python: Remove replica_epoch from encrypt_read, encrypt_write,
  start_resending_encrypted_message, and tombstone_box
- Rust: Remove replica_epoch from structs and function signatures
- Tests: Update all call sites to use new API signatures
- Fix cancel tests: Reduce sleep time to 0.1s to call cancel before
  mixnet ACK arrives
david415 added 9 commits March 6, 2026 21:32
- Add BoxNotFound, InvalidBoxId, InvalidSignature, and other replica
  error variants to ThinClientError enum
- Add error_code_to_error() function matching Go's errorCodeToSentinel
- Update start_resending_encrypted_message to return specific errors
- Export ThinClientError from crate root
- Update copycat receive to match on BoxNotFound for graceful retries
@david415 david415 force-pushed the update_python_pigeonhole branch from 879c046 to e0a3ba2 Compare March 6, 2026 22:28
david415 added 20 commits March 7, 2026 08:46
…pted_message

Port Go thin client flags to Python:
- Add no_retry_on_box_id_not_found and no_idempotent_box_already_exists params
- Add start_resending_encrypted_message_no_retry convenience method
- Add start_resending_encrypted_message_return_box_exists convenience method
- Update tests to use new methods and catch StartResendingCancelledError
- Add no_retry_on_box_id_not_found and no_idempotent_box_already_exists flags
- Add start_resending_encrypted_message_no_retry() method
- Add start_resending_encrypted_message_return_box_exists() method
Tombstones are now defined as valid signatures for zero-length payloads,
not payloads filled with zeros.

- Remove obsolete tombstone_plaintext and is_tombstone_plaintext functions
- Add tombstone_at and tombstone_from methods to ChannelHandle
- Update tests to verify tombstones have empty content
- Add write_box_return_box_exists for non-idempotent writes
- Add read_box_no_retry for immediate BoxIDNotFound errors
- Add send_return_box_exists for high-level non-idempotent sends
- Add receive_no_retry for immediate BoxIDNotFound on receive
- Add tests for all new methods
Instead of sleeping and hoping the daemon has registered the
start_resending request, retry cancel until start_resending
returns. This handles the race where cancel arrives before
the daemon has added the envelope to arqEnvelopeHashMap.
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.

1 participant