tutus-chain/pkg/core/native/native_test
Tutus Development 961c17a0cc Add Ancora native contract for off-chain data anchoring
Implement ADR-004 Phase 1 - the Ancora (Latin for "anchor") contract
provides Merkle root anchoring for off-chain data with proof verification:

Core Features:
- Data root management: Track Merkle roots per VitaID and DataType
  (Medical, Education, Investment, Documents, Custom)
- Provider registry: Committee-managed authorization for data providers
  with rate limiting and cooldown periods
- Proof verification: Verify Merkle proofs against anchored roots
  supporting SHA256, Keccak256, and Poseidon algorithms
- GDPR erasure: Right-to-be-forgotten workflow with pending/confirmed/denied
  status and configurable grace periods
- Data portability: Generate attestations for cross-system data transfer

Contract Methods:
- registerProvider/revokeProvider: Committee authorization for providers
- updateDataRoot: Anchor new Merkle root with version tracking
- verifyProof: Validate leaf inclusion against anchored root
- requestErasure/confirmErasure/denyErasure: GDPR erasure workflow
- generatePortabilityAttestation: Data portability support

Cross-Contract Integration:
- Vita: Identity verification via ExistsInternal/OwnerOfInternal
- Tutus: Committee authority for provider management

State Types (pkg/core/state/state_anchors.go):
- RootInfo: Merkle root metadata with version and algorithm
- ErasureInfo: GDPR erasure request tracking
- ProviderConfig: Authorized provider configuration
- StateAnchorsConfig: Global contract settings
- Enums: DataType, TreeAlgorithm, ErasureStatus

Contract ID: -27

Tests (15 test cases):
- Configuration and query tests
- Provider registration/revocation tests
- Authorization and error handling tests
- Data type and algorithm validation tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 12:42:05 +00:00
..
helpers/policyhelper Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
ancora_test.go Add Ancora native contract for off-chain data anchoring 2025-12-23 12:42:05 +00:00
annos_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
collocatio_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
common_test.go Complete Tutus/Lub branding in test files 2025-12-21 08:40:16 -05:00
cryptolib_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
cryptolib_verification_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
designate_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
eligere_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
federation_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
generate_expected_test.go Update test fixtures for TUT/LUB token symbols 2025-12-22 00:42:59 -05:00
ledger_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
lex_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
lub_test.go Complete Tutus/Lub branding in test files 2025-12-21 08:40:16 -05:00
management_test.go Update test fixtures for TUT/LUB token symbols 2025-12-22 00:42:59 -05:00
notary_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
opus_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
oracle_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
palam_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
policy_test.go Rebrand token symbols: TUTUS->TUT, update display names 2025-12-21 13:03:49 -05:00
pons_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
role_registry_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
salus_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
scire_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
sese_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
std_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
treasury_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
tribute_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
tutus_test.go Complete Tutus/Lub branding in test files 2025-12-21 08:40:16 -05:00
vita_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00
vts_test.go Complete neotest to tutustest rename in test files 2025-12-21 08:00:30 -05:00