-
Notifications
You must be signed in to change notification settings - Fork 835
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
QBFT no empty block #3810
Comments
GoQuorum implementation Consensys/quorum#1433 |
Any update on when this might get implemented in Besu? |
Please solve this one, it would help many people. |
It's a really necessary feature and it will helps to save memory! |
WIP: #4634 |
@siladu - status on PR ? |
@non-fungible-nelson We had to pause it to prioritise Withdrawals/Shanghai |
@siladu Is there any prevision about that? |
Discussed with @siladu and I'm going to work on progressing the existing PR to see how far this is from being closeable. |
are there any updates on this as it's now implemented for Clique #6082 ? |
I've not moved it along much as I've been focusing on other bug fixes & features that have taken priority. Working on #5446 has helped get me into the BFT code more than I have before, so this might be a natural thing for me to pick up again once that PR is over the line but happy if someone else wants to pick up the empty block work in the mean time. |
For now I'll remove my name from it, but will add it back once I'm actively working on it again. |
Hi @matthew1001, I actually spent some time last weekend looking at some relevant parts of the code, in a discussion on the besu channel I said l may be able to help but then I didn't knew this issue was already created. So if I can help in any way I'll have some time to do it both off and on my working hours... 😃 |
Hi, yes I downloaded @siladu code, unfortunately I have to work with it on a very low end personal laptop but I'll do my best 😃. Thank you guys... |
Guys, I do now have an initial working version (untested and very basic) that I plan to put on a draft PR for review ASAIC, I'm actually eager to do it but even if I started doing this personally now I learned that my employer is actually a Hyperleger Foundation contributor, so now I'm doing it under their umbrella. That means I have to wait for their approvals which I expect will be early next week... 😀 It's based on the previous work by @siladu, so my kudos to him... |
@amsmota I've updated the description with some more background details and the specification of the proposed solution. This is what both my implementation and the GoQuorum one are based on. Note, this could be implemented for IBFT2 as well, but for now I would recommend only attempting to update QBFT. If someone wants to extend this to IBFT2 they can do that themselves or make a case for it. The scope of this issue was only intended to be QBFT and better to keep the changes as small as possible. |
Hi, thanks for that. I'm still waiting for the authorization of my firm to be able to push what I have, it was working quite fine untilnow that I started to implement the support for transitions. It's quite complex because the blockTimer is started before the block is created so by that time the timer doesn't know if the block is empty or not. Yesterday I think I achieve that but couldn't test it yet. But I had to comment out the TimestampMoreRecentThanParent because of that too. Just to clarify the emptyBlockPeriodSeconds is already implemented and working in the Fork and Options, including the Mutable ones, it's just that for now I can't test the empty/non-empty scenarios but because of code unrelated issues... I'll let you know how it goes... |
Well, I think this is almost done, I tested today the blockperiod/emptyblockperiod before and after a transition and it looks fine, but my tests were not very reliable due to the environment I'm using. I did quite a few changes, the most noticeable in the BlockTimer, I kind of moved the responsability of calculating those values from the QbftBlockHeightManager to it. Anyway I got the approval from my company so I'll be able to create PR for review soon... Cheers. |
Guys, I just created a Draft PR, please let me know what are the next steps... Cheers. |
…3810-qbft-no-empty-block
…ledger#3810) Signed-off-by: amsmota <[email protected]>
…ledger#3810) Signed-off-by: amsmota <[email protected]>
…ledger#3810) Signed-off-by: amsmota <[email protected]>
Signed-off-by: amsmota <[email protected]>
…ledger#3810) Signed-off-by: amsmota <[email protected]>
…ledger#3810) Signed-off-by: amsmota <[email protected]>
…ledger#3810) Signed-off-by: amsmota <[email protected]>
Signed-off-by: amsmota <[email protected]>
Signed-off-by: amsmota <[email protected]>
…ledger#3810) Signed-off-by: Antonio Mota <[email protected]>
…ledger#3810) Signed-off-by: Antonio Mota <[email protected]>
…ledger#3810) Signed-off-by: Antonio Mota <[email protected]>
current PR #6965 |
#6965) Implemented support for emptyBlockPeriodSeconds in QBFT (Issue #3810) Introduces experimental xemptyblockperiodseconds genesis config option for producing empty blocks at a specific interval independently of the value of the existing blockperiodseconds setting. #3810 --------- Signed-off-by: Antonio Mota <[email protected]> Signed-off-by: amsmota <[email protected]>
…ledger#3810) (hyperledger#6965) Implemented support for emptyBlockPeriodSeconds in QBFT (Issue hyperledger#3810) Introduces experimental xemptyblockperiodseconds genesis config option for producing empty blocks at a specific interval independently of the value of the existing blockperiodseconds setting. hyperledger#3810 --------- Signed-off-by: Antonio Mota <[email protected]> Signed-off-by: amsmota <[email protected]> Signed-off-by: Wolmin <[email protected]>
Experimental support has been delivered under #6965 |
testing with release 24.10.0 and genesis configs:
a block is generated every 5 seconds with no regard to the emptyblock time?! I was testing on a local vm that I just fired up from scratch |
@MCrypto It is an early access/experimental feature so the "x" is in front, i.e. We don't normally document early access features, but I think we should make an exception for this one as likely to be widely used |
Thank you so much, we have been waiting for this feature for our private blockchain implementation before we launch our mainnet! We are still on our testnet, so hopefully things will be stable enough by the time we come to our launch. Thanks to everyone who worked on this!! |
@MCrypto you might need |
Background and specification document: https://docs.google.com/document/d/1UjefKBgnFnBqQGYZSfVr7LZxVOgrDjeO0uZVHtKSRQA/edit?usp=sharing
The QBFT consensus protocol creates new blocks on a regular basis with the time interval between blocks being a configurable parameter. This is also true in the case that none of the validating nodes has received any transaction not already included in the blockchain. Under these circumstances, since no new transaction is being received, the QBFT protocol ends up producing a continuous sequence of blocks void of any transaction, i.e. empty blocks.
In cases where the transaction volume is quite low, this is less than ideal as empty blocks end up occupying a lot of the node storage space compared to the space occupied by actual transactions.
The approach will be need to be co-ordinated with the implementation in GoQuoum as well so that the protocol remains compatible.
Tasks (TODO)
block.getBody().getTransactions().isEmpty()
instead of attempting to query the txpool directly.* Timestamp-dependent smart contract test?The text was updated successfully, but these errors were encountered: