Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion on OP_PUSHCODE #115

Open
melvincarvalho opened this issue May 4, 2021 · 6 comments
Open

Discussion on OP_PUSHCODE #115

melvincarvalho opened this issue May 4, 2021 · 6 comments

Comments

@melvincarvalho
Copy link
Contributor

melvincarvalho commented May 4, 2021

@akrmn2021 wrote:

But first note that OP_PUSHCODE is my own invention, so that's why you never heard of it. And yes I think this is needed for the next layer of functioning, i.e. creating a reputation system instead of a vanilla chain, though it can even be used to create a highly secure vanilla chain.

This issue is for discussion around OP_PUSHCODE

@melvincarvalho
Copy link
Contributor Author

From : #103

@melvincarvalho
Copy link
Contributor Author

@akrmn2021 first question is whether OP_RETURN is currently implemented and whether it's 40/80 bytes

Rest of this issue is about understanding different opcodes mainly OP_PUSHCODE or possibly OP_COMMENT

@bitmarkcc
Copy link

bitmarkcc commented May 5, 2021

Yes OP_RETURN works to push data to the blockchain. There is a 40 byte relay limit, meaning i would be considered a non standard transaction if it had more than 40 bytes, so nodes would nt relay those transaction. Nothing is stopping them from accepting them though if a larger chain is found that has them.

Im working on PUSHCODE in my dev branch https://github.com/akrmn2021/bitmark/tree/dev. I need maybe a couple of weeks until it is ready for testing, and we can discuss more about the details.

@melvincarvalho
Copy link
Contributor Author

@akrmn2021 thanks for the explanation!

I wasnt sure if it was actually working because i got an error in the RPC when I tried, and when I looked in the code, it was unclear there was anything there:

Have a look at this and see what you think:

case OP_RETURN:

Feel free to drop some ideas in here on PUSHCODE, it may be a bit early to start coding as we dont intend to add any new op codes right now. But if you prefer to do things that way round, totally your call

@bitmarkcc
Copy link

In script.h look at MAX_OP_RETURN_RELAY. That gives the limit.

Yes it should say 'return false' because that's what OP_RETURN does, it makes the script quickly evaluate to false without having the interpreter push people's data onto the stack. The scripts return value is mainly for deciding whether an input (script sig) is valid, normally to check whether you signed the tx with the right private key.

@bitmarkcc
Copy link

What RPC command did you use?

As for OP_PUSHCODE, it's just my work and up to the community to decide if they want it. I agree there should be a high bar for any soft forking changes, so it will need more testing and consensus. Also we can make it an optional service that some nodes can provide, until we really want it. It's not a very complex OP code, but it will take more work to make it useable with a CLI and web interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants