Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(zk_toolbox): Add block explorer support to zk_toolbox #2768

Merged
merged 14 commits into from
Sep 6, 2024

Conversation

sanekmelnikov
Copy link
Collaborator

@sanekmelnikov sanekmelnikov commented Aug 29, 2024

What ❔

New zk_inception explorer command for easy block explorer setup.

Usage:

zk_inception explorer init - initializes explorer database and creates config files (executed for all chains, unless --chain is passed)
zk_inception explorer backend - runs backend services (api, data_fetcher, worker) required for block explorer app for a single chain (uses default chain, unless --chain is passed)
zk_inception explorer run - runs block-explorer-app (displays all chains, unless --chain is passed)

Config structure:

  • Ecosystem level apps configs:

    • ecosystem/configs/apps.yaml - ecosystem-level configuration for apps, edit that if you want to customize the port for portal and explorer apps.
    • ecosystem/configs/apps/portal.config.json - ecosystem-level configuration for portal app, edit that if you want to customize display names, tokens list, URLs, etc. for any chain for portal. Refer to the format and documentation from the dapp-portal repository.
    • ecosystem/configs/apps/explorer.config.json - ecosystem-level configuration for explorer app, edit that if you want to customize display names, URLs, etc. for any chain for explorer. Refer to the format from block-explorer repository.
    • ecosystem/configs/.generated/explorer.config.js - this file is auto-generated on every explorer run and injected as a runtime config to block-explorer-app docker image for run.
    • ecosystem/configs/.generated/portal.config.js - this file is auto-generated on every portal run and injected as a runtime config to dapp-portal docker image for run.
  • Chain level apps configs:

    • chain/configs/explorer-docker-compose.yml - configures required explorer backend services as a docker compose file, edit that if you want to customize ports, parameters like batches polling interval. It's user responsibility to adjust corresponding JSON app configs if ports are changed in this file.

Why ❔

Currently, running the block-explorer requires users to manually pull the repository, install all dependencies, prepare database, modify configurations, build the project, and then run it. This PR simplifies the process, allowing users to run the explorer effortlessly with a few commands.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zk fmt and zk lint.

@sanekmelnikov sanekmelnikov marked this pull request as draft August 29, 2024 09:21
@sanekmelnikov sanekmelnikov changed the title feat(zk_toolbox) [WIP] Add block explorer support to zk_toolbox feat(zk_toolbox): [WIP] Add block explorer support to zk_toolbox Aug 29, 2024
@sanekmelnikov sanekmelnikov marked this pull request as ready for review August 30, 2024 10:38
zk_toolbox/crates/config/src/apps.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/config/src/docker_compose.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/config/src/docker_compose.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/config/src/docker_compose.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/config/src/explorer.rs Show resolved Hide resolved
zk_toolbox/crates/config/src/explorer_compose.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/zk_inception/src/commands/explorer.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/config/src/apps.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/config/src/docker_compose.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/config/src/apps.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/config/src/apps.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/zk_inception/src/utils/ports.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/zk_inception/src/utils/ports.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/zk_inception/src/utils/ports.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/zk_inception/src/utils/ports.rs Outdated Show resolved Hide resolved
zk_toolbox/crates/zk_inception/src/utils/ports.rs Outdated Show resolved Hide resolved
@sanekmelnikov sanekmelnikov changed the title feat(zk_toolbox): [WIP] Add block explorer support to zk_toolbox feat(zk_toolbox): Add block explorer support to zk_toolbox Sep 3, 2024
@sanekmelnikov sanekmelnikov requested review from manuelmauro and removed request for manuelmauro September 4, 2024 05:45
@Deniallugo Deniallugo added this pull request to the merge queue Sep 6, 2024
Merged via the queue into main with commit 1559afb Sep 6, 2024
20 of 21 checks passed
@Deniallugo Deniallugo deleted the sanekmelnikov/zk-inception-explorer branch September 6, 2024 08:14
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