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
But now because of #1505 we have to implement the binary operation with multiple identities for Compressors:
For U256:
x + Add(0) = x
x + Sub(0) = x
Add(0) + x = x
Sub(0) + x = x
Transform(0) + x = x
_ + Transform(x) = Transform(x)
_ + NoCompression(x) = NoCompression(x)
Transform(x) + Sub/Add(y) = Compress(x+-y)
NoCompression(x) + Sub/Add(y) = Compress(x+-y)
Add(x) + Add(y) = Add(x + y) // handle overflow
Sub(x) + Sub(y) = Sub(x + y) // handle overflow
Add(x) + Sub(y) = Add(x - y) // handle overflow
Sub(x) + Add(y) = Sub(x - y) // handle overflow
Unfortunately for Add/Sub + Add/Sub we lose information of the original operands (lhs, rhs), so the result of combination of Add/Sub + Add/Sub may be suboptional in terms of diff size, because Compress(x, y) + Compress(a, b) may result in Transform too, not only in Add/Sub =(
We need this feature to merge two diffs into one. Before we implemented it like this:
But now because of #1505 we have to implement the binary operation with multiple identities for Compressors:
For U256:
Unfortunately for Add/Sub + Add/Sub we lose information of the original operands (lhs, rhs), so the result of combination of Add/Sub + Add/Sub may be suboptional in terms of diff size, because Compress(x, y) + Compress(a, b) may result in Transform too, not only in Add/Sub =(
TODO: implement combination for AddInlined: #1520
With #1511:
For code_hash B256:
Belongs to #1237
The text was updated successfully, but these errors were encountered: