Skip to content

Conversation

@tamingchaos
Copy link

This pull request introduces significant updates to the relay server, gRPC integration, and data stream handling, as well as minor improvements to the codebase and configuration files. The most important changes include the addition of gRPC support, refactoring of the relay server for modularity, and updates to the data stream storage configuration.

Relay Server and gRPC Integration:

  • Refactored cmd/relay/main.go to modularize the relay server setup, add gRPC server support, and improve logging. Introduced a RelayConfig struct for configuration and created helper functions like createRelayServer, setupGRPCServer, and handleSignals for better code organization. [1] [2]
  • Added cmd/relay/mock_factory.go to provide a mock implementation of DatastreamFactory for testing gRPC-related functionality.
  • Updated docker-compose.yml to expose both relay and gRPC ports and adjusted the command to include the gRPC port.

Data Stream Enhancements:

  • Added a new DataStreamStorageType configuration option to support different storage backends (e.g., file, mdbx). This change affects multiple files, including cmd/rpcdaemon/cli/httpcfg/http_cfg.go, cmd/utils/flags.go, and turbo/cli/default_flags.go. [1] [2] [3]
  • Updated eth/backend.go to use the new DataStreamStorageType configuration when creating the data stream server. [1] [2]

Testing and Build Improvements:

  • Added cmd/relay/main_test.go to test flag parsing, gRPC server setup, and signal handling for the relay server.
  • Updated Makefile to include gRPC code generation for datastream_service.proto.

Dependency and Import Updates:

  • Updated go.mod to include the latest version of zkevm-data-streamer and other dependencies. [1] [2] [3]
  • Fixed import paths in zk/datastream/client/stream_client.go and zk/datastream/client/stream_client_test.go to use the correct proto package. [1] [2]

Configuration and Dockerfile Changes:

  • Added new gRPC port 7070 to Dockerfile, Dockerfile.debian, and Dockerfile.release for consistent exposure across environments. [1] [2] [3]

@cla-bot cla-bot bot added the cla-signed label May 8, 2025
…ppears to work as before. MDBX is not fully implemented.
… not currently build due to unpublished dependency changes.
rename MDBXRwDBStreamStore to MDBXStreamStore
fix a number of transactional related issues with MDBX
fix decoding bug missing packetType

WIP:
rename MDBXRwDBStreamStore to MDBXStreamStore
fix a number of transactional related issues with MDBX
fix decoding bug missing packetType
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant