SoftwareVerde / bitcoin-cash-specification

Specification of the Bitcoin Cash protocols and consensus
Other
8 stars 5 forks source link

Remove incorrect/unused opcodes #17

Closed zander closed 3 years ago

zander commented 3 years ago

Needless to say, the claims are false

zander commented 3 years ago

As explained offline,

these opcodes are not available to anyone on mainnet, with any of the listed software. The "Node-Specific Behavior" section is typically showing actual operational differences. Not something that can not ever be triggered by a user.

The effect of including this in the spec is that it creates the impression a user can use a certain opcode on certain nodes while not doing so on others. The conclusion is that using different nodes leads to hard forks. Lets avoid this.

If you must keep this info, move it to the forks/ subdir somehow as that is specifically meant for historical data.

zander commented 3 years ago

Someone pointed out that we can't use opcodes above 0x80 because of this misinformation. I see there is plenty of confusion on the web too, and I guess this can be blamed on the script.h file used by everyone.

OpCodes like "OP_SMALLINTEGER" are not opcodes, they are placeholders in the template-matching code. It is like a reg-exp that matches all.. small integers (OP_0, OP_2 - OP_16). See Script.cpp. That enum value is used nowhere else than in the matching code. Similar with all the other ones you say Flowee parses. It doesn't, they are placeholders in a template only.

zander commented 3 years ago

To clarify this in our header files, and avoid people misunderstanding the situation.

https://gitlab.com/FloweeTheHub/thehub/-/commit/018a855e03cb04e459851914f9bcb54272032ff5

zander commented 3 years ago

BCHN: https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node/-/merge_requests/1095 https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node/-/merge_requests/1096