permissionsblockchainhyperledgerethereumhyperledger-besu

Hyperledger besu with permissioning enabled error


I am using the quickstart network provided by Hyperledger besu, and I want to test and see how permissioning works with the permissioning management dapp. I use this repo: https://github.com/bretthenderson/besu-quickstart So when I run the run-permissioning.sh script to build the dapp and run the test network everything works fine and the network starts succesfully then when I run the run-permissioning-dapp.sh script it works fine and it compiles and deploys the permissioning smart contracts then restarts the network with permissioning enabled but after that the bootnode container crashes with these logs :

2021-04-02 10:25:11.294+00:00 | main | INFO  | KeyPairUtil | Loaded public key 0xc1979a8a48693db804316b5acebe35e11731e1fb1c9c21ff7268ab25db6f6e03390a429b83cf0ec0865a7205f2669ec1ace652a3def11e2e01571c74939cbe22 from /opt/besu/keys/key
Setting logging level to INFO
2021-04-02 10:25:42.930+00:00 | main | INFO  | AbstractAltBnPrecompiledContract | Using LibEthPairings native alt bn128
2021-04-02 10:25:55.841+00:00 | main | INFO  | SECP256K1 | Using native secp256k1
2021-04-02 10:25:55.933+00:00 | main | INFO  | Besu | Starting Besu version: besu/v21.1.3/linux-x86_64/oracle_openjdk-java-11
2021-04-02 10:25:59.261+00:00 | main | WARN  | Besu | --min-gas-price has been ignored because --miner-enabled was not defined on the command line.
2021-04-02 10:26:00.299+00:00 | main | INFO  | Besu | Static Nodes file = /opt/besu/data/static-nodes.json
2021-04-02 10:26:00.322+00:00 | main | INFO  | StaticNodesParser | StaticNodes file /opt/besu/data/static-nodes.json does not exist, no static connections will be created.
2021-04-02 10:26:00.351+00:00 | main | INFO  | Besu | Connecting to 0 static nodes.
2021-04-02 10:26:00.368+00:00 | main | INFO  | Besu | Security Module: localfile
2021-04-02 10:26:00.661+00:00 | main | INFO  | DatabaseMetadata | Lookup database metadata file in data directory: /opt/besu/data
2021-04-02 10:26:01.646+00:00 | main | INFO  | RocksDBKeyValueStorageFactory | Existing database detected at /opt/besu/data. Version 1
2021-04-02 10:26:03.790+00:00 | main | INFO  | KeyPairUtil | Loaded public key 0xc1979a8a48693db804316b5acebe35e11731e1fb1c9c21ff7268ab25db6f6e03390a429b83cf0ec0865a7205f2669ec1ace652a3def11e2e01571c74939cbe22 from /opt/besu/keys/key
2021-04-02 10:26:04.310+00:00 | main | INFO  | ProtocolScheduleBuilder | Protocol schedule created with milestones: [Petersburg: 0]
ANTLR Tool version 4.7.1 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.7.1 used for parser compilation does not match the current runtime version 4.8ANTLR Tool version 4.7.1 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.7.1 used for parser compilation does not match the current runtime version 4.8ANTLR Tool version 4.7.1 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.7.1 used for parser compilation does not match the current runtime version 4.8ANTLR Tool version 4.7.1 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.7.1 used for parser compilation does not match the current runtime version 4.8

Error: node permissioning contract at address 0x0000000000000000000000000000000000009999 does not match the expected interface version 1 

I can't find anything about this error anywhere as hyperledger besu have a very small community...


Solution

  • The fix is to the issue is to add --permissions-nodes-contract-version=2 to your besu command line.

    This is because in v 2.0.0 of permissioning smart contracts repo we changed the interface as per the changelog https://github.com/ConsenSys/permissioning-smart-contracts/releases/tag/v2.0.0 It is in the besu docs here https://besu.hyperledger.org/en/stable/HowTo/Limit-Access/Specify-Perm-Version/ but I have already reported this issue and it has been fixed on the documentation of on-chain permissioning tutorial.

    you can find more details here

    1. Github issue
    2. Besu Docs