Add a codec preset that follows the ledger encoder
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- blockchain
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 22
- フォーク
- 35
- 平均マージ
- 19時間 56分
- マージ済み PR(30日)
- 58
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
IntersectMBO/evolution-sdk のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
IntersectMBO/evolution-sdk#694 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
IntersectMBO/evolution-sdk#559 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
IntersectMBO/evolution-sdk#557 ·
メンテナーはふだん 1 日以内に返信
-
dependabot: remove stale @types/bip39 entries対応中かも @Kshot3000 が 6 日前に担当しました。 オープンdependencies good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 93/100
IntersectMBO/evolution-sdk#541 ·
メンテナーはふだん 1 日以内に返信
-
txBuilder: committee cert redeemers are never resolved to a certificate index対応中かも @Kshot3000 が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
IntersectMBO/evolution-sdk#518 ·
メンテナーはふだん 1 日以内に返信
IntersectMBO/evolution-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
paperclipai/paperclip#17151 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
AgoraIO-Extensions/agent-infra#3159 ·
メンテナーはふだん 1 日以内に返信
-
blocklist addition
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
MetaMask/eth-phishing-detect#304596 ·
メンテナーはふだん 1 日以内に返信
-
friction
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
kentcdodds/kody#4142 ·
-
[Bug] Statistics | Task statistics are always empty on MikroORM with MySQL or SQLite対応中かも @NdekoCode が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ever-co/ever-gauzy#11214 ·
メンテナーはふだん 1 日以内に返信