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
Calculate default mempool capacity as 2x the ledger max block size #1468
Conversation
72d93ed
to
d6d04d1
Compare
mpCap <- atomically $ do | ||
ledger <- ledgerState <$> ChainDB.getCurrentLedger chainDB | ||
pure (mempoolCapacity ledger) |
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.
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.
Should we support a dynamically changing mempool capacity? I wasn't sure if we wanted that additional complexity.
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 would indeed avoid it. But basing its static size on a dynamically changing thing might be confusing (needs a comment). The main reason I'm commenting on this is to ask whether the max block size will actually change in practice.
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 max block size will change. I presume the question is "if using the default size (no local override), is it acceptable to require a restart before picking up a change in the default block size?".
Consider what happens when syncing. We'll start with the size from the genesis and not change it. The mainnet genesis specifies a 2Mb block size, that was later reduced down to 64k (and will probably be bumped up again after the Shelley hard fork).
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.
Seems to me that if operators override the max block size, they will want to keep an eye on the max block size on the chain anyway, and requiring a restart when this happens (which will be rare) doesn't seem like a huge deal.
d6d04d1
to
b61dca1
Compare
bors r+ |
Timed out |
bors r+ |
Closes #1467