You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does not account for the fact that commitments do not change if the largest power of two that is smaller than the message can fit on a single row. Meaning that if the largest power of 2 that fits in a message can fit on a single row of square size x, then that commitment is valid for all square sizes >= x.
To be more efficient, block producers should also compare the the number shares taken up by the message. If a commitment for a square size that can fit the entire message in a single row is included in the WirePayForMessage, then that commitment can be used for any square size equal to or greater than that size.
we could replace the above code segment with something along the lines of
This will allow for a user to be more confident that their message will be included in an upcoming block. Instead of creating a WirePayForMessage that includes signatures for all possible square sizes, if their message is smaller than the max square size, then they only have to the sign over commitments for square sizes that are smaller than the total number of shares that their message takes up.
With our current max square size, this wouldn't save the user from creating and including that many share commitments, but in the future if we increase the max square size significantly, then this could help reduce the size of WirePayForMessages.
The text was updated successfully, but these errors were encountered:
evan-forbes
changed the title
Optimize picking square sizes when creating a WirePayForMessage
Optimize number of share commitment signed over when creating a WirePayForMessage
Mar 9, 2022
evan-forbes
changed the title
Optimize number of share commitment signed over when creating a WirePayForMessage
Optimize number of share commitments signed over when creating a WirePayForMessageMar 9, 2022
Currently, when block producers are preparing a proposal, they are requiring that the user include a commitment for that exact square size.
celestia-app/x/payment/types/wirepayformessage.go
Lines 190 to 193 in 0363f04
This does not account for the fact that commitments do not change if the largest power of two that is smaller than the message can fit on a single row. Meaning that if the largest power of 2 that fits in a message can fit on a single row of square size x, then that commitment is valid for all square sizes >= x.
To be more efficient, block producers should also compare the the number shares taken up by the message. If a commitment for a square size that can fit the entire message in a single row is included in the WirePayForMessage, then that commitment can be used for any square size equal to or greater than that size.
we could replace the above code segment with something along the lines of
This will allow for a user to be more confident that their message will be included in an upcoming block. Instead of creating a
WirePayForMessage
that includes signatures for all possible square sizes, if their message is smaller than the max square size, then they only have to the sign over commitments for square sizes that are smaller than the total number of shares that their message takes up.With our current max square size, this wouldn't save the user from creating and including that many share commitments, but in the future if we increase the max square size significantly, then this could help reduce the size of
WirePayForMessage
s.The text was updated successfully, but these errors were encountered: