HomePhabricator

[ecash-agora] Limit token truncation level to 5 (SLP) and 3 (ALP)

Description

[ecash-agora] Limit token truncation level to 5 (SLP) and 3 (ALP)

Summary:
For ALP, the estimation often results in truncating 4 or more bytes, which is not supported in the Script, therefore we limit it to 3.

We also limit SLP to 5 bytes (which is also the maximum). There's currently no known set of parameters that would result in 6 bytes of truncation, but it's an important failsafe.

Depends on D16753.

Test Plan: npm test

Reviewers: bytesofman, #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D16754

Details

Provenance
tobias_ruckAuthored on Sep 12 2024, 23:08
tobias_ruckPushed on Sep 24 2024, 22:19
Reviewer
Restricted Project
Differential Revision
D16754: [ecash-agora] Limit token truncation level to 5 (SLP) and 3 (ALP)
Parents
rABCaa2cdee2cf55: [ecash-agora] Add ALP support to `AgoraPartial.script`
Branches
Unknown
Tags
Unknown