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

make OP_RETURN data format safe and efficient #12

Open
Alrighttt opened this issue Aug 4, 2020 · 1 comment
Open

make OP_RETURN data format safe and efficient #12

Alrighttt opened this issue Aug 4, 2020 · 1 comment

Comments

@Alrighttt
Copy link
Member

['faucet.drip', ([1], [1, 1]), {}, '03a8339e98111ee9dc74a956164e6507a67005f4a2c45c0481f1b9d7c3c7d5fd9a', '03a8339e98111ee9dc74a956164e6507a67005f4a2c45c0481f1b9d7c3c7d5fd9a']"

If a pubkey is stored like this in OP_RETURN by pycctx, it it first being converted to ascii prior to being added to the OP_RETURN. This results in the data taking twice as much space.

@ssadler ssadler changed the title pubkeys stored in OP_RETURN as ascii make OP_RETURN data format safe and efficient Aug 4, 2020
@ssadler
Copy link
Contributor

ssadler commented Aug 4, 2020

Currently, OP_RETURN contains and ascii blob which is just the result of repr called on the params, and it is "parsed" with eval, which is highly unsafe.

This should be replaced with a binary format with automatic deduplication and safe parsing.

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