-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: limit PoSted partitions to 3 #1436
Conversation
We'll need to advertise this change loudly so that mining software can adjust to deal with it. |
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.
The only possible concern is that this might cause some issues with butterfly/dev networks (i.e., lots of small window posts because partitions are small) but, IMO, this is the right short-term fix.
The right long-term fix is to remove 99% of these limits because they were originally introduced pre-wasm to limit memory/compute.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1436 +/- ##
==========================================
- Coverage 91.09% 91.03% -0.06%
==========================================
Files 145 145
Lines 27862 27867 +5
==========================================
- Hits 25381 25369 -12
- Misses 2481 2498 +17
|
The structure of this change seems fine, but 2 seems like a very low limit that I'm not aware of a good justification for. |
Worth mentioning that at venus, the largest partitions in a batch is currently |
@anorth @zhiqiangxu Thanks for the feedback! I'm going to increase this to 3. |
0840c26
to
da61546
Compare
Is it too hasty to directly change 10 to 3 on the consensus side? |
Shouldn't this be FIPed? |
There's concern that certain PoSt operations can be so expensive that they don't fit in a single block at all (currently 10B gas). This is especially concerning if PoSts cannot be disputed.
This PR adds a new dedicated limit for the number of partitions that can be proven in a single PoSt message, and sets it to 2. This limit thus ensures that "bad" proofs can be safely disputed, as they will only ever cover 2 partitions at a time.
I'm proposing adding a new dedicated limit, instead of modifying either
ADDRESSED_SECTORS_MAX
orADDRESSED_PARTITIONS_MAX
, since those values are used elsewhere. I'd like this change to be very targeted at PoSt messages only.