Skip to content

OPP now generates ZPP via opp_cdt_models target#266

Open
jglanz wants to merge 14 commits intomasterfrom
feature/protobuf-support-for-opp
Open

OPP now generates ZPP via opp_cdt_models target#266
jglanz wants to merge 14 commits intomasterfrom
feature/protobuf-support-for-opp

Conversation

@jglanz
Copy link
Copy Markdown
Collaborator

@jglanz jglanz commented Mar 19, 2026

Summary

OPP now generates ZPP via opp_cdt_models target

@jglanz jglanz requested a review from heifner March 19, 2026 22:31
@jglanz jglanz force-pushed the feature/protobuf-support-for-opp branch 3 times, most recently from ebecdf9 to bacf8f7 Compare March 20, 2026 00:28
jglanz and others added 11 commits April 3, 2026 15:34
- Replace std::map with std::vector<std::pair> in operator_info
- Replace equal_range with lower_bound iteration (CDT limitation)
- Add pre-built .wasm/.abi for sysio.epoch, sysio.msgch, sysio.uwrit, sysio.chalg

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…upport

- Introduced `underwriter_plugin` to enable cross-chain swap validations for Ethereum and Solana.
- Added collateral tracking, fee configuration, and greedy knapsack selection for optimal underwriting.
- Integrated external chain validation using Ethereum and Solana plugins.
- Implemented intent submission, table reading, collateral updates, and confirmation checks.
…epoch processing, batch operation, and external chain validation**

### Summary of Changes

**Contracts and Plugins:**
1. **Chain Plugin:**
   - Added conditional default BLS key auto-registration only for producer nodes to avoid configuring finalizers for irreversible mode.
   - Enhanced validation requiring the presence of a BLS key during genesis initialization when no `--genesis-json` is provided.
   - Introduced a safer query mechanism for signature providers, ensuring no assumptions about configuration states.

2. **Batch Operator Plugin:**
   - Added robust epoch state parsing with new group assignment logic and state-change validations.
   - Modularized polling logic (`parse_epoch_state` and cranking refinements).
   - Improved outpost loading with better enum serialization.
   - Extended `push_action` to use accurate ABI resolution and properly signed transactions.

3. **Ethereum Interoperability:**
   - Documented configuration and usage of the `outpost_ethereum_client_plugin`.
   - Enhanced contract interaction via Ethereum/Solana plugin integration.

**Contract Enhancements:**
4. Updated system contracts (`sysio.msgch`, `sysio.epoch`, `sysio.uwrit`, `sysio.chalg`):
   - Refactored contract table indexing, validation, and setup.
   - Introduced improved namespace scoping.
   - Enforced active batch-operator group checks on critical actions.
   - Enhanced epoch advancement logic to handle un-initialized values gracefully.

5. Cleaned up redundant constants and aligned with namespace best practices.

**Build System & Configuration:**
6. Resolved inconsistent contract directory formatting in CMakeLists for all system contracts.
7. Improved directory pollution handling and warnings for missing build artifacts.
8. Updated `.gitignore` with additional temporary and auto-generated artifacts.

**Bug Fixes and Stability:**
9. Addressed CDT-related WASM compilation limitations (`std::map` -> `std::vector`, `lower_bound`).
10. Handled improper table property checks (`is_array` validation fixes for ABI contracts).

**Miscellaneous:**
11. Added documentation for the Outpost Client plugins.
12. Cleaned up legacy headers and files across plugins and libraries.
13. Introduced more ergonomic protobuf-based workflows for ZPP/OPP.

This update ensures better modularity, robust error handling, alignment with CDT WASM requirements, and extended support for cross-chain functionality.
@jglanz jglanz force-pushed the feature/protobuf-support-for-opp branch from 2bcb526 to 64347a9 Compare April 3, 2026 19:36
jglanz added 3 commits April 5, 2026 15:40
… Updates**

### Overview of Changes

**Batch Operator Plugin:**
1. Added **Batch Operator Group Assignment Logic** for managing epoch-specific operator configurations:
   - Introduced `BatchOperatorNextGroup` protobuf message for assigning operators to the next group and epoch.
   - Enhanced epoch cycle management with group validation before batch operations.
   - Added delivery timeout and epoch polling constants to reduce configuration overhead.

2. Improved **Ethereum Client Integration:**
   - Enhanced ABI loading with address propagation for contract-level grouping.
   - Refined transaction handling for Ethereum OPP interactions, skipping invalid epoch finalizations seamlessly.
   - Improved ABI enum parsing and event query logic, ensuring alignment with contract configuration.

**System Contract Updates:**
3. Significant updates to **sysio.msgch** and **sysio.epoch:**
   - Converted key table attributes (statuses, types, directions) to enums for better clarity and safer ABI interactions.
   - Enhanced attestation queuing for outposts with new epoch-based batching.
   - Enforced batch-operator validation on contract actions (`crank`, `queuereq`, etc.).
   - Integrated `current_epoch_index` logic directly into message queue actions for real-time epoch consistency.

4. Added logic to queue `ATTESTATION_TYPE_BATCH_OPERATOR_NEXT_GROUP` attestations to sysio.msgch in the epoch advancement process.

**Protobuf and ABI Enhancements:**
5. Updated **types.proto** and related protobuf messages:
   - Introduced `ATTESTATION_TYPE_BATCH_OPERATOR_NEXT_GROUP` (0xEE0F).
   - Added new enums for message status and attestation processing.

6. Enhanced `abi_serializer` to handle enum-to-integer and string conversions more gracefully.

**CMake/System Build Adjustments:**
7. Fixed polluted path variables in CMake dependencies.
8. Improved debugging clarity for custom build environments in documentation.

**Documentation Adjustments:**
9. **CLAUDE.md**: Updated build instructions to mandate build directory under `<wire-sysio>/build/` for uniformity.
10. Added troubleshooting steps for `linuxbrew` conflicts and consistent dependency resolution.

This commit introduces robust group-based batch operator logic, streamlines contract enums for better type safety, and refines Ethereum/Solana cross-chain interoperability with ABI and contract bug fixes.
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