0xMiden / 0xMiden/protocol

Optimize note script encoding

Aperta
#576 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
132
Fork
167
Merge medio
1g 23h
PR unite (30g)
110

Descrizione

### What should be done?

The note script is encoded to/from Felts to push to/from the VM. The current encoding uses `u32`, since a Felt doesn't support the full range of `u64`. But this can be improved by just not having the high bit set, which means one can use 7 bytes out of the 8 bytes in a `u64` to encode the script, and almost double the space efficiency

### How should it be done?

Change the `NoteScript` conversions to/from Felt to use `u64`

### When is this task done?

When the code above is merged and tested

### Additional context

https://github.com/0xPolygonMiden/miden-base/pull/572#discussion_r1555578703

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.