Skip to content

Conversation

@MarcosNicolau
Copy link
Member

@MarcosNicolau MarcosNicolau commented Apr 3, 2025

Description

Adds periodic fetches for aggregation mode events and stores data structures in db.

How to run

  1. Build db: make explorer_build_db
  2. Run db: make explorer_run_db
  3. Run migration: make explorer_ecto_setup_db
  4. Run explorer: make run_explorer
  5. Verify the data is added via psql:
    • docker exec -it explorer-postgres-container psql -U explorer_user -d explorer_db
    • SELECT * FROM aggregated_proofs;
    • SELECT * FROM proofs_agg_mode WHERE aggregated_proof_number = N

Note: to test this you'll need to setup two new ENV vars:

  • ALIGNED_PROOF_AGG_CONFIG_FILE: the config file for the aggregation service contract deployment
  • BEACON_CLIENT: a beacon client for the network (public ones would not respond blob requests to me, so you'll have to get one for yourself probably).

Type of change

  • New feature

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change batcher/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

@github-actions
Copy link

github-actions bot commented Apr 7, 2025

Changes to gas cost

Generated at commit: 731d39b121f2ae914ae5d3b2c931837ddebbfebe, compared to commit: 956b4a727ffc9d152eee7a334ead6c5630d8df39

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
AlignedLayerServiceManager createNewTask -80 ✅ -0.10%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
AlignedLayerServiceManager 8,319,208 (0) createNewTask
receive
57,806 (-48)
23,496 (0)
-0.08%
0.00%
77,838 (-80)
47,284 (-94)
-0.10%
-0.20%
77,886 (-30)
47,472 (0)
-0.04%
0.00%
78,705 (-63)
47,472 (0)
-0.08%
0.00%
256 (0)
256 (0)

nil ->
Explorer.Repo.insert(changeset)

existing_proof ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think it is more a general problem in the explorer, but in some moment we should improve logs

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, we should improve the logs + add a ci for formatting.

Copy link
Collaborator

@JuArce JuArce left a comment

Choose a reason for hiding this comment

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

The most important change is related to the db scheme

@MarcosNicolau MarcosNicolau requested a review from JuArce April 10, 2025 13:59
@MauroToscano MauroToscano added this pull request to the merge queue Apr 10, 2025
Merged via the queue into staging with commit b41ad31 Apr 10, 2025
1 check passed
@MauroToscano MauroToscano deleted the feat/aggregation-mode-explorer branch April 10, 2025 21:42
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.

4 participants