-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data refactor #2560
Data refactor #2560
Conversation
weird anti rust pattern of storage dir plus a storage.rs existing. Fixed
* Add new Pointer type for network addressing * Add PointerAddress type and related network address handling * Implement signature verification for Pointer records * Add validation and storage handling for Pointer records in ant-node * Add log markers for Pointer operations * Make LinkedList outputs field optional by wrapping in Option<Vec> * Update LinkedList constructors and signature calculation to handle optional outputs * Fix transaction tests to use .into() for empty output vectors * Update ant-networking to handle split records for both Pointer and optional outputs * Maintain signature verification and count-based selection for split records * Add InvalidSignature error variant to handle Pointer validation failures This change introduces a new Pointer type for network addressing while also making LinkedList transactions more flexible by allowing them to be created without outputs. The networking layer has been updated to handle both changes, including proper split record handling, signature verification, and storage validation. All changes maintain backward compatibility with existing functionality.
…version numbers, and add tests
f4f51f0
to
f3013fe
Compare
8d54824
to
3c77da9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚢 ✅
pub enum PointerTarget { | ||
ChunkAddress(ChunkAddress), | ||
LinkedListAddress(LinkedListAddress), | ||
PointerAddress(PointerAddress), | ||
ScratchpadAddress(ScratchpadAddress), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we omitted registers here on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this include DataMap, not just for files but arbitrary metadata?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed +1 @happybeing
Add Pointer Type and Refactor LinkedList Structure
Changes
Pointer
type for network addressingLinkedList
outputs optionalDetails
New Pointer Type
Pointer
andPointerAddress
types for network addressingant-node
InvalidSignature
error variant for validation failuresLinkedList Refactoring
outputs
field optional viaOption<Vec<(PublicKey, LinkedListContent)>>
.into()
for empty output vectorsNetworking Layer Updates
Testing
Impact
These changes improve the flexibility of the network addressing system while making
LinkedList transactions more versatile. The Pointer type provides a new way to handle
network addressing, while optional outputs in LinkedList allow for simpler transaction
structures when needed.
Breaking Changes
None. All changes maintain backward compatibility with existing functionality.