Skip to content

Commit

Permalink
Merge remote-tracking branch 'fab-10/optimize-snap-sync2' into optimi…
Browse files Browse the repository at this point in the history
…ze-snap-sync3

Signed-off-by: garyschulte <garyschulte@gmail.com>
  • Loading branch information
garyschulte committed Oct 6, 2022
2 parents 2191749 + 3ffb933 commit 01279f0
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 499 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

### Additions and Improvements
- Bring GraphQL into compliance with execution-api specs [#4112](https://github.com/hyperledger/besu/pull/4112)
- Improve UX of initial sync logs, pushing not relevant logs to debug level [#4486](https://github.com/hyperledger/besu/pull/4486)
- Refactor unverified forkchoice event [#4487](https://github.com/hyperledger/besu/pull/4487)
- Optimize pivot block selector on PoS networks [#4488](https://github.com/hyperledger/besu/pull/4488)
- Improve UX of initial sync logs, pushing not relevant logs to debug level [#4486](https://github.com/hyperledger/besu/pull/4486)

### Bug Fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.hyperledger.besu.config.GenesisConfigFile;
import org.hyperledger.besu.config.GenesisConfigOptions;
import org.hyperledger.besu.consensus.merge.MergeContext;
import org.hyperledger.besu.consensus.merge.PandaPrinter;
import org.hyperledger.besu.consensus.merge.PostMergeContext;
import org.hyperledger.besu.consensus.merge.TransitionBackwardSyncContext;
import org.hyperledger.besu.consensus.merge.TransitionContext;
Expand All @@ -31,7 +30,6 @@
import org.hyperledger.besu.ethereum.ProtocolContext;
import org.hyperledger.besu.ethereum.blockcreation.MiningCoordinator;
import org.hyperledger.besu.ethereum.chain.Blockchain;
import org.hyperledger.besu.ethereum.core.Difficulty;
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Synchronizer;
Expand Down Expand Up @@ -220,17 +218,6 @@ protected Synchronizer createSynchronizer(
protocolContext
.getConsensusContext(MergeContext.class)
.addNewUnverifiedForkchoiceListener(sync);
Optional<Difficulty> currentTotal =
protocolContext
.getBlockchain()
.getTotalDifficultyByHash(protocolContext.getBlockchain().getChainHeadHash());
PandaPrinter.init(
currentTotal, Difficulty.of(maybeForTTD.getTerminalTotalDifficulty().get()));
sync.subscribeInSync(PandaPrinter.getInstance());
protocolContext.getBlockchain().observeBlockAdded(PandaPrinter.getInstance());
protocolContext
.getConsensusContext(MergeContext.class)
.addNewUnverifiedForkchoiceListener(PandaPrinter.getInstance());
}

return sync;
Expand All @@ -251,11 +238,6 @@ private void initTransitionWatcher(
.getBlockchain()
.setBlockChoiceRule((newBlockHeader, currentBlockHeader) -> -1);

if (priorState.filter(prior -> !prior).isPresent()) {
// only print pandas if we had a prior merge state, and it was false
PandaPrinter.getInstance().printOnFirstCrossing();
}

} else if (composedCoordinator.isMiningBeforeMerge()) {
// if our merge state is set to mine pre-merge and we are mining, start mining
composedCoordinator.getPreMergeObject().enable();
Expand Down

This file was deleted.

58 changes: 0 additions & 58 deletions consensus/merge/src/main/resources/finalizedPanda.txt

This file was deleted.

Loading

0 comments on commit 01279f0

Please sign in to comment.