Cardano: Aiken contract scaffold (Endpoint, ULN302, Executor, DVN)#16
Cardano: Aiken contract scaffold (Endpoint, ULN302, Executor, DVN)#16tiljrd wants to merge 72 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…ld capitalized lib files
…nd module aliasing
…spend signature) and import cardano/transaction
…1) to satisfy parser
…m_int_big_endian and concat()
…s; replace concat_list with nested bytearray.concat
…dd basic codec tests
…0,12); aiken check passes
…ire into uln302_receive CommitVerification/Verify; add tests for header assertion
…m schemas; note new ULN302 Send/Receive and DVN tests
…sertion tests (accept/reject)
…cept with empty/some native drops)
…velace; add negative test for insufficient funds
… before decrement; aiken check passes
…ar in uln302_receive)
…fold; fix lambda body; keep signers_within_set clean
…ace list.find_map with fold; enforce atomic Endpoint.Verify; fix pattern matches
…d in find_sigs; tidy braces; compile cleanly
…inor parser fixes
… at prev nonce) and curr output (executed=False at current); enforce atomicity with Endpoint.LzReceive
…(uln302_send): enforce fee outputs to configured VKHs
… confirmations from Receive config; maintain Endpoint.Verify atomicity
…routing, and Executor/Endpoint atomicity
…st Executor tests for fee output and endpoint IO atomicity
…ure (quorum=1) using SigsDatum + DVN ref input
…ication semantics
…rs to silence warnings (no logic change)
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||
User description
Cardano: Aiken contract scaffold (Endpoint, ULN302, Executor, DVN)
Summary
This PR implements a complete scaffolding of LayerZero V2 contracts for Cardano using Aiken, adapting the EVM protocol to work with Cardano's eUTXO model. The implementation includes:
Review & Testing Checklist for Human
aiken checkand execute tests to ensure all validators compile and basic functionality worksRecommended Test Plan:
aiken check(should pass with 0 errors)Diagram
%%{ init : { "theme" : "default" }}%% graph TD types["lib/layerzero/types.ak<br/>Core Protocol Types"]:::major-edit codec["lib/layerzero/codec.ak<br/>Header Encode/Decode"]:::major-edit constants["lib/layerzero/constants.ak<br/>Protocol Constants"]:::major-edit endpoint["validators/endpoint.ak<br/>Main Entry Point"]:::major-edit uln_send["validators/uln302_send.ak<br/>Outbound Messages"]:::major-edit uln_recv["validators/uln302_receive.ak<br/>Inbound Verification"]:::major-edit dvn["validators/dvn.ak<br/>Attestation Network"]:::major-edit executor["validators/executor.ak<br/>Message Execution"]:::major-edit helpers_ep["lib/layerzero/endpoint_helpers.ak<br/>Nonce & State Utils"]:::minor-edit helpers_dvn["lib/layerzero/dvn_helpers.ak<br/>Quorum Logic"]:::minor-edit tests["tests/*.tests.ak<br/>Unit Test Suite"]:::major-edit readme["README.md<br/>Architecture Docs"]:::minor-edit types --> endpoint types --> uln_send types --> uln_recv types --> dvn types --> executor codec --> uln_send codec --> uln_recv codec --> tests constants --> codec helpers_ep --> endpoint helpers_dvn --> dvn dvn --> uln_recv uln_recv --> executor subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
PR Type
Enhancement
Description
Complete Aiken-based LayerZero V2 implementation for Cardano
Core validators: Endpoint, ULN302, Executor, DVN with eUTXO adaptation
Packet header codec maintaining EVM compatibility
Comprehensive test suite with multisig verification
Diagram Walkthrough
File Walkthrough
1 files
Add comprehensive project documentation1 files
Initialize Aiken project configuration10 files
Define core LayerZero protocol typesImplement packet header encoding/decoding functionsAdd protocol constantsAdd endpoint state management utilitiesAdd DVN multisig and quorum logicImplement main endpoint validatorImplement outbound message validatorImplement inbound verification validatorImplement commit-and-execute validatorImplement decentralized verification network validator9 files
Add codec round-trip testsAdd endpoint helper function testsAdd endpoint validator testsAdd ULN302 send validator testsAdd ULN302 receive validator testsAdd ULN302 commit verification testsAdd executor commit-and-execute testsAdd DVN admin operation testsAdd DVN execution and multisig tests