Skip to content
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 RPCs should be disabled after starting with or switching to use validator contract #2817

Merged
merged 7 commits into from
Oct 11, 2021

Conversation

siladu
Copy link
Contributor

@siladu siladu commented Sep 28, 2021

PR description

Qbft RPCs should be disabled after starting with or switching to use validator contract
Signer metrics and getValidatorsByBlock... should remain enabled.

Fixed Issue(s)

Related to #2795

Changelog

…validator contract

Signer metrics and getValidatorsByBlock... should remain enabled.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu
Copy link
Contributor Author

siladu commented Oct 6, 2021

Just discovered a bug when transitioning back to blockheader mode, e.g. with this transitions config

"transitions": {
      "qbft": [
        {
          "block": 2,
          "validatorselectionmode": "contract",
          "validatorcontractaddress": "0x0000000000000000000000000000000000008888"
        },
        {
          "block": 4,
          "validatorselectionmode": "blockheader"
        }
      ]
    }
2021-10-06 21:10:01.007+02:00 | pool-8-thread-1 | ERROR | EventMultiplexer | State machine threw exception while processing event \{BlockTimerExpiry{Round Identifier=ConsensusRoundIdentifier{Sequence=4, Round=0}}\}
java.lang.IllegalStateException: Bft requires a vote provider
	at com.google.common.base.Preconditions.checkState(Preconditions.java:510)
	at org.hyperledger.besu.consensus.common.bft.blockcreation.BftBlockCreatorFactory.createExtraData(BftBlockCreatorFactory.java:108)
	at org.hyperledger.besu.consensus.qbft.blockcreation.QbftBlockCreatorFactory.createExtraData(QbftBlockCreatorFactory.java:93)
	at org.hyperledger.besu.consensus.common.bft.blockcreation.BftBlockCreatorFactory.lambda$create$1(BftBlockCreatorFactory.java:82)
	at org.hyperledger.besu.ethereum.blockcreation.AbstractBlockCreator.createBlock(AbstractBlockCreator.java:182)
	at org.hyperledger.besu.ethereum.blockcreation.AbstractBlockCreator.createBlock(AbstractBlockCreator.java:126)
	at org.hyperledger.besu.consensus.qbft.statemachine.QbftRound.createAndSendProposalMessage(QbftRound.java:100)
	at org.hyperledger.besu.consensus.qbft.statemachine.QbftBlockHeightManager.handleBlockTimerExpiry(QbftBlockHeightManager.java:125)
	at org.hyperledger.besu.consensus.common.bft.statemachine.BaseBftController.handleBlockTimerExpiry(BaseBftController.java:140)
	at org.hyperledger.besu.consensus.common.bft.EventMultiplexer.handleBftEvent(EventMultiplexer.java:54)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at org.hyperledger.besu.consensus.common.bft.BftProcessor.run(BftProcessor.java:60)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

@siladu siladu marked this pull request as draft October 6, 2021 19:37
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu marked this pull request as ready for review October 11, 2021 07:07
@siladu siladu requested a review from jframe October 11, 2021 07:08
@siladu
Copy link
Contributor Author

siladu commented Oct 11, 2021

Split out the transition bug onto another issue #2868

Copy link
Contributor

@jframe jframe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jframe jframe merged commit fc687ab into hyperledger:main Oct 11, 2021
jframe added a commit to jframe/besu that referenced this pull request Oct 12, 2021
commit 75b4a41
Author: Jason Frame <jasonwframe@gmail.com>
Date:   Tue Oct 12 13:47:01 2021 +1000

    add block header test case

    Signed-off-by: Jason Frame <jasonwframe@gmail.com>

commit 7d3001d
Author: Jason Frame <jasonwframe@gmail.com>
Date:   Tue Oct 12 13:31:08 2021 +1000

    undo unintentional change fixing unit test

    Signed-off-by: Jason Frame <jasonwframe@gmail.com>

commit 772a428
Author: Jason Frame <jasonwframe@gmail.com>
Date:   Tue Oct 12 13:21:56 2021 +1000

    Qbft validation selection was incorrectly being applied for non validator selection mode transitions

    Signed-off-by: Jason Frame <jasonwframe@gmail.com>

commit a30c314
Author: Antony Denyer <git@antonydenyer.co.uk>
Date:   Mon Oct 11 09:45:52 2021 +0100

    Allow Besu to host RPC endpoints via a plugin. (hyperledger#2754)

    This is a re-implementation of the initial POC done in PegaSysEng/pantheon#1909 by Danno Ferrin <danno.ferrin@gmail.com>

    * Only enable plugin rpc api when enabled on --rpc-http-api or --rpc-ws-apis
    * Only allow new rpc endpoints to be defined

    Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>

commit fc687ab
Author: Simon Dudley <simon.dudley@consensys.net>
Date:   Mon Oct 11 08:18:03 2021 +0100

    Qbft RPCs should be disabled after starting with or switching to use validator contract (hyperledger#2817)

    Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

commit 93013e9
Author: Usman Saleem <usman@usmans.info>
Date:   Fri Oct 8 15:51:40 2021 +1000

    Add QBFT support for evmtool (hyperledger#2807)

    * qbft support in evmtool

    Signed-off-by: Usman Saleem <usman@usmans.info>

commit 215e18c
Author: Sally MacFarlane <sally.macfarlane@consensys.net>
Date:   Fri Oct 8 12:32:52 2021 +1000

    master.svg -> main.svg (hyperledger#2864)

    Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>

commit 82ecef6
Author: Sally MacFarlane <sally.macfarlane@consensys.net>
Date:   Fri Oct 8 11:13:11 2021 +1000

    Fixed build badge (hyperledger#2863)

    * typos

    Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>

    * master -> main

    Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>

commit 5fbf0b1
Author: Sally MacFarlane <sally.macfarlane@consensys.net>
Date:   Thu Oct 7 19:22:47 2021 +1000

    changed to trace level logging (hyperledger#2858)

    Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>

commit fdd9352
Author: Diego López León <dieguitoll@gmail.com>
Date:   Wed Oct 6 21:51:33 2021 -0300

    Add a bash/zsh autocomplete script to distributions (hyperledger#538) (hyperledger#2854)

    Signed-off-by: Diego López León <dieguitoll@gmail.com>
jflo pushed a commit to jflo/besu that referenced this pull request Oct 14, 2021
…validator contract (hyperledger#2817)

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
jflo pushed a commit to jflo/besu that referenced this pull request Oct 14, 2021
…validator contract (hyperledger#2817)

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…validator contract (hyperledger#2817)

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants