-
Notifications
You must be signed in to change notification settings - Fork 835
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix transaction pool issue (#4964) * Cache empty slots (#4874) * clear after each block and copy during clone * fix transaction pool issue * add block replay * support in-memory snapshots * Keep Worldstate Storage open for Bonsai archive latest layer (#5039) * bonsai layered worldstate subscription * unsubscribe from worldstatestorage on close of BonsaiLayeredWorldState * minor txpool logging improvements * Avoid triggering a calculate root hash when empty slot cache is not empty. * use the updater cache to get an account during block processing (#4897) * Worldstate-only resync behavior (#4875) * use debug rpc endpoint to resync worldstate * Reset transaction pool state every time the initial sync is done * init heal code --------- Signed-off-by: Karim TAAM <[email protected]> Signed-off-by: garyschulte <[email protected]> Signed-off-by: Justin Florentine <[email protected]> Signed-off-by: Ameziane H <[email protected]> Signed-off-by: ahamlat <[email protected]> Signed-off-by: Simon Dudley <[email protected]> Co-authored-by: matkt <[email protected]> Co-authored-by: garyschulte <[email protected]> Co-authored-by: ahamlat <[email protected]> Co-authored-by: Simon Dudley <[email protected]> Co-authored-by: Fabio Di Fabio <[email protected]>
- Loading branch information
1 parent
f997066
commit 34b238c
Showing
67 changed files
with
1,066 additions
and
1,008 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...ava/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugResyncWorldstate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright Hyperledger Besu Contributors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods; | ||
|
||
import org.hyperledger.besu.ethereum.api.jsonrpc.RpcMethod; | ||
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext; | ||
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse; | ||
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse; | ||
import org.hyperledger.besu.ethereum.chain.Blockchain; | ||
import org.hyperledger.besu.ethereum.core.Synchronizer; | ||
import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule; | ||
|
||
public class DebugResyncWorldstate implements JsonRpcMethod { | ||
private final Synchronizer synchronizer; | ||
private final ProtocolSchedule protocolSchedule; | ||
private final Blockchain blockchain; | ||
|
||
public DebugResyncWorldstate( | ||
final ProtocolSchedule protocolSchedule, | ||
final Blockchain blockchain, | ||
final Synchronizer synchronizer) { | ||
this.synchronizer = synchronizer; | ||
this.protocolSchedule = protocolSchedule; | ||
this.blockchain = blockchain; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return RpcMethod.DEBUG_RESYNC_WORLDSTATE.getMethodName(); | ||
} | ||
|
||
@Override | ||
public JsonRpcResponse response(final JsonRpcRequestContext request) { | ||
protocolSchedule | ||
.getByBlockNumber(blockchain.getChainHeadBlockNumber()) | ||
.getBadBlocksManager() | ||
.reset(); | ||
return new JsonRpcSuccessResponse( | ||
request.getRequest().getId(), synchronizer.resyncWorldState()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.