The EthQL API spec specifies pulledStates and knownStates in the
`syncing` query. Previously we always returned null. This plumbs through
the needed data so that the synchronization states can report the
fast sync progress via EthQL, as well as the `eth_syncing` JSON-RPC.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Mark Plugins Data and Events as stable
Remove the @Unstable annotations form the data and BesuEvents services.
This means that no breaking changes (like removing methods or
changing signatures) will occur without proper notice and versioning
bumps.
* tweak build check
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Co-authored-by: Tim Beiko <t.beiko23@gmail.com>
Create plugin APIs for the block body (just transactions and ommers) and
add the block body to the block propagation listener context.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Removes as many Gradle 7.0 compatibility issues as possible
* `baseName` -> `archiveBaseName`
* `extension` -> `archiveExtension`
* `destinationDir` -> `destinationDirectory`
* `runtime` -> `runtimeOnly`
* Change some log4j-api and log4j-core dependencies
* Remove an unneeded and outdated plugin (`net.ltgt.apt`)
* tweak the plugin-api change detector's property annotations.
Warnings still exist with one external plugin used for license file
checking that we do not control the source code for.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Generally, byte[] -> Bytes of some form. Most of the changes are the
side effect of the type changes or chaning to the names of Tuweni
equivilant calls (getHexString->toHexString, etc).
UnformattedData -> Bytes
Log Topics went from Hash to Bytes32
Difficulty went to UInt256 to match core impl.
Quantity lost BinaryData and is just getValue() and toHexString()
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Implement a dynamic reload mechanism for Besu plugins.
- Added `reloadConfiguration` method in `plugin-api`.
- Added `admin_reloadPlugin` RPC endpoint.
- if the first parameter is specified the API will attempt to reload the individual plugin if found in the map.
- if no parameter is specified the API will attempt to reload all plugins.
- Added method in `BesuPluginContextImpl` to retrieve a map of named plugins.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
Windows sorts files case insensitively, resulting in a different hash
for the API check because the files are in a different order.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* PIE-2016: Added PoaQueryService method that returns local node signer address.
Signed-off-by: Mark Terry <mark.terry@consensys.net>
* [PIE-2016] PR fixes.
Signed-off-by: Mark Terry <mark.terry@consensys.net>
The IbftQueryService has been added to the Plugin-api, along with an implementation.
This allows IBFT specific aspects of a block header to be queried (round number, and signers in block).
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
* Add totalDiffculty to BlockPropagated events.
The chain head block can be contentious with many fork blocks (ommers) propagating on the network. We should add a totalDifficulty to make it easier to see which block is most likely the current head.
- added `BlockPropagated` interface in `plugin-api`.
- updated `BesuEvents.onBlockPropagated` method to take a `BlockPropagated` instead of a `BlockHeader`.
- created `BlockPropagatedSubscriber` in `BlockBroadcaster`.
- changed type of `BlockBroadcaster.blockPropagatedSubscribers` from `Consumer<Block>` to `BlockPropagatedSubscriber`.
- updated unit tests accordingly to all changes.
- updated known hash in `build.gradle` file of `plugin-api`: new value is `4SAeaZIJMsDvUK5Wp2RzU8TlHacslALnM/4yvVhsMtY=`
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
[PIE-1858] Added functionality to register custom metrics categories and exposed some PoA data for metrics.
Signed-off-by: Mark Terry <mark.terry@consensys.net>
* Update version to 1.2.5-SNAPSHOT (#42)
Signed-off-by: Edward Evans <edward.joshua.evans@gmail.com>
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Store db metadata file in the root data directory
The database metadata file should be stored in the root data directory rather than the database subdirectory.
The database subdirectory is owned by the database itself and should not be directly manipulated by the node.
- first look in the data directory for the metadata file
- if the metadata file is found there, process it as normal
- if no metadata file is found in the root directory, look in the database subdirectory
- if the file is found here, copy it to the root directory, and run based on the root directory version
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* add logs
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* create database directory if database not detected
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* change plugin API know hash
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* adding in spdx-license-identifier & updated check for the same; removing license check from spotless
Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
* Change CheckSpdxHeader to a task.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Ensure `plugin-api` module gets published at the correct maven path
* Move `plugins` to `plugin-api`
Signed-off-by: Edward Evans <edward.evans@consensys.net>
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>