Closed tdelabro closed 1 month ago
Hi @tdelabro can i be assigned to this?
Hey @supreme2580! Thanks for showing interest. We've created an application for you to contribute to btczee. Go check it out on OnlyDust!
@supreme2580 Tbc we have no certitude this is the correct way to implement it. Btcd did it the way it is actually done in btczee. But this implementation in Rust https://github.com/rust-bitcoin/rust-bitcoin/blob/d9b5844981ba5c46eeda3ca68093281e125d425e/bitcoin/src/blockdata/script/owned.rs, seems to do it the way I'm describing it.
Please go ahead and try it out.
Thanks @tdelabro will check the rust implementation out
@supreme2580 to be honest at the state we are in the project, it may not be very wise to try those optimisation. There would be much more value right now in having a proper test covering for the script implementation.
Is this something you would consider doing in the first place?
Truth being there is no way to feed the node scripts rn...
@tdelabro not really, myself and my partner were going over creating more opcodes first... but if this is of high priority we can add this to the issues we're looking at
@tdelabro what'd you think?
@supreme2580 sorry I missed you message. Do you have a telegram? So I can add you to our groupchat?
@supreme2580 I think it's better to work on new opcodes than on this issue for now. But truly do whatever you like better :)
Yes I do I'm supreme1960 on telegram
Yes we should even have a PR up for more opcodes in a few hours
Right now the BTC script engine's stack is implemented as an array of pointers to the actual values.
This implementation scatters the actual values across the heap, therefore slowing script execution by negating the data-proximity property expected from a heap. The purpose of this issue would be to implement the stack as an actual stack.
Now the issue is that you don't know in advance what the size of the next item should be. I'm not sure it is an issue, as the script is responsible for telling you how to treat the next item(s) in the stack. If it becomes an issue there are most likely solutions to be imagined.