ionio-lang / ivy-elements

Fork of Ivy Language to write Elements Smart Contracts
https://ionio-lang.org
MIT License
0 stars 3 forks source link

Add streaming SHA256 #15

Open altafan opened 2 years ago

altafan commented 2 years ago

From the Elements doc:

Streaming Opcodes for streaming hashes: There is an existing limitation of MAX_SCRIPT_ELEMENT_SIZE(520 bytes) because of which we cannot operate hash functions like OP_SHA256 on messages more than 520 bytes. This allows hashing on more than 520 bytes while still preserving the existing security against resource exhaustion attacks. The proposal for this by Russell O'Connor can be found in the description here.

The following new opcodes need to be added: