Skip to content

Update EIP-7885: Add nocgo/cgo implementation variants#5

Merged
simonmasson merged 1 commit intoZKNoxHQ:eip/NTT-proposalfrom
yhl125:eip/NTT-proposal
Dec 3, 2025
Merged

Update EIP-7885: Add nocgo/cgo implementation variants#5
simonmasson merged 1 commit intoZKNoxHQ:eip/NTT-proposalfrom
yhl125:eip/NTT-proposal

Conversation

@yhl125
Copy link
Copy Markdown

@yhl125 yhl125 commented Nov 20, 2025

Summary

Reorganize op-geth assets to support two NTT precompile implementation variants with updated specification documenting their performance characteristics and trade-offs.

Asset Structure Changes

  • Reorganize assets/eip-7885/op-geth/ into two subdirectories:
    • nocgo/ - Pure Go implementation with zero external dependencies
    • cgo/ - liboqs-based implementation for high performance
  • Both variants provide identical precompile interfaces at addresses 0x12-0x15
  • Separate benchmark results for each implementation

Specification Updates

Gas Cost Analysis

  • Add comparative table for both implementations:
    • Pure Go: Falcon-512 (790 gas), Falcon-1024 (1,750 gas)
    • liboqs: Falcon-512 (500 gas), Falcon-1024 (1,080 gas)
    • liboqs variant offers 36-38% lower gas costs for NTT operations

Documentation

  • Update Native Client Implementation section with both variants
  • Split benchmark links to variant-specific paths
  • Add direct links to all reference implementations (Python, Solidity, OP-Geth)
  • Remove external links

- Reorganize op-geth assets into nocgo/ and cgo/ subdirectories
- Update Gas Cost Analysis with comparative table for both variants
- Update Reference Implementation section with both variants
- Document Pure Go (nocgo) as default, liboqs (cgo) as high-performance option
- Remove external links
@simonmasson simonmasson merged commit 5d571d9 into ZKNoxHQ:eip/NTT-proposal Dec 3, 2025
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.

2 participants