diff --git a/docs/plugins/index.md b/docs/plugins/index.md new file mode 100644 index 00000000000..908bf159e84 --- /dev/null +++ b/docs/plugins/index.md @@ -0,0 +1,9 @@ +--- +title: Extend Besu using plugins +sidebar_position: 1 +sidebar_label: Introduction +id: index +description: Besu plugins overview +--- + +# Extend Hyperledger Besu using plugins diff --git a/docs/private-networks/_category_.json b/docs/private-networks/_category_.json deleted file mode 100644 index 865a111a8b4..00000000000 --- a/docs/private-networks/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Private networks", - "position": 1 -} diff --git a/docs/public-networks/.meta.yml b/docs/public-networks/.meta.yml deleted file mode 100644 index 47f9110472f..00000000000 --- a/docs/public-networks/.meta.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# Meta items setting with yaml files is an insider only feature -# see https://squidfunk.github.io/mkdocs-material/reference/#built-in-meta-plugin - -tags: - - public networks diff --git a/docusaurus.config.js b/docusaurus.config.js index 48a9180a192..98ba99729a2 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -132,6 +132,13 @@ const config = { position: "left", label: "Private networks", }, + { + type: "docSidebar", + sidebarId: "pluginsDocSidebar", + docId: "index", + position: "left", + label: "Plugins", + }, { type: "docsVersionDropdown", position: "right", @@ -215,6 +222,31 @@ const config = { }, ], }, + { + title: "Plugins", + items: [ + { + label: "Introduction", + to: "/plugins", + }, + { + label: "How to guides", + to: "/plugins/how-to", + }, + { + label: "Concepts", + to: "/plugins/concepts", + }, + { + label: "Tutorials", + to: "/plugins/tutorials", + }, + { + label: "Reference", + to: "/plugins/reference", + }, + ], + }, { title: "Community", items: [ diff --git a/project-words.txt b/project-words.txt index c716fd35760..3b55bc60cb9 100644 --- a/project-words.txt +++ b/project-words.txt @@ -316,6 +316,7 @@ librocksdbjni lifecycles lightchaindata lighthouserc +Linea linenums linkify livenodes @@ -563,6 +564,7 @@ serviceaccounts setaf setext shiki +Shomei showinfo sida sighup diff --git a/sidebars.js b/sidebars.js index 5a8c0575d4a..14018720975 100644 --- a/sidebars.js +++ b/sidebars.js @@ -2,6 +2,7 @@ const sidebars = { publicDocSidebar: [{ type: "autogenerated", dirName: "public-networks" }], privateDocSidebar: [{ type: "autogenerated", dirName: "private-networks" }], + pluginsDocSidebar: [{ type: "autogenerated", dirName: "plugins" }], }; module.exports = sidebars; diff --git a/src/components/HomepageCards/index.tsx b/src/components/HomepageCards/index.tsx index 0511274aa42..b6cd42e1586 100644 --- a/src/components/HomepageCards/index.tsx +++ b/src/components/HomepageCards/index.tsx @@ -25,7 +25,7 @@ const CardList: CardItem[] = [ // prettier-ignore description: ( <> - Run Besu as an execution client on Ethereum Mainnet and Ethereum public testnets, such as Goerli and Sepolia. + Run Besu as an execution client on Ethereum Mainnet and public testnets, such as Goerli and Sepolia. ), buttonName: "Get started", @@ -43,6 +43,18 @@ const CardList: CardItem[] = [ buttonName: "Get started", buttonType: "secondary", }, + { + title: "🔌 Plugins", + link: "/plugins", + // prettier-ignore + description: ( + <> + Extend Besu's functionality on both public and private networks using the Plugin API. + + ), + buttonName: "Get started", + buttonType: "secondary", + }, ]; function Card({ title, link, description, buttonName, buttonType }: CardItem) { @@ -81,7 +93,7 @@ export default function HomepageCards(): JSX.Element {

Hyperledger Besu is an open source Ethereum client developed under the Apache 2.0 license and written in Java. It runs on public and private - networks: + networks. You can also extend Besu's functionality using plugins.

{CardList.map((props, idx) => ( diff --git a/versioned_docs/version-24.3.0/plugins/concepts/_category_.json b/versioned_docs/version-24.3.0/plugins/concepts/_category_.json new file mode 100644 index 00000000000..13c604ec775 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/concepts/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Concepts", + "position": 4, + "link": { + "type": "generated-index", + "slug": "/plugins/concepts" + } +} diff --git a/versioned_docs/version-24.3.0/plugins/concepts/best-practices.md b/versioned_docs/version-24.3.0/plugins/concepts/best-practices.md new file mode 100644 index 00000000000..5f936e474d2 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/concepts/best-practices.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 2 +description: Learn about best practices with creating a plugin. +--- + +# Best practices + +TO DO: This page should contain an overview of best practices when creating plugins. +This can include performance considerations and security best practices. diff --git a/versioned_docs/version-24.3.0/plugins/concepts/lifecycle.md b/versioned_docs/version-24.3.0/plugins/concepts/lifecycle.md new file mode 100644 index 00000000000..21d6d4da414 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/concepts/lifecycle.md @@ -0,0 +1,14 @@ +--- +sidebar_position: 1 +description: Learn about the plugin lifecycle. +--- + +# Plugin lifecycle + +TO DO: This page should contain an explanation of the plugin lifecycle. +It can include a diagram of the lifecycle. +It might take +[this plugin lifecycle overview](https://www.youtube.com/watch?feature=shared&t=919&v=78sa2WuA1rg) +as a starting point, with updates as needed. + +This page should also explain "hooks," and how they can alter the lifecycle events within Besu. diff --git a/versioned_docs/version-24.3.0/plugins/get-started/_category_.json b/versioned_docs/version-24.3.0/plugins/get-started/_category_.json new file mode 100644 index 00000000000..c4248926f9a --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/get-started/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "Get started", + "position": 2, + "collapsed": false, + "link": { + "type": "generated-index", + "slug": "/plugins/get-started" + } +} diff --git a/versioned_docs/version-24.3.0/plugins/get-started/create-a-plugin.md b/versioned_docs/version-24.3.0/plugins/get-started/create-a-plugin.md new file mode 100644 index 00000000000..e0512468849 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/get-started/create-a-plugin.md @@ -0,0 +1,16 @@ +--- +sidebar_position: 1 +description: Get started by creating a simple plugin. +--- + +# Create a simple plugin + +TO DO: This page should contain a step-by-step tutorial on creating a minimal +plugin for a basic use case. + +The goal is to teach the user the essential workflow and components of any +plugin (e.g., lifecycle events, configuration, using the API, deployment, see +results) so they can get started quickly on their specific use case. + +This tutorial can link to other pages that go into more detail about each step, +and also link to more advanced next steps / use cases. diff --git a/versioned_docs/version-24.3.0/plugins/how-to/_category_.json b/versioned_docs/version-24.3.0/plugins/how-to/_category_.json new file mode 100644 index 00000000000..b30183d0d8c --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/how-to/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "How to", + "position": 3, + "link": { + "type": "generated-index", + "slug": "/plugins/how-to" + } +} diff --git a/versioned_docs/version-24.3.0/plugins/how-to/configure-a-plugin.md b/versioned_docs/version-24.3.0/plugins/how-to/configure-a-plugin.md new file mode 100644 index 00000000000..b562246b602 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/how-to/configure-a-plugin.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 1 +description: Configure a plugin. +--- + +# Configure a plugin + +TO DO: This page should contain instructions on configuring a plugin, and +explain configuration parameter norms. diff --git a/versioned_docs/version-24.3.0/plugins/how-to/deploy-a-plugin.md b/versioned_docs/version-24.3.0/plugins/how-to/deploy-a-plugin.md new file mode 100644 index 00000000000..5fc95324536 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/how-to/deploy-a-plugin.md @@ -0,0 +1,12 @@ +--- +sidebar_position: 5 +description: Deploy a plugin. +--- + +# Deploy a plugin + +TO DO: This page should contain instructions on deploying a plugin in a +production environment. +It might take +[this example deployment demo](https://www.youtube.com/watch?v=78sa2WuA1rg&t=1923s) +as a starting point, adding further considerations for a production environment. diff --git a/versioned_docs/version-24.3.0/plugins/how-to/test-a-plugin.md b/versioned_docs/version-24.3.0/plugins/how-to/test-a-plugin.md new file mode 100644 index 00000000000..2761af2970c --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/how-to/test-a-plugin.md @@ -0,0 +1,8 @@ +--- +sidebar_position: 4 +description: Test a plugin. +--- + +# Test a plugin + +TO DO: This page should contain instructions on testing a plugin. diff --git a/versioned_docs/version-24.3.0/plugins/how-to/troubleshoot.md b/versioned_docs/version-24.3.0/plugins/how-to/troubleshoot.md new file mode 100644 index 00000000000..a179ee38c7c --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/how-to/troubleshoot.md @@ -0,0 +1,10 @@ +--- +sidebar_position: 6 +description: Troubleshoot common issues. +--- + +# Troubleshoot + +TO DO: This page should contain instructions for troubleshooting common issues developers might +encounter when creating or using plugins. +This can include a list of error messages and instructions for writing acceptance tests. diff --git a/versioned_docs/version-24.3.0/plugins/how-to/use-plugin-api.md b/versioned_docs/version-24.3.0/plugins/how-to/use-plugin-api.md new file mode 100644 index 00000000000..7375f9e98f2 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/how-to/use-plugin-api.md @@ -0,0 +1,11 @@ +--- +sidebar_position: 2 +description: Use the Plugin API interfaces and methods. +--- + +# Use the Plugin API + +TO DO: This page should contain instructions on accessing Besu resources using +the Plugin API interfaces, services, methods, etc. +It can contain generic instructions and link to the Plugin API reference for +specific method parameters and examples. diff --git a/versioned_docs/version-24.3.0/plugins/how-to/use-plugin-metrics.md b/versioned_docs/version-24.3.0/plugins/how-to/use-plugin-metrics.md new file mode 100644 index 00000000000..66e12ad9c25 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/how-to/use-plugin-metrics.md @@ -0,0 +1,11 @@ +--- +sidebar_position: 3 +description: Extend Besu metrics. +--- + +# Use plugin metrics + +TO DO: This page should contain instructions on using plugin metrics, and +extending [Besu metrics](../../public-networks/how-to/monitor/metrics.md) – for +example, using a +[validator monitoring plugin](https://github.com/Consensys/doc.quorumplugins/blob/master/docs/HowTo/Configure/Besu-Plugins/Monitor-Validators.md). diff --git a/versioned_docs/version-24.3.0/plugins/index.md b/versioned_docs/version-24.3.0/plugins/index.md new file mode 100644 index 00000000000..f7710cebcfe --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/index.md @@ -0,0 +1,37 @@ +--- +title: Extend Besu using plugins +sidebar_position: 1 +sidebar_label: Introduction +id: index +description: Besu plugins overview +--- + +# Extend Hyperledger Besu using plugins + +You can extend Hyperledger Besu's functionality by creating Java plugins or using existing +[open source Besu plugins](reference/resources.md#open-source-plugins). +Use the [Plugin API](reference/plugin-api/index.md) to get data from any public or private Besu +network and feed it into an application or system. + +For example, you can create a plugin to add more monitoring functionality or to 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 + +Get started by [creating a simple plugin](get-started/create-a-plugin.md). + +## Architecture + +The following diagram outlines the high-level architecture of the Plugin API. + +![Besu plugin API](../assets/images/Hyperledger-Besu-Plugin-API.png) + +If you have questions about creating or using Besu plugins, ask on the **besu** channel on +[Hyperledger Discord](https://discord.gg/hyperledger). diff --git a/versioned_docs/version-24.3.0/plugins/reference/_category_.json b/versioned_docs/version-24.3.0/plugins/reference/_category_.json new file mode 100644 index 00000000000..54d6a07c5cd --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/reference/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Reference", + "position": 6, + "link": { + "type": "generated-index", + "slug": "/plugins/reference" + } +} diff --git a/versioned_docs/version-24.3.0/plugins/reference/plugin-api/index.md b/versioned_docs/version-24.3.0/plugins/reference/plugin-api/index.md new file mode 100644 index 00000000000..db7799c5d28 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/reference/plugin-api/index.md @@ -0,0 +1,15 @@ +--- +sidebar_position: 1 +sidebar_label: Plugin API +description: See the Plugin API reference. +--- + +# Plugin API reference + +TO DO: This section should contain a manually formatted reference of the Plugin API. +The [existing Javadoc spec](https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/index.html) +might be used as a starting point, but should be updated to reflect the current API. + +This section should document each API interface, method, etc., with a description, parameters, +return values, and an example usage. +It might be broken up into separate pages in this category, e.g., one page for each interface. diff --git a/versioned_docs/version-24.3.0/plugins/reference/resources.md b/versioned_docs/version-24.3.0/plugins/reference/resources.md new file mode 100644 index 00000000000..0a45c24858c --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/reference/resources.md @@ -0,0 +1,21 @@ +--- +sidebar_position: 2 +description: See additional resources for Besu plugins. +--- + +# Resources + +See the following additional resources for Besu plugins. + +## Open source plugins + +You can use the following open source Besu plugins: + + - [Besu plugins](https://github.com/Consensys/besu-plugins) + - [Besu-Shomei Plugin](https://github.com/Consensys/besu-shomei-plugin) + - [Linea Besu plugins](https://github.com/Consensys/linea-sequencer) + +## Get support + +If you have questions about creating or using Besu plugins, ask on the **#besu** channel on +[Hyperledger Discord](https://discord.gg/hyperledger). diff --git a/versioned_docs/version-24.3.0/plugins/tutorials/_category_.json b/versioned_docs/version-24.3.0/plugins/tutorials/_category_.json new file mode 100644 index 00000000000..d39d6b29127 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/tutorials/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Tutorials", + "position": 5, + "link": { + "type": "generated-index", + "slug": "plugins/tutorials" + } +} diff --git a/versioned_docs/version-24.3.0/plugins/tutorials/create-a-linea-plugin.md b/versioned_docs/version-24.3.0/plugins/tutorials/create-a-linea-plugin.md new file mode 100644 index 00000000000..75ca5321f55 --- /dev/null +++ b/versioned_docs/version-24.3.0/plugins/tutorials/create-a-linea-plugin.md @@ -0,0 +1,12 @@ +--- +sidebar_position: 1 +description: Create a Linea plugin. +--- + +# Create a Linea plugin + +TO DO: This page should contain a step-by-step tutorial on creating a +[Linea plugin](https://github.com/Consensys/linea-arithmetization). + +It should walk the user through the plugin development process from start (code +template, configuration) to finish (deployment, see results). diff --git a/versioned_sidebars/version-24.3.0-sidebars.json b/versioned_sidebars/version-24.3.0-sidebars.json index 32910f92f17..f7620621641 100644 --- a/versioned_sidebars/version-24.3.0-sidebars.json +++ b/versioned_sidebars/version-24.3.0-sidebars.json @@ -10,5 +10,11 @@ "type": "autogenerated", "dirName": "private-networks" } + ], + "pluginsDocSidebar": [ + { + "type": "autogenerated", + "dirName": "plugins" + } ] }