Draft
Conversation
6454357 to
fe7d548
Compare
Port Go cbor_helpers.go patterns to Rust for building raw CBOR bytes directly without Filecoin type serializers. Includes helpers for all major CBOR types (uint64, int64, bytes, text, nil, bool, array), CID encoding, big integer bytes, and random CID generation. 19 tests covering all encoding paths.
…ypes Composite generators for Filecoin addresses across all five protocol types (ID, secp256k1, actor, BLS, delegated) plus invalid protocol edge cases. Includes placeholder modules for message and block generators.
Implement CBOR SignedMessage generator with fuzzed fields for Filecoin message format: array(2) [Message, Signature] where Message is array(10) with varied addresses, nonces, BigInt values, gas params, methods, and params. Includes edge-case generation for signatures with varied type bytes and lengths.
…ossipSub publishing
…Makefile integration - Multi-stage Dockerfile: Rust builder → Ubuntu runtime with Python+uv - Bash entrypoint waits for node multiaddr files before launching binary - docker-compose.yaml: hegel-workload service with devgen volume mounts - Makefile: build-hegel-workload target, added to build-all
- Replace fragile rand_byte() with getrandom::getrandom() for proper Antithesis-interceptable randomness in CID generation - Fix mesh_wait busy-poll: await mesh formation before entering main event loop instead of re-polling a completed Sleep future - Add depends_on lotus0 healthy to docker-compose service
…cit publish peers
Adds k256, blake2b_simd, and hex to Cargo.toml, creates the src/scenario/ module with placeholder types and actions files.
Add all creation action functions (pick_wallet, create_valid_transfer, create_nonce_reuse, create_gas_bump, create_nonce_gap, create_semi_valid_msg, create_fuzzed_msg, create_fuzzed_block) and the build_signed_msg helper. Includes 5 Hegel property-based tests covering nonce correctness, gas bumping, nonce gaps, and CBOR validity.
Add ScenarioIO type to hold I/O handles (P2P sender, RPC clients, runtime handle, topic names) separate from pure-data ScenarioContext. Delivery actions: publish_msg_p2p, publish_msg_rpc, publish_block_p2p. Observation actions: observe_chain_head, observe_nonce, observe_mempool, wait_for_inclusion, pause. Add base64 dependency for encoding signatures in RPC MpoolPush calls.
Add execute_step() and run_scenario() to the scenario module. The stepper draws a random action from those available in the current context, executes it via the corresponding action function, and updates the context with any results. RPC failures are silently skipped to handle Antithesis fault injection.
Load wallet keystore and create ScenarioIO in main, then run the composable scenario loop when wallets are available, falling back to flat generation otherwise. Also adds Antithesis assertions for key scenario events (RPC acceptance, nonce observation, on-chain inclusion, scenario completion).
- Encode message params as base64 in RPC JSON instead of hardcoded null - Rename "message included on-chain" assertion to "message left mempool" (leaving mempool doesn't guarantee inclusion — could be eviction) - Reduce wait_for_inclusion timeout from 60s to 20s to keep scenarios moving
The hegel-workload needs access to stress_keystore.json (generated by genesis-prep at /shared/configs/) to load wallet keys for signing valid transactions in composable scenarios.
The hegel-workload binary is now built and launched inside the combined workload image. Remove the standalone Dockerfile, entrypoint, compose service, Makefile target, and CI references that are no longer needed.
The Antithesis simulation has no internet access, causing hegel-workload to panic when hegeltest tries to download hegel-core from PyPI at runtime. Pre-install hegel-core into a venv at build time and set HEGEL_SERVER_COMMAND so hegeltest uses the local binary directly.
The Rust toolchain was accidentally removed when the Dockerfile was rewritten. filecoin-ffi requires cargo to build filcrypto from source.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is just a prototype/experiment to leverage Hegel's generators within an Antithesis workload. The primary use-case is to generate semi-plausible but semantically-invalid scenarios and ensure none of the SUT nodes crash/panic.