-
Notifications
You must be signed in to change notification settings - Fork 137
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
Check Slatepack file size before loading contents #495
Conversation
Not sure |
I had similar reservations about directly basing max Slatepack size on max block size, since the metadata in block is not one-to-one with the metadata in Slatepack. However, hardcoding max size in wallet isn't fool-proof either, and has overhead for any changes to max block size in the node (i.e. developers will have to remember to manually update max Slatepack size). Ideally, the max Slatepack size would be: IIUC, the above formula would encode max transaction size + Slatepack metadata size + acceptable whitespace size. WDYT? |
It would be nice to write some tests for this. |
Updated with new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good.
One question about where to do the size validation.
e9d5169
to
9c5ed8c
Compare
Tests are failing to compile due to |
For dev on master just run |
Build still fails due to traits not being in scope or implemented. Any tips on resolving failures like here and here (here or another PR)? |
hrm.. crap. It looks as if some dependency is trying to pull in a different version of ed25519 dalek then we use. Let me look into this and fix via another PR. |
Sounds good to me, will rebase over the fix. |
@unseddd Should be all good now, could you try again rebasing with latest master please? |
Check Slatepack file size is within valid range before loading contents into memory
@yeastplume the fix worked, many thanks 😄 |
… contents (mimblewimble#495) - Check Slatepack file size is within valid range before loading contents into memory
… contents (mimblewimble#495) - Check Slatepack file size is within valid range before loading contents into memory
Check Slatepack file size is within valid range before loading contents into memory.