o1-labs / o1js-bindings

Bindings for o1js to lower layers of the proof system and the Mina transaction logic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comparison in toBase

dfstio opened this issue · comments

commented

Should the line in toBase() be

for (let power = base; power <= x; power **= 2n) {

instead of

for (let power = base; power < x; power **= 2n) {

to properly handle the case when x is equal to base?
https://github.com/o1-labs/o1js-bindings/blob/main/crypto/bigint-helpers.ts#L191