-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Reserve some TransactionAttributeTypes for experimental/private usage #1904
Comments
That would imply VarBytes encoding for reserved attribute's data, probably. |
There is a prototype now implemented in nspcc-dev/neo-go#1496, 0xe0-0xff range is used for that. |
We can add |
Attributes are not exposed to SmartContracts, isn't it? |
No, they aren't. https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.SmartContract.Framework/Services/Transaction.cs |
What's the sense if is not possible to use in a smart contract |
Do you agree on this solution? @roman-khimov |
That essentially means using one attribute type for all potential extensions which requires further demultiplexing in practice. Could be done, but a range of attributes seems to be a bit more natural. |
Similar to TransactionAttributeTypes (neo-project#1904), we should have some reserved values. Signed-off-by: Roman Khimov <[email protected]>
* Capabilities: rephrase FullNode FullNode is used by all proper nodes currently whether they drop old chain data or not. It'd be more correct to define it as "having complete state" rather than "having all blocks" since the latter is what ArchivalNode will provide. This is also relevant wrt how this capability is used, see RemoteNode OnRelay() and OnSend(). Refs #2346. Signed-off-by: Roman Khimov <[email protected]> * Capabilities: reserve 0xf0-0xff region for private experiments Similar to TransactionAttributeTypes (#1904), we should have some reserved values. Signed-off-by: Roman Khimov <[email protected]> * Capabilities: make them really extensible The way capabilities are currently defined makes them very hard to extend since old nodes will treat unknown types as invalid ones failing Version decoding completely. To be able to ignore these types we should also have more uniform encoding for unknown/new types. Signed-off-by: Roman Khimov <[email protected]> * Capabilities: introduce ArchivalNode This will be used to differente full history nodes from state only. Currently it's just a definition, we can not use it safely on current networks because nodes will refuse this Version, so actual code using the attribute will be added in newer versions. Signed-off-by: Roman Khimov <[email protected]> --------- Signed-off-by: Roman Khimov <[email protected]> Co-authored-by: Shargon <[email protected]>
Summary or problem description
Many protocol-related experiments and extensions around transactions can start as simple attributes. Some private networks may also want to have extensions based on attributes for their internal usage. We have
TransactionAttributeType
and associated logic that regulates attributes, but at the moment it's not really encouraging these experiments as any type code might get used by the official node and decoding unknown attribute will always fail.Do you have any solution you want to propose?
That costs nothing and I think we can do it easily.
This is a bit more invasive and dangerous (think of two nodes using the same type but with a different meaning for it), but for testing purposes maybe it's worth it.
Neo Version
Where in the software does this update applies to?
The text was updated successfully, but these errors were encountered: