Comments (5)
The new scheme is:
Tag Prefix | Intended execution mode | Target | Allowed note types |
---|---|---|---|
00 |
Network | Specific | Public |
01 |
Network | Use case | Public |
10 |
Local | Any | Public |
11 |
Local | Any | Any |
The validation changes to if the two high bits are not 11
, then the note must be public.
from miden-base.
Notes:
- The
create_note
doesn't have the notion of local/network execution. It seems we missed the issue to implement it.- The Rust code execution flag is based on this comment, which uses the highest bit
- The MASM code diverged from this encoding because of this change
from miden-base.
I guess we should add an abstraction of Note's Tags. That is to say, the implementation of NoteTag
is basically hardcoded for the P2ID use case. I think we need a less opinionated implementation, to be used by apps.
The implementation would have the note storage and execution types as arguments, and would ensure these are correctly encoded. And would allow the user to define the rest of the bits to anything. The goal would be to support the sync
API properly.
I think it would also make sense to have an wrapper of the u32
type, that validates the user specified bits of the the TAG fit in the space available.
from miden-base.
As commented in #642, I don't think there was a bug (as far as I can tell, things worked as intended) - but we were missing a constructor for creating tags for "use case" notes. I left a comment in the PR about a potential way to address this.
from miden-base.
Closed by #657.
from miden-base.
Related Issues (20)
- Add `Block` struct to Miden objects HOT 1
- Add authenticator to `TransactionHost` HOT 5
- Create notes without assets HOT 1
- Note inputs in the advice provider
- Migrate to the MAST structure and forget MASM HOT 2
- De-duplicate serialization code for `StorageMaps`. HOT 1
- bug: tx execution hangs for some accounts HOT 4
- CI: `cargo fmt` should be run with `--check` flag. HOT 1
- docs: Errors on running get started HOT 4
- Implement test for producing and proving of transaction for new account HOT 1
- Specify and implement the SWAP tag HOT 2
- Update mock notes to call create_note via the wallet interface HOT 2
- Note object refactoring HOT 3
- Ensure all data of a note is available for public accounts HOT 3
- TransactionKernel::assembler not printing when calling debug.stack with assembler initialized in debug mode HOT 2
- Refactor build_p2id_recipient to return NoteRecipient instead of Digest HOT 3
- Implement offset-based storage access
- Add Asynchronous Support to DataStore Trait Methods HOT 2
- Rework error naming
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miden-base.