HIP-23: Istanbul DeFi Application Patterns v1.1 (spec, tests, audit package)#8
HIP-23: Istanbul DeFi Application Patterns v1.1 (spec, tests, audit package)#8Moskyera wants to merge 13 commits into
Conversation
HIP-23: Istanbul DeFi Application Patterns v1.1
|
We do not recommend placing too many scattered documents and tests directly into the main development code repository. Documentation should be stored in the github.com/hacash/doc repository, with each document focusing on a single goal or topic. Integration tests should be kept in a separate project repository, while the dev repository should only contain necessary unit tests, avoiding comprehensive functional testing. Documents can be split into individual topic-based files and then submitted to the doc repository. |
|
Once the content stabilizes, the existing dev/doc documentation will also be moved into the hacash/doc repository. |
|
Closing: content relocated to hacash/doc and hip23-integration per maintainer feedback. |
|
Thanks @jojoin restructuring per your guidance. Documentation hacash/doc#5 (\HIP/protocol/hip-23/, one topic per file) Integration tests Moskyera/hip23-integration (87 tests + proptest, separate from fullnodedev) This PR is closed; HIP-23 content has been removed from \hip-23-draft\ on fullnodedev. No consensus or dev-repo changes needed. |
Summary
Proposes HIP-23 a post-Istanbul application / integration standard for reusable DeFi composition patterns on Hacash.
No consensus fork. No new action kinds, fork heights, or protocol rule changes. This PR adds normative documentation, JSON templates, an audit package, integration tests, and CI all against existing Istanbul machinery (
Type3,TexCellAct, guards, AST,AssetCreate).Status: v1.1 Ready
Activation context: Istanbul @ mainnet height
765432(ONLINE_OPEN_HEIGHT)Patterns (P1–P5)
| ID | Pattern |
| P1 | Atomic multi-asset TEX swap |
| P2 | Time-boxed guarded payment (
HeightScope) || P3 | BalanceFloor protected transfer |
| P4 | HIP20 issuance + TEX distribution (two-tx) |
| P5 | AST conditional settlement |
What's included
Specification
doc/HIP23.mdnormative MUST/SHOULD rulesdoc/HIP23_templates.mdcopy-paste-safe JSON templatesAudit / integrator package
doc/HIP23_threat_model.md,HIP23_invariants.md,HIP23_requirements_traceability.md(26/26 MUST traced)doc/HIP23_wallet_checklist.md,HIP23_indexer_dictionary.mddoc/HIP23_audit_scope.md,HIP23_audit_findings.md,HIP23_external_audit_brief.mdSECURITY.mdTests & tooling
tests/fixtures/hip23_test_vectors.jsontests/common/hip23_errors.rsproptest, 9 properties × 64 cases)fuzz/fuzz_targets/tex_cell_act_parse.rs.github/workflows/hip23.ymlTest gate
87 named tests + 9 proptest properties. CI green on fork.
Explicitly out of scope
Reviewer notes
fast_sync=truefor pattern semantics;hip23_production_pathandhip23_audit_strictusefast_sync=falsefor signature / duplicate-tx checks.protocol_costMUST equalgenesis::block_reward(height)at inclusion height (not a fixed literal).Commits
10 commits on
hip-23-draft(spec → adversarial/stress → audit package → production-path/proptest → accepted-limitations closure).Happy to split into doc-only + tests/CI if maintainers prefer smaller review chunks.