Add a codec preset that follows the ledger encoder
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- blockchain
Direzione di ricerca
Start with the CBOR default options named in the issue, CBOR.CML_DEFAULT_OPTIONS and CBOR.TX_DEFAULT_OPTIONS.ledger, and see how they set map and set ordering and length encoding. The ledger rules being matched (encodeMap, encodeSet, the 23-entry threshold) live in cardano-ledger, not this repo. Done means the regression test cases (unsorted inputs, multiple policies, more than 23 inputs or assets) encode byte-identically to cardano-cli build-raw output. The default switch is a separate, later change that needs its own release note.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
No codec preset writes a transaction the way the ledger encoder and cardano-cli do. CBOR.CML_DEFAULT_OPTIONS, the transaction default, keeps map keys and set items in insertion order and always writes definite lengths. The ledger sorts them and switches to indefinite lengths above 23 entries.
Evidence
cardano-ledger libs/cardano-ledger-binary/src/Cardano/Ledger/Binary/Encoding/Encoder.hs:
encodeMap(L395-400) folds the map in key order and usesvariableMapLenEncoding: definite up to 23 entries, indefinite above (L426-436,lengthThreshold = 23).encodeSet(L472-483) writes tag 258, the items in order, with the same rule throughvariableListLenEncoding(L457-460).
cardano-cli 10.5.1 conway transaction build-raw, with 25 inputs given in descending order and one output holding two policies given in descending order:
| cardano-cli | CML_DEFAULT_OPTIONS |
|
|---|---|---|
| Inputs | sorted, d90102 9f ... ff |
as given, d90102 9819 ... |
| Policies in the output | sorted | as given |
Proposal
- Add a preset that follows this layout, named after what it follows. The 23-entry rule needs a new encoder setting, since today a preset is either always definite or always indefinite.
- Check that each key type sorts the same way as the ledger's
Ordinstance before relying on byte order. - Move
CBOR.TX_DEFAULT_OPTIONS.ledgerto the new preset in a later release. This changes the bytes of every transaction the builder makes, so it needs devnet proof and its own release note.
Regression test
Build transactions with unsorted inputs, several policies per output, more than 23 inputs and more than 23 assets. Encoded with the new preset, each is byte-identical to cardano-cli build-raw output for the same transaction.
- Lingua principale
- TypeScript
- Stelle
- 22
- Fork
- 35
- Merge medio
- 20h 8m
- PR unite (30g)
- 56
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di IntersectMBO/evolution-sdk
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
IntersectMBO/evolution-sdk#559 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
IntersectMBO/evolution-sdk#557 ·
I maintainer di solito rispondono entro 1 giorno
-
dependabot: remove stale @types/bip39 entriesForse già presa @Kshot3000 l’ha presa 5 giorni fa. Apertadependencies good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 93/100
IntersectMBO/evolution-sdk#541 ·
I maintainer di solito rispondono entro 1 giorno
-
txBuilder: committee cert redeemers are never resolved to a certificate indexForse già presa @Kshot3000 l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
IntersectMBO/evolution-sdk#518 ·
I maintainer di solito rispondono entro 1 giorno
-
RewardAccount: validate header type bits and bech32 prefixForse già presa @Kshot3000 l’ha presa 6 giorni fa. Apertaenhancement external-review
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
IntersectMBO/evolution-sdk#456 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di IntersectMBO/evolution-sdk
Issue simili
-
批量图谱关联的备份应排除Obsidian索引Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
logancyang/obsidian-copilot#3753 ·
I maintainer di solito rispondono entro 1 giorno
-
area: presentation severity: important
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
voithos-labs/aragonite#763 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
diegosouzapw/OmniRoute#17386 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
💡 [Feature] Add an option to hide the empty screen background illustration (Distraction-Free)Aperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
super-productivity/super-productivity#10982 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno