The most recent set of enhancements to the enterprise-friendly Ethereum client.
Last year, PegaSys released support of private transactions in Besu, using Orion as the private transaction manager. Since then, the PegaSys team has been working to build out supporting privacy features. The most recent set of enhancements include:
- Ability to add and remove members from privacy groups.
- Filters and subscriptions for private contracts.
- Web3j and web3js support for private transactions and filters.
Privacy Features for Besu 1.5
Add and Remove Members from Privacy Groups
Until now, privacy groups have had static memberships. Once a group was created, there existed no option to add or remove a member into an existing group. Each time a member wanted to be added or removed, a new privacy group had to be created, and all transaction history from the previous group would be lost.
With flexible privacy groups, new members can be added and existing members can be removed. When a member is added, all previous private transactions in the group are sent to the new member so they can access the group history. This enables group membership to be updated as organisations join and leave groups to match business requirements.
We’ve done some preliminary performance testing that indicates flexible privacy groups do not create a performance bottleneck. The two factors that may impact performance at a certain scale are:
1. Number of members in a privacy group. When a private transaction is sent, it must be distributed to all members in a privacy group. An acknowledgement must be received from all members before the public commitment transaction is created and submitted. The larger a privacy group is, the longer it may take for these acknowledgements to be sent and received. This applies to both flexible privacy groups and the previously released static privacy groups.
2. Volume of transactions in the privacy group. When a new member is added to a privacy group, all previous transactions in the group are distributed to the new member’s private transaction manager and then processed. Depending on the number of prior existing transactions in the group, this may take some time.
Note that the flexible privacy group functionality is in early access mode while we complete performance testing and collect user feedback before finalising the API methods.
Filters and Subscriptions for Private Events
Filters and subscriptions are now supported for private contracts. Filters and subscriptions for private contracts function mostly in the same way as for public contracts. The difference is that you need to specify the privacy group ID of the privacy group the contract belongs to in order to access the logs or subscribe. This enables using the same patterns in your app that you are already using for public contracts to be notified about events occurring in private transactions.
Web3j and Web3js Client Library Support
The web3j and web3js-eea client libraries both have support for flexible privacy groups and filters and subscriptions for private events. This makes it easier for you to build your app using these features.
Getting Started with Privacy Groups
We love hearing your feedback! Find us on the Hyperledger Besu RocketChat or Orion Gitter. Building a solution that’s easy to use is important to us, so if you’re having trouble getting started, please let us know and we can help you to figure it out.
Learn how to set up and run Hyperledger Besu with the team that built and maintains the Ethereum client.
Originally published at https://pegasys.tech on June 25, 2020.