Closed wardlem closed 5 years ago
Oh interesting. I really like the detail for each opcode. One concern is that wiki can be updated by almost anyone, so tests would be good. Maybe we lock in the first version so we are alerted if anything changes. We could instead add this to the bscript-parser
project and manage it as a module to this project. I'm fine either way a long as we lock in the opcode to bytes mapping.
One concern is that wiki can be updated by almost anyone, so tests would be good.
This is true. This is also why the generated file is committed and only regenerated when we feel it is necessary. If the scraper code breaks we can simply not scrape until we fix it.
We could instead add this to the bscript-parser project and manage it as a module to this project.
I think this does belong as its own module that can be managed independently. Do you think it belongs with bscript-parser
or its own, new module (i.e. bscript-opcode-info
)?
I think this does belong as its own module that can be managed independently. Do you think it belongs with bscript-parser or its own, new module (i.e. bscript-opcode-info)?
If it will overlap with the bscript-parser, I'd prefer it to be one module. The main point of the bscript-parser (maybe it's not a good name), is to translate between assembly and byte code. Maybe we should call it a bitcoin-script-assembler
. Or create a new one. I don't know if the bscript-opcode-info
would overlap here.
If it will overlap with the bscript-parser, I'd prefer it to be one module.
It will partially overlap. I will close this PR and open one on bscript-parser
Opcode description data can be scraped from the
bitcoin.it
wiki by runningnode script/scrape_opcode_info.js
.Needs tests.