Skip to content

AbdelStark/besu-storage-redis

Repository files navigation

Besu Redis Key value store plugin

Use case

Using a Redis cluster as a storage engine for Besu enables to specify multiple types of Besu nodes depending on the features. This approach would allow us to have optimized nodes for query the database. RocksDB's lock mechanism makes harder to have multiple instances of Besu accessing the same database. Redis on the other hand enables this use case, we can imagine a categorisation of Besu nodes like the following:

  • besu-tx: Handling of local transaction pool.
  • besu-sync: Handling of blockchain synchronisation through Ethereum P2P network.
  • besu-query: Handling of database queries.

Architecture

architecture

Usage

Start Redis server.

Using docker compose:

docker-compose -f ./docker/redis.yml up -d

Redis + Web UI

docker-compose -f ./docker/redis.yml -f ./docker/redis-ui.yml up -d

Go to http://127.0.0.1:8081

Remove Redis volume:

docker volume rm -f docker_redis_data

Build Redis plugin

./gradlew assemble

Start Besu with the redis storage plugin.

./besu.sh --key-value-storage=redis-storage --plugin-redis-storage-host=localhost --plugin-redis-storage-port=6379

About

Besu Redis key value store plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published