Skip to content

Commit

Permalink
[#275] audit: Document contract storage model
Browse files Browse the repository at this point in the history
Add comments (outside the docs) with key-value storage structure and
some explanations. The memory mode will allow to more precisely
understand and migrate the contract storage.

Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Feb 2, 2023
1 parent 2be6de0 commit 171e1df
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions audit/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,28 @@ they make a list and get these AuditResultStructures from the audit contract.
Audit contract does not produce notifications to process.
*/
package audit

/*
Contract storage model.
# Summary
Key-value storage format:
- 'notary' -> bool
is notary mode disabled
- 'netmapScriptHash' -> interop.Hash160
Netmap contract reference
- [64]byte -> []byte
Data audit results encoded into NeoFS API binary protocol format. Results are
identified by triplet concatenation:
1. 8-byte little-endian unsigned integer NeoFS epoch when audit was performed
2. 32-byte identifier of the NeoFS container under audit
3. 24-byte prefix of SHA-256 hash of the auditor's (Inner Ring) public key
# Setting
Contract can be deployed in notary and notary-disabled mode.
To handle some events, the contract refers to other contracts.
# Audit history
Contracts stores results of the NeoFS data audits performed by the Inner Ring.
*/

0 comments on commit 171e1df

Please sign in to comment.