-
Notifications
You must be signed in to change notification settings - Fork 138
Add Besu Plugin information #142
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
01a3a6d
Add Besu Plugin information.
bgravenorst 8c3bc77
Added webinar link.
bgravenorst a016dfd
Address Tech Review comments.
bgravenorst d7e72e0
Address review feedback.
bgravenorst 4cf551c
Add javadoc links.
bgravenorst 88aa93e
Merge branch 'master' into BP-12
bgravenorst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,48 @@ | ||
| description: Plugins | ||
| <!--- END of page meta data --> | ||
|
|
||
| # Plugins | ||
|
|
||
| You can extend Hyperledger Besu functionality by building Java plugins. Use the | ||
| Plugin API to take data from any Besu network, public or permissioned, and feed | ||
| it into an application or system. | ||
|
|
||
| For example, create a plugin to add additional monitoring functionality or | ||
| stream event data to a third-party application. The API exposes data about the | ||
| following components: | ||
|
|
||
| * Blocks | ||
| * Balances | ||
| * Transactions | ||
| * Smart contracts | ||
| * Execution results | ||
| * Logs | ||
| * Syncing state | ||
|
|
||
|  | ||
|
|
||
| The Plugin API provides access to [interfaces](../Reference/Plugin-API-Interfaces.md) that allow you to build | ||
| the plugin. | ||
|
|
||
| !!! tip | ||
| View the [Plugin API webinar](https://youtu.be/78sa2WuA1rg) for an example of how to build a plugin. | ||
|
|
||
| The [Plugin API Javadoc](https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/index.html) provides additional information about the available interfaces. | ||
|
|
||
| ## Install Plugins | ||
|
|
||
| The plugin (`.jar`) must be copied to the `plugins` directory to allow Besu | ||
| access and use the plugin. | ||
|
|
||
| !!! important | ||
| If not already present, the `plugins` directory must be created one directory | ||
| level below (`../`) the `besu` executable. | ||
|
|
||
| Each plugin in the directory has the following lifecycle events: | ||
|
|
||
| * **Register** - Executed when Besu starts. Besu checks plugin compatibility and registers plugins. | ||
| * **Start** - Plugins are started after being successfully registered. | ||
| * **Stop** - Plugins are stopped by Besu. | ||
|
|
||
| !!! note | ||
| Besu does not guarantee the order plugins are called during lifecycle events. |
This file contains hidden or 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,38 @@ | ||
| description: Plugin interfaces | ||
| <!--- END of page meta data --> | ||
|
|
||
| # Plugin API Interfaces | ||
|
|
||
| API interfaces in Hyperledger Besu allow users to [build plugins](../Concepts/Plugins.md) to | ||
| extend Besu functionality. | ||
|
|
||
| The [Plugin API Javadoc](https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/index.html) provides additional information about the available interfaces. | ||
|
|
||
| ## Core Plugin Classes | ||
|
|
||
| The following interfaces provide core plugin classes. | ||
|
|
||
| | Interface | Description | | ||
| |--------------------|----------------------------------------------------------| | ||
| | [**BesuContext**](https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/BesuContext.html) | Allows plugins to access Besu services. | | ||
| | [**BesuPlugin**](https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/BesuPlugin.html) | Used to manage the plugin lifecycle. | | ||
|
|
||
|
|
||
| ## Plugin Services | ||
|
|
||
| The following interfaces provide services that can be retrieved. | ||
|
|
||
| | Interface | Description | | ||
| |--------------------|----------------------------------------------------------| | ||
| | [**BesuEvents**](https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/BesuEvents.html) | Allows plugins to attach to various events during Besu operation. | | ||
| | [**BesuConfiguration**](https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/BesuConfiguration.html) | Provides file system locations of Besu's storage. | | ||
| | [**IbftQueryService**](https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/query/IbftQueryService.html) | Allows IBFT 2.0 aspects of the blockchain to be queried. | | ||
| | [**MetricCategoryRegistry**](https://javadoc.io/static/org.hyperledger.besu/plugin-api/1.3.4/org/hyperledger/besu/plugin/services/metrics/MetricCategoryRegistry.html) | Adds a new metrics category to the CLI. | | ||
| | [**MetricsSystem**](https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/MetricsSystem.html) | Register metrics with the Prometheus endpoint. | | ||
| | [**PoaQueryService**](https://javadoc.io/static/org.hyperledger.besu/plugin-api/1.3.4/org/hyperledger/besu/plugin/services/query/PoaQueryService.html) | Query the current state of Clique and IBFT 2.0 consensus protocols. | | ||
| | [**PicoCLIOptions**](https://javadoc.io/static/org.hyperledger.besu/plugin-api/1.3.4/org/hyperledger/besu/plugin/services/PicoCLIOptions.html) | Adds CLI commands to the Besu command line. | | ||
| | [**StorageService**](https://javadoc.io/static/org.hyperledger.besu/plugin-api/1.3.4/org/hyperledger/besu/plugin/services/StorageService.html) | Allows plugins to register as a storage engine. | | ||
|
|
||
| To use the interfaces in your plugin, ensure the [Gradle build file](https://github.com/PegaSysEng/PluginsAPIDemo/blob/master/build.gradle) contains | ||
| the `https://hyperledger-org.bintray.com/besu-repo` repository and the | ||
| `plugin-api` dependency. | ||
This file contains hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.