You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Making Besu more modular requires thinking about the dimensions along which those modules are divided up and separated from each other. Those separations can be categorized into two types: areas of related business logic, and areas of related software function. The former is the domain of "stuff Ethereum needs" and the later is the domain of "stuff good Java software needs". When we modularize Besu, we are looking to produce reusable, composable software components within the business logic domain.  


Bounded Contexts / Business Logic / Blockchain Domain are all synonyms for the type of modules we want to create to serve the pillars of our 2022 Vision. We will know we are doing this right when users can easily create a Besu that combines different modules into the client they need.

Cross Cutting Concerns are a little bit different. These should be invisible to the users, but very helpful to the developers. Any Bounded Context may depend on any mix of Cross Cutting Concerns. This part is ok to be a web of dependencies, they are often external projects/libaries we have selected for use all throughout Besu.


Business LogicCross Cutting Concerns
  1. Consensus
    1. Proof of Work
    2. External (or none?): Proof of Stake
      1. driven by Engine API
    3. Clique
    4. IBFT
    5. QBFT
  2. P2P
    1. ETH/66 and prior
    2. DevP2P
  3. Execution
    1. EVM
    2. Tracing
  4. Transaction Management
    1. Tessera integration
    2. MEV
    3. public and private transaction support
  5. Synchronizing
    1. Full sync
    2. Fast sync
    3. Snap sync
    4. Backwards sync
  6. Storage
    1. World State
      1. Forrest
      2. Bonsai
      3. Verkle
    2. Blockchain 
    3. Key-Value specific implementations under each.
  1. Cryptography
    1. Elliptic Curves
    2. Signatures
    3. Hashing
    4. native implementations
  2. Serialization
    1. RLP
    2. JSON
    3. GraphQL(ish. it's a lot broader than just serialization)
  3. APIs
    1. RPC
      1. HTTP
      2. Websockets
    2. GraphQL
    3. IPC (under investigation)
  4. Inversion of Control
    1. Dagger
  5. Observability
    1. Logging
    2. Metrics
    3. Debugging extras
  6. Configuration
    1. PicoCLI
    2. Genesis state vs. named networks
  7. Builds
    1. Static code analysis 
    2. Use-case specific distributions
    3. test automation
      1. Unit
      2. Integration
      3. System
      4. Fuzz


Proof of Concept:

Introduce Dagger to implement a vertical slice of functionality. We need to find a feature that touches on a few cross-cutting concerns, but just one Bounded Context.

Nominees:

  1. Jumpdest caching. Only relevant to the EVM, but requires caching, configuration, Observability, and hashing. Plan would be to provide each of these as a dependency.
  2. PoA consensus mechanisms. Impact TBD.
  3. Transaction pool. Impact TBD.
  4. Merge Context. What if the Merge Coordinator and related classes could be a dagger module?
  5. Protocol Schedule. Impact TBD.

Once the question of "will daggers dependency injection make for cleaner composition of modules into an application" is answered, we can then start to incrementally adopt it within each bounded context, and across the cross-cutting concerns.




  • No labels