{"id":13720350,"url":"https://github.com/Consensys/PluginsAPIDemo","last_synced_at":"2025-05-07T12:31:12.409Z","repository":{"id":47197101,"uuid":"235721911","full_name":"Consensys/PluginsAPIDemo","owner":"Consensys","description":"Demo plugin for the Besu Plugins API","archived":true,"fork":false,"pushed_at":"2021-09-08T23:16:03.000Z","size":63,"stargazers_count":6,"open_issues_count":0,"forks_count":6,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-13T02:02:55.885Z","etag":null,"topics":["besu","ethereum","hyperledger","java","plugins-api"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Consensys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-23T04:22:41.000Z","updated_at":"2025-02-17T02:29:18.000Z","dependencies_parsed_at":"2022-09-05T19:11:25.394Z","dependency_job_id":null,"html_url":"https://github.com/Consensys/PluginsAPIDemo","commit_stats":null,"previous_names":["pegasyseng/pluginsapidemo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Consensys%2FPluginsAPIDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Consensys%2FPluginsAPIDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Consensys%2FPluginsAPIDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Consensys%2FPluginsAPIDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Consensys","download_url":"https://codeload.github.com/Consensys/PluginsAPIDemo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252876376,"owners_count":21818171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["besu","ethereum","hyperledger","java","plugins-api"],"created_at":"2024-08-03T01:01:02.800Z","updated_at":"2025-05-07T12:31:11.985Z","avatar_url":"https://github.com/Consensys.png","language":"Java","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# Besu Plugins API Demo Plugin\n\n## Purpose of the Demo Plugin\nExpose finer grain details about the gas usage in blocks via Prometheus\n\n### Services Used\n- **PicoCLIOptions** \n  * To add configuration options to change the name of the metrics\n- **MetricCategoryRegistry** and **MetricsSystem** \n  * To add the metrics to the metrics endpoint\n- **BesuEvents** \n  * To listen to propagated blocks and capture relevant data\n\n### Plugin Lifecycle\n- **Register** \n  * Add the configuration options and metrics category\n- **Start** \n  * Connect to the Besu events\n- **Stop** \n  * Disconnect from the Besu events\n\n\n## To Execute the Demo\n\nBuild the plugin jar\n```\n./gradlew build\n```\n\nInstall the plugin into `$BESU_HOME`\n\n```\nmkdir $BESU_HOME/plugins\ncp build/libs/*.jar $BESU_HOME/plugins\n```\n\nRun the Besu node w/o customized metric names\n```\n$BESU_HOME/bin/besu --config-file=demo-options.toml\n```\n\nThen go to http://localhost:9545/metrics to see the metrics\n\nTo change the names of the metrics use the plugin CLI options\n```\n$BESU_HOME/bin/besu --config-file=demo-options.toml \\\n  --plugin-gas-spending-metrics-name=a_name \n  --plugin-gas-spending-metrics-prefix=a_prefix_\n```` ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FConsensys%2FPluginsAPIDemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FConsensys%2FPluginsAPIDemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FConsensys%2FPluginsAPIDemo/lists"}