Skip to content

minor correction to u64 (from BigSize) of types in the polynomial curve#216

Open
raulcano wants to merge 1 commit intodiscreetlogcontracts:masterfrom
raulcano:polynomial-curve-serialization-type-correction
Open

minor correction to u64 (from BigSize) of types in the polynomial curve#216
raulcano wants to merge 1 commit intodiscreetlogcontracts:masterfrom
raulcano:polynomial-curve-serialization-type-correction

Conversation

@raulcano
Copy link
Copy Markdown

@raulcano raulcano commented Mar 1, 2026

The text said each point has “two bigsize integers,” but the serialization (lines 164–166) and the general payout curve endpoints (lines 72–74) both use u64 for the two numeric fields. So the prose was wrong: it should say u64, not bigsize.

@Christewart
Copy link
Copy Markdown
Contributor

FWIW, bitcoin-s follows the spec as written: https://github.com/bitcoin-s/bitcoin-s/blob/80be2f59892b2049d66a506b1e8ae49e30c5ebe8/core/src/main/scala/org/bitcoins/core/protocol/tlv/TLV.scala#L1096

It appears that the implementation you are citing doesn't. Links would be helpful rather than just raw line numbers as it is unclear to me what files those are referring to

@raulcano
Copy link
Copy Markdown
Author

raulcano commented Mar 23, 2026

Ok, fair enough, sorry about that. I thought the actual changed file in the commit tab was enough , but it's true it's very unconvenient to have to go and check.

In any case, the inconsistency persists. I have no strong opinion on what type to keep, but either it's BigSize or it's u16.
If there is agreement that we need to align the text to the bitcoin-s implementation, fine for me. I just didn't write this text originally and don't know the reasons of why one type was chosen over the other.

For clarity, what I was citing is not another implementation but this very specification, in the file PayoutCurve.md
Lines 72-74:

dlcspecs/PayoutCurve.md

Lines 72 to 74 in 9cd9148

* [`u64`:`endpoint_0`]
* [`u64`:`endpoint_payout_0`]
* [`u16`:`extra_precision_0`]

Lines 164-166:

dlcspecs/PayoutCurve.md

Lines 164 to 166 in 9cd9148

* [`u64`:`event_outcome_1`]
* [`u64`:`outcome_payout_1`]
* [`u16`:`extra_precision_1`]

Line 173:

Each point consists of a two `bigsize` integers and a `u16` which are interpreted as `x` and `y` coordinates in exactly the same manner as is done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants