forked from hyperledger/besu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
86 changed files
with
1,083 additions
and
570 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
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
72 changes: 72 additions & 0 deletions
72
...test-plugins/src/main/java/org/hyperledger/besu/plugins/TestRpcEndpointServicePlugin.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,72 @@ | ||
/* | ||
* 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.plugins; | ||
|
||
import static com.google.common.base.Preconditions.checkArgument; | ||
|
||
import org.hyperledger.besu.plugin.BesuContext; | ||
import org.hyperledger.besu.plugin.BesuPlugin; | ||
import org.hyperledger.besu.plugin.services.RpcEndpointService; | ||
import org.hyperledger.besu.plugin.services.rpc.PluginRpcRequest; | ||
|
||
import java.util.concurrent.atomic.AtomicReference; | ||
|
||
import com.google.auto.service.AutoService; | ||
|
||
@AutoService(BesuPlugin.class) | ||
public class TestRpcEndpointServicePlugin implements BesuPlugin { | ||
|
||
private final AtomicReference<String> stringStorage = new AtomicReference<>("InitialValue"); | ||
private final AtomicReference<Object[]> arrayStorage = new AtomicReference<>(); | ||
|
||
private String setValue(final PluginRpcRequest request) { | ||
checkArgument(request.getParams().length == 1, "Only one parameter accepted"); | ||
return stringStorage.updateAndGet(x -> request.getParams()[0].toString()); | ||
} | ||
|
||
private String getValue(final PluginRpcRequest request) { | ||
return stringStorage.get(); | ||
} | ||
|
||
private Object[] replaceValueList(final PluginRpcRequest request) { | ||
return arrayStorage.updateAndGet(x -> request.getParams()); | ||
} | ||
|
||
private String throwException(final PluginRpcRequest request) { | ||
throw new RuntimeException("Kaboom"); | ||
} | ||
|
||
@Override | ||
public void register(final BesuContext context) { | ||
context | ||
.getService(RpcEndpointService.class) | ||
.ifPresent( | ||
rpcEndpointService -> { | ||
rpcEndpointService.registerRPCEndpoint("tests", "getValue", this::getValue); | ||
rpcEndpointService.registerRPCEndpoint("tests", "setValue", this::setValue); | ||
rpcEndpointService.registerRPCEndpoint( | ||
"tests", "replaceValueList", this::replaceValueList); | ||
rpcEndpointService.registerRPCEndpoint( | ||
"tests", "throwException", this::throwException); | ||
rpcEndpointService.registerRPCEndpoint("notEnabled", "getValue", this::getValue); | ||
}); | ||
} | ||
|
||
@Override | ||
public void start() {} | ||
|
||
@Override | ||
public void stop() {} | ||
} |
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.