Besu Grid Integration

This plugin allows you to install and use Hyperledger Besu in Ethereum Grid.

Progress

  • Get releases from Bintray
  • Download packed Jar files from Bintray
  • Verify Signature
  • Extract all Jar files
  • Detect JDK (80% windows, 0% others)
  • Install JDK with elevated process (windows)
  • Install JDK (others)
  • Specify plugin + dependency (this repo)
  • Detect Java dependency in Grid
  • Run Java setup in Grid if Pantheon is installed (if necessary)
  • Generate flags for the JVM and Pantheon start (might need extra plugin metadata)
  • Start java.exe (the dependency not binary) with flags and monitor process (windows)
  • Start java with flags and monitor process (others)

Screenshots

About Page

about page

Bintray Release List + Nano

version list

Run

version list

Implementation

index.js

module.exports = {
  name: 'besu',
  displayName: 'Besu',
  type: 'client',
  repository: 'https://bintray.com/hyperledger/besu-repo/besu',
  dependencies: {
    runtime: [ // new Grid API for runtime dependency
      {
        name: 'Java',
        type: 'JDK',
        version: '11'
      }
    ]
  },
  settings: [
    // TODO needs feedback about best defaults and most important settings
  ],
  about: {
    description: `
    Hyperledger Besu is an open-source Ethereum client developed under the Apache 2.0 license and written in Java. It runs on the Ethereum public network, private networks, and test networks such as Rinkeby, Ropsten, and Görli. Pantheon implements Proof of Work (Ethash) and Proof of Authority (IBFT 2.0 and Clique) consensus mechanisms.

    You can use Besu to develop enterprise applications requiring secure, high-performance transaction processing in a private network.

    Besu supports enterprise features including privacy and permissioning.
    `,
    links: [
      {
        name: 'GitHub Repository',
        url: 'https://github.com/hyperledger/besu'
      },
      {
        name: 'Project Tracker',
        url: 'https://pegasys1.atlassian.net/secure/Dashboard.jspa?selectPageId=10117'
      }
    ],
    docs: [
      {
        name: 'Besu Docs',
        url: 'https://besu.hyperledger.org/en/latest/'
      }
    ]

  }
}

Challenges / Issues

see issues

  • Bintray support not fully implemented in electron-app-manager -> use github mirror
  • Pantheon GitHub releases contains only source
  • Couldn't find out the PGP public keys for the corresponsing .asc files
  • Java installer
    • spawn causes EACCES error
    • needs elevated shell / native module to spawn elevated shell on windows (not tested on other OS)
      • native modules need to be compiled with electron headers
      • alternative: manual java installation (see screenshot above: "install java" could open browser and download installer)
    • shows a license dialog which can be surpressed with switches /s
    • JDK installer does not set JAVA_HOME or PATH which is used for detection
    • download produced occasional ECONNRESET
    • user needs to agree / disagree license somehow
  • JRE (jre-8u221-windows-x64.exe) seems not to be working
    • Unrecognized option: --add-opens
  • Grid is not handling the de-installation of a 32 bit or older JRE (https://docs.pantheon.pegasys.tech/en/latest/HowTo/Get-Started/Install-Binaries/)
  • All jar files / contents of package need to be extracted. Usually grid extracts only the executable before every start and does a signature check to avoid swapped executables
  • Not sure if Grid should replicate the bin/pantheon script behavior e.g. start Java with flags etc or run scripts instead
    • Plugin needs to specify classpath setting in this case based on extraction location
    • Grid-UI should allow to configure JVM as well as Pantheon in this case "Add default JVM options here. You can also use JAVA_OPTS and PANTHEON_OPTS to pass JVM options to this [start] script."

How to use

not possible yet

  • Download Grid
  • Run Grid
  • Click on settings icon
  • Click on edit config
  • Add TODO
  • Click Save
  • Click Restart