"ecc library invalid" when initializing ECPairFactory
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 32/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js, vite
- Ambito
- cryptography
Direzione di ricerca
Inizia con l’inizializzazione di ECPairFactory e le asserzioni di testecc, in particolare pointFromScalar, sign e signSchnorr. Usa il file di riproduzione di Caravan collegato e i test per confrontare le build Node e browser che falliscono; il lavoro è completato quando la stessa libreria tiny-secp256k1 viene inizializzata correttamente senza saltare le convalide.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
There may be some overlap here with another issue I found when trying to initEcc in bitcoinjs-lib with tiny-secp256k1. I put up a fix for that here but even with this I started running into a similar error when trying to init the same library with ecpair. I.e. the same ecc library will init and validate with bitcoinjs-lib but not ECPairFactory. You can see both being initialized in this WIP PR here and the failure in CI here.
In an attempt to narrow down what was causing the failure, I went through each assertion in testecc to find the ones that would fail. By commenting out pointFromScalar, sign, and signSchnorr in the built code in my node_modules, I was able to get the library to verify and use ECPairFactory without problem though it's not clear to me why these are failing (and skipping validations is obviously not ideal).
When consoling out what the assertion was expecting versus what it was getting, this is what I found for pointFromScalar:
actual: <Buffer 03 cd e1 d8 c4 fb e5 ee 21 ff 86 51 5c a7 8d e4 c7 14 d1 cb 8e 60 c0 22 b8 5b 8c cf 6f 83 55 ac b6>
expected: <Buffer 02 b0 7b a9 dc a9 52 3b 7e f4 bd 97 70 3d 43 d2 03 99 eb 69 8e 19 47 04 79 1a 25 ce 77 a4 00 df 99>
I'm getting this in node environments (jest tests specifically) as well as an esbuild/vite build for browser.
There is a branch with code that reproduces this here with the relevant file here and tests here.
- Lingua principale
- JavaScript
- Stelle
- 29
- Fork
- 35
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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 bitcoinjs/ecpair
-
Typings are silently `any` under moduleResolution node16/nodenextForse già presa @kyrillWhite l’ha presa 92 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
v3.0.0 release notesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Please publish a ESM packageAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di bitcoinjs/ecpair
Issue simili
-
xsd:integer cast from a string rejects negative numbers, a leading + and surrounding whitespaceApertabug 🐛
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
comunica/comunica#1960 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Waiting for: Product Owner
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
getsentry/sentry-javascript#26203 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bytedance/flowgram.ai#1235 ·
I maintainer di solito rispondono entro 1 giorno