Skip to content

feat: interact with proposer DB instead of RPC#328

Open
vcastellm wants to merge 9 commits intomainfrom
vanilla-proposer
Open

feat: interact with proposer DB instead of RPC#328
vcastellm wants to merge 9 commits intomainfrom
vanilla-proposer

Conversation

@vcastellm
Copy link
Contributor

@vcastellm vcastellm commented Jan 7, 2026

This pull request introduces a new proposer-db-client crate for handling database operations related to proof requests, and integrates it into the proposer-service. The changes add database configuration and error handling, and update dependencies to support the new functionality. Below are the most important changes:

These changes collectively enable the system to persist, query, and poll for proof requests in a PostgreSQL database, improving reliability and observability of proof generation workflows.

Fixes https://github.com/agglayer/pm/issues/264

Copilot AI review requested due to automatic review settings January 7, 2026 17:10
@vcastellm vcastellm requested a review from a team as a code owner January 7, 2026 17:10
@vcastellm vcastellm marked this pull request as draft January 7, 2026 17:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces database-driven proof request handling by adding a new proposer-db-client crate and integrating it into the proposer-service. The changes enable the system to persist proof requests to PostgreSQL and poll for completion status, providing an alternative to the existing RPC-based workflow.

Key Changes:

  • New proposer-db-client crate with database client, configuration, and error handling
  • Database integration in proposer-service with configurable polling and fallback to RPC workflow
  • Updated dependencies to support PostgreSQL operations and data serialization

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
crates/proposer-db-client/Cargo.toml Defines dependencies for the new database client crate
crates/proposer-db-client/src/lib.rs Module exports for database client functionality
crates/proposer-db-client/src/types.rs Re-exports types from op-succinct-validity
crates/proposer-db-client/src/config.rs Database configuration with connection pool and polling settings
crates/proposer-db-client/src/error.rs Error types for database operations
crates/proposer-db-client/src/client.rs Database client implementation with insert, query, and polling methods
crates/proposer-service/Cargo.toml Adds database client and serialization dependencies
crates/proposer-service/src/config.rs Adds optional database configuration field
crates/proposer-service/src/error.rs Adds database error variant
crates/proposer-service/src/lib.rs Implements database-driven proof workflow with RPC fallback
crates/proposer-service/src/tests/proposer_service_test_program.rs Sets database field to None in test configuration
Cargo.toml Adds workspace dependencies for database operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Ekleog-Polygon Ekleog-Polygon removed their request for review January 13, 2026 10:21
Introduce new proposer-db-client crate (config, client, types, error).
Wire optional DB client into proposer-service: config, errors, init, and
tests. Add sqlx/chrono/bigdecimal deps and workspace entries and update
Cargo.lock.
@vcastellm vcastellm marked this pull request as ready for review January 15, 2026 09:40
Add a helper to mock eth_chainId for L1/L2 and assert those mocks in
tests. Relax JSON matching by switching several mockito::Matcher::Json
checks to PartialJson to avoid strict ordering, and normalize JSON-RPC
response ids to 0 in test responses. Update aggkit-prover-config test
snapshots to include the new l2-consensus-layer-rpc-endpoint and
snapshot metadata.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants