-
Notifications
You must be signed in to change notification settings - Fork 0
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
Store file contracts #5
Conversation
The contract outputs will be added by |
This comment was marked as resolved.
This comment was marked as resolved.
… revision number file contract
If I do:
10000 iterations at block height of about 15000 with SELECT MAX on a random contract:
Average: 2.636s 10000 iterations at block height of about 15000 with lookup table on a random contract:
Average: 1.482s So a lookup table is indeed faster 👍 |
Should be OK to merge I think. Going to work on testing next. |
I did most of it but I was wondering how we wanted to handle valid/missed outputs before moving on. We can't just add them to siacoin_elements at the time of contract formation obviously. And if we just store the address/value then we'll break balance calculations etc.
We could do something like this:
and set output_id to some invalid sentinel value by default but specify the address and value, then when the output is actually created we set output_id to the correct value and just refer to the data in siacoin_elements instead of the address and value columns.