tutus-chain/pkg
Tutus Development c21789557c Add BlockStorage and StateStorage to local adapter with tests
Implement full local storage adapter with three interfaces:
- Provider: Basic object storage (Put, Get, Delete, Exists, List, Head)
- BlockStorage: Block-indexed storage (PutBlock, GetBlock, GetBlockRange)
- StateStorage: State snapshot storage (PutState, GetState, GetLatestState)

Implementation details:
- Content-addressed storage using SHA256 for object IDs
- Directory sharding for filesystem performance:
  - Objects: first 2 chars of hash (e.g., objects/91/91f0...)
  - Blocks: every 10,000 (e.g., blocks/0001/12345.block)
  - States: every 10,000 (e.g., states/0001/12345.state)
- Metadata JSON sidecar files with content type and attributes
- Thread-safe with sync.RWMutex
- Size quota enforcement across all directories

Test coverage (30 tests):
- Provider interface: Put/Get, Delete, Exists, Head, List, quota
- BlockStorage: PutGetBlock, GetBlockRange, GetLatestBlockIndex
- StateStorage: PutGetState, GetLatestState, quota enforcement
- Path helpers and interface compliance verification

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 06:58:20 -05:00
..
compiler Complete Tutus rebranding - remove all Neo dependencies 2025-12-21 06:25:15 -05:00
config Add RoleRegistry native contract for hierarchical RBAC 2025-12-20 01:35:26 +00:00
consensus Use tutus-consensus fork for dBFT 2025-12-21 05:41:12 -05:00
core Complete Tutus rebranding - remove all Neo dependencies 2025-12-21 06:25:15 -05:00
crypto Complete Tutus rebranding - remove all Neo dependencies 2025-12-21 06:25:15 -05:00
encoding Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
interop Complete Tutus rebranding - remove all Neo dependencies 2025-12-21 06:25:15 -05:00
io Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
network Add free GAS for Vita holders with cross-chain fee splitting 2025-12-20 04:27:55 +00:00
rpcclient Complete Tutus rebranding - remove all Neo dependencies 2025-12-21 06:25:15 -05:00
services Complete Tutus rebranding - remove all Neo dependencies 2025-12-21 06:25:15 -05:00
smartcontract Complete Tutus rebranding - remove all Neo dependencies 2025-12-21 06:25:15 -05:00
storage Add BlockStorage and StateStorage to local adapter with tests 2025-12-21 06:58:20 -05:00
tutusrpc Complete Tutus rebranding - remove all Neo dependencies 2025-12-21 06:25:15 -05:00
tutustest Complete Tutus rebranding - remove all Neo dependencies 2025-12-21 06:25:15 -05:00
util Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
vm Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
wallet Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00