Git Product home page Git Product logo

besu-verkle-trie-old's Introduction

besu-verkle-trie

besu-verkle-trie is a Java library that implements the Java part of Verkle Trie for Ethereum.

Table of Contents

Installation

besu-verkle-trie is available on Hyperledger Artifactory.

To install besu-verkle-trie, you can use the build automation tool Gradle.

Building

To build the project, use the build task:

gradle build

To format the code according to the project's style guide, use the spotlessApply task:

gradle spotlessApply

Contribute

Contributions are welcome! Please see - CONTRIBUTING.md for details.

LICENSE

besu-verkle-trie is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

besu-verkle-trie-old's People

Contributors

thomas-quadratic avatar matkt avatar ryjones avatar gfukushima avatar

besu-verkle-trie-old's Issues

Implement File Storing Mechanism for `toDot` Method Output in VerkleTrie

Description

We have recently implemented a method toDot for a human-readable string representation of VerkleTrie, which is immensely beneficial for debugging purposes. This method converts the tree into Dot format, a textual format for graph visualizations.

The current implementation includes:

  • BranchNodes with the commitment attribute.
  • StemNodes with stem, leftCommitment, and rightCommitment attributes.
  • LeafNodes with suffix and value attributes.
  • Each node has a location attribute, which can uniquely name the nodes.

You can find the current implementation in go-verkle.
The PR providing the implementation is here

New Feature Request

We now intend to extend this functionality by adding the capability to store the output of the toDot method into a file. This feature will allow users to save the graphical representation of VerkleTrie for further analysis or sharing.

Expected behavior

The proposed feature should:

  • Provide a method to save the Dot format output generated by toDot into a file.
  • Ensure that the file storage mechanism is efficient and user-friendly.
  • Include error handling for scenarios such as write permissions or file system issues.
  • Optionally, allow users to specify the file path and name where the output should be stored.

Fix Javadoc Warnings

Description:

While executing the ./gradlew artifactoryPublish command in the VerkleTries_Besu project, multiple warnings are observed related to incomplete Javadoc.

Example warning:

VerkleTries_Besu/ipa-multipoint/src/main/java/org/hyperledger/besu/ethereum/trie/verkle/TrieKeyAdapter.java:45: warning: no comment
public Bytes32 storageKey(Bytes32 address, UInt256 storageKey) {

Objective:

Complete the Javadoc for the respective classes and methods to eliminate these warnings.

Note:

There's also an error regarding :artifactoryDeploy with a 401 status code. However, this will be addressed in a separate issue.

Acceptance Criteria:

  • No Javadoc warnings when running ./gradlew artifactoryPublish.
  • All added Javadocs should be relevant and provide clarity about the method or class it describes.

Implement toDot Method for String Representation of VerkleTrie

Description

Currently, there is no humanly readable string representation implemented for VerkleTrie. However, this could be helpful for debugging, for example. This issue proposes to implement a method toDot, a textual format for graphs used in visualisations and in go-verkle.

Expected behavior

We expect toDot to return the representation of the tree in Dot format.

  • Nodes should have location as an attribute.
  • BranchNodes should have the commitment as an attribute.
  • StemNodes should have stem, leftCommitment, and rightCommitment as attributes.
  • LeafNodes should have suffix and value as attributes.

The location could also be used to uniquely name the nodes.

Optimize Commitment Caching in Verkle Trie

Description

There is a potential optimization opportunity in the commitment caching process of the Verkle Trie implementation. The current approach to the computation of commitments might not be operating at its maximum efficiency.

Suggestion

The commitment calculation process should be modified so that computing commitments only occurs if a leaf under the node was modified. This enhancement could lead to more efficient handling of the Verkle Trie structure, potentially improving the system's overall performance.

Expected Benefits

  • Reduced unnecessary computations.
  • Improved performance of the Verkle Trie.
  • Enhanced efficiency in handling trie structures.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.