Skip to content

Improve Envio managed db schema logic#630

Merged
DZakh merged 2 commits intomainfrom
dz/envio-managed-db-schema
Jul 9, 2025
Merged

Improve Envio managed db schema logic#630
DZakh merged 2 commits intomainfrom
dz/envio-managed-db-schema

Conversation

@DZakh
Copy link
Member

@DZakh DZakh commented Jul 8, 2025

This is part of the Effects Cache project. The goal is to ensure that the schema used and managed by Envio does not contain any tables unrelated to the currently running indexer. And that we have a proper initialization step, which we can use to load persisted cache from jsons.

  • This also adds a safeguard error message alerting about potential data loss if the indexer started on a db schema with some existing data.
  • And it makes pnpm envio start work without the need for pnpm envio local db-migrate up.
  • Additionally, it reduces the likelihood of encountering a strange database state.

Summary by CodeRabbit

Summary by CodeRabbit

  • Refactor

    • Simplified storage initialization by removing optional parameters and streamlining logic.
    • Enforced safety checks to prevent data loss by verifying schema usage before migration.
    • Replaced hardcoded table names with dynamic references for consistency.
    • Updated network configurations by adding a new network and adjusting tier classifications.
  • Tests

    • Revised test suites to align with updated initialization logic and removed obsolete test cases.
    • Enhanced test clarity by adjusting SQL expectations and removing deprecated parameters.

@DZakh DZakh requested a review from moose-code July 8, 2025 15:43
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 8, 2025

Walkthrough

This change removes the cleanRun and skipIsInitializedCheck parameters from storage initialization logic across the persistence and PostgreSQL storage modules. The initialization flow is simplified, with new safety checks for schema usage. Corresponding updates are made in tests and code generation templates to reflect these interface changes.

Changes

Files/Groups Change Summary
codegenerator/cli/npm/envio/src/Persistence.res, codegenerator/cli/npm/envio/src/PgStorage.res Removed cleanRun and skipIsInitializedCheck parameters from initialization; simplified logic; added stricter schema safety checks; updated method signatures and table name constant.
codegenerator/cli/templates/static/codegen/src/db/Migrations.res Removed ~skipIsInitializedCheck argument from Persistence.init call.
codegenerator/cli/templates/static/codegen/src/db/TablesStatic.res Changed event sync state table name from string literal to variable reference.
scenarios/test_codegen/test/lib_tests/EntityHistory_test.res Added generalTables argument to initialization; removed ~cleanRun usage in test setup.
scenarios/test_codegen/test/lib_tests/Persistence_test.res Removed cleanRun field and parameter from storage mock and related tests; deleted one test case.
scenarios/test_codegen/test/lib_tests/PgStorage_test.res Removed test case for cleanRun=false; updated remaining tests to match new initialization logic.
codegenerator/cli/src/config_parsing/chain_helpers.rs Adjusted Network enum attributes; added Taraxa network with tier and threshold settings; updated tiers for PharosDevnet and MorphTestnet.

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant Persistence
    participant Storage

    App->>Persistence: init(~reset)
    Persistence->>Storage: isInitialized()
    alt reset is true OR not initialized
        Persistence->>Storage: initialize(~entities, ~generalTables, ~enums)
        Persistence->>Persistence: set status Ready({cleanRun: true})
    else
        Persistence->>Persistence: set status Ready({cleanRun: false})
    end
Loading
sequenceDiagram
    participant PgStorage
    participant Database

    PgStorage->>Database: Check for event_sync_state table
    alt Schema contains other tables but not event_sync_state
        PgStorage->>PgStorage: Raise error (schema used by other app)
    else
        PgStorage->>Database: Drop and recreate schema
        PgStorage->>Database: Create tables, enums, functions
    end
Loading

Possibly related PRs

Suggested reviewers

  • JasoonS
  • JonoPrest

Poem

In the warren, code runs swift and neat,
Old flags retired, their purpose complete.
Schemas checked with a careful nose,
Only clean starts—no more suppose!
With every hop, our logic is clear,
The burrow’s safe, no data to fear.
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Clippy (1.86.0)
Updating crates.io index
Updating git repository `https://github.com/enviodev/dotenvy`

error: failed to get dotenvy as a dependency of package envio v0.0.1-dev (/codegenerator/cli)

Caused by:
failed to load source for dependency dotenvy

Caused by:
Unable to update https://github.com/enviodev/dotenvy?rev=e2da110668572cf2d67178f192eb1fc285224040#e2da1106

Caused by:
failed to create directory /usr/local/git/db/dotenvy-84fb2f3eed79b9cc

Caused by:
Permission denied (os error 13)

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
codegenerator/cli/npm/envio/src/PgStorage.res (1)

367-369: Enhance the error message with more specific resolution steps.

The error message could be more actionable by clarifying what "drop the existing schema first" means and providing the exact command.

      Js.Exn.raiseError(
-       `Cannot run Envio migrations on PostgreSQL schema "${pgSchema}" because it contains non-Envio tables. Running migrations would delete all data in this schema. To proceed, either drop the existing schema first with "pnpm envio local db-migrate down" or specify a different schema name using the "ENVIO_PG_PUBLIC_SCHEMA" environment variable.`,
+       `Cannot run Envio migrations on PostgreSQL schema "${pgSchema}" because it contains non-Envio tables. Running migrations would delete all data in this schema.\n\nTo resolve this:\n1. If you want to use this schema, first backup any important data, then drop it with: "pnpm envio local db-migrate down"\n2. Or specify a different schema name by setting the "ENVIO_PG_PUBLIC_SCHEMA" environment variable\n3. Or manually drop the schema in your database if you're certain the data is not needed`,
      )
scenarios/test_codegen/test/lib_tests/EntityHistory_test.res (1)

6-8: Consider improving the comment clarity.

The comment could be more specific about why these tables are mandatory.

-// These are mandatory tables that should be created for every schema
-// it allows us to distinguish whether the schema is controlled by Envio
+// These are mandatory tables that must be created for every Envio-managed schema.
+// The event_sync_state table is used to distinguish Envio-controlled schemas from others.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 466948a and 371da73.

📒 Files selected for processing (7)
  • codegenerator/cli/npm/envio/src/Persistence.res (2 hunks)
  • codegenerator/cli/npm/envio/src/PgStorage.res (5 hunks)
  • codegenerator/cli/templates/static/codegen/src/db/Migrations.res (1 hunks)
  • codegenerator/cli/templates/static/codegen/src/db/TablesStatic.res (1 hunks)
  • scenarios/test_codegen/test/lib_tests/EntityHistory_test.res (5 hunks)
  • scenarios/test_codegen/test/lib_tests/Persistence_test.res (1 hunks)
  • scenarios/test_codegen/test/lib_tests/PgStorage_test.res (4 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`**/*.res`: Never use `[| item |]` to create an array. Use `[ item ]` instead. M...

**/*.res: Never use [| item |] to create an array. Use [ item ] instead.
Must always use = for setting value to a field. Use := only for ref values created using ref function.
It's also possible to define an inline object, it'll have quoted fields in this case.
Never use %raw to access object fields if you know the type.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/rescript.mdc)

List of files the instruction was applied to:

  • codegenerator/cli/templates/static/codegen/src/db/Migrations.res
  • codegenerator/cli/templates/static/codegen/src/db/TablesStatic.res
  • codegenerator/cli/npm/envio/src/Persistence.res
  • scenarios/test_codegen/test/lib_tests/EntityHistory_test.res
  • scenarios/test_codegen/test/lib_tests/Persistence_test.res
  • codegenerator/cli/npm/envio/src/PgStorage.res
  • scenarios/test_codegen/test/lib_tests/PgStorage_test.res
`**/*.{res,resi}`: ReScript has record types which require a type definition bef...

**/*.{res,resi}: ReScript has record types which require a type definition beforehand. You can access record fields by dot like foo.myField.
Use records when working with structured data, and objects to conveniently pass payload data between functions.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/rescript.mdc)

List of files the instruction was applied to:

  • codegenerator/cli/templates/static/codegen/src/db/Migrations.res
  • codegenerator/cli/templates/static/codegen/src/db/TablesStatic.res
  • codegenerator/cli/npm/envio/src/Persistence.res
  • scenarios/test_codegen/test/lib_tests/EntityHistory_test.res
  • scenarios/test_codegen/test/lib_tests/Persistence_test.res
  • codegenerator/cli/npm/envio/src/PgStorage.res
  • scenarios/test_codegen/test/lib_tests/PgStorage_test.res
🧠 Learnings (6)
codegenerator/cli/templates/static/codegen/src/db/Migrations.res (2)
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
codegenerator/cli/npm/envio/src/Persistence.res (2)
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
scenarios/test_codegen/test/lib_tests/EntityHistory_test.res (3)
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:631-659
Timestamp: 2025-05-27T17:07:12.878Z
Learning: In isolated tests for EntityHistory rollbacks with controlled mock data setup, the ordering of getRollbackDiff results is deterministic and doesn't require sorting before comparison with deepStrictEqual.
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
scenarios/test_codegen/test/lib_tests/Persistence_test.res (3)
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:631-659
Timestamp: 2025-05-27T17:07:12.878Z
Learning: In isolated tests for EntityHistory rollbacks with controlled mock data setup, the ordering of getRollbackDiff results is deterministic and doesn't require sorting before comparison with deepStrictEqual.
codegenerator/cli/npm/envio/src/PgStorage.res (2)
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
scenarios/test_codegen/test/lib_tests/PgStorage_test.res (3)
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:631-659
Timestamp: 2025-05-27T17:07:12.878Z
Learning: In isolated tests for EntityHistory rollbacks with controlled mock data setup, the ordering of getRollbackDiff results is deterministic and doesn't require sorting before comparison with deepStrictEqual.
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
Learnt from: JonoPrest
PR: enviodev/hyperindex#555
File: scenarios/test_codegen/test/lib_tests/EntityHistory_test.res:582-629
Timestamp: 2025-05-27T17:07:04.699Z
Learning: In ReScript test files using DbHelpers.resetPostgresClient(), this function is synchronous with signature `unit => unit` and should not be awaited. It performs a raw JavaScript reassignment of the postgres client and does not return a promise.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build_and_test
🔇 Additional comments (14)
codegenerator/cli/npm/envio/src/PgStorage.res (2)

72-74: Document the unconditional schema drop behavior.

The schema is now always dropped and recreated during initialization. This is a significant behavioral change that could lead to data loss if users are not aware.

Consider adding a comment above these lines to clearly document this behavior:

  let query = ref(
+   // IMPORTANT: This will completely drop and recreate the schema, destroying all existing data
    `DROP SCHEMA IF EXISTS "${pgSchema}" CASCADE;
CREATE SCHEMA "${pgSchema}";
GRANT ALL ON SCHEMA "${pgSchema}" TO "${pgUser}";

214-214: Good refactoring to centralize the table name.

Introducing the eventSyncStateTableName constant improves maintainability and reduces the risk of typos.

codegenerator/cli/templates/static/codegen/src/db/Migrations.res (1)

30-30: Correctly updated to match the new Persistence.init interface.

The removal of ~skipIsInitializedCheck=true aligns with the simplified initialization logic in Persistence.res.

codegenerator/cli/templates/static/codegen/src/db/TablesStatic.res (1)

24-24: Good use of the centralized table name constant.

Using PgStorage.eventSyncStateTableName ensures consistency across the codebase and reduces the risk of typos.

scenarios/test_codegen/test/lib_tests/EntityHistory_test.res (1)

252-252: Test updates correctly reflect the new initialization interface.

All test cases have been properly updated to:

  1. Include the mandatory ~generalTables parameter
  2. Remove the deprecated ~cleanRun parameter

The changes ensure tests remain aligned with the new storage initialization contract.

Also applies to: 601-601, 767-767, 1044-1044

codegenerator/cli/npm/envio/src/Persistence.res (1)

80-80: Clean simplification of the initialization logic.

The removal of ~skipIsInitializedCheck and the simplified control flow make the initialization behavior more predictable and easier to understand. The logic now clearly states: initialize if either reset is true or storage is not initialized.

Also applies to: 96-109

scenarios/test_codegen/test/lib_tests/Persistence_test.res (3)

36-47: LGTM: Function signature correctly updated to remove cleanRun parameter.

The initialize method signature has been properly updated to remove the cleanRun parameter, which aligns with the PR objectives of simplifying the initialization logic.


201-203: Consistent with new initialization behavior.

The test correctly expects cleanRun: false when storage is already initialized, which makes sense since no clean initialization would occur in this case.


143-145: Ignore suggestion to remove cleanRun from tests
The storageStatus variant in Persistence.res still defines Ready({cleanRun: bool}), and the initialization logic sets that field internally based on shouldRun. The tests correctly assert those boolean values:

  • In codegenerator/cli/npm/envio/src/Persistence.res:
    • type storageStatus = … | Ready({cleanRun: bool})
    • Branches set persistence.storageStatus = Ready({cleanRun: true}) or Ready({cleanRun: false})
  • In scenarios/test_codegen/test/lib_tests/Persistence_test.res:
    • Assertions against Persistence.Ready({cleanRun: true}) and …{cleanRun: false} match the implementation

No updates to the tests are needed.

Likely an incorrect or invalid review comment.

scenarios/test_codegen/test/lib_tests/PgStorage_test.res (5)

100-101: LGTM: Test description updated to reflect simplified initialization.

The test description has been updated to reflect that the initialization now creates complete queries without conditional logic based on cleanRun.


109-115: LGTM: Function call correctly updated to remove cleanRun parameter.

The makeInitializeTransaction function call has been properly updated to remove the ~cleanRun parameter, which aligns with the simplified initialization logic.


127-129: LGTM: Expected SQL output reflects unconditional schema recreation.

The expected SQL output now shows separate statements for schema drop/create and grants, which is consistent with the updated behavior that always drops and recreates the schema unconditionally.


179-181: LGTM: Minimal configuration test updated consistently.

The minimal configuration test has been updated to match the same pattern of separate schema creation and grant statements.


215-217: LGTM: Single entity test updated consistently.

The single entity test follows the same pattern of separate schema creation and grant statements, maintaining consistency across all test cases.

Copy link
Member

@moose-code moose-code left a comment

Choose a reason for hiding this comment

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

Thanks - just read through the summary and this all makes good sense as next step in persitiance. LGTM!

@DZakh DZakh enabled auto-merge (squash) July 9, 2025 06:42
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
codegenerator/cli/src/config_parsing/chain_helpers.rs (1)

525-525: Consider removing PharosDevnet from the threshold configuration.

PharosDevnet (line 525) is included in the threshold configuration but is no longer a HypersyncNetwork. This seems inconsistent - non-HypersyncNetwork variants typically wouldn't need threshold configuration.

If PharosDevnet is no longer used as a HypersyncNetwork, consider removing it from the match statement:

             | Network::Curtis
             | Network::Worldchain
             | Network::Sonic
-            | Network::PharosDevnet
             | Network::Swell
             | Network::Taraxa => DEFAULT_CONFIRMED_BLOCK_THRESHOLD,

Also applies to: 531-532

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 371da73 and b51d5e9.

📒 Files selected for processing (1)
  • codegenerator/cli/src/config_parsing/chain_helpers.rs (4 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
codegenerator/cli/src/config_parsing/chain_helpers.rs (1)
codegenerator/cli/src/cli_args/interactive_init/evm_prompts.rs (1)
  • HypersyncNetwork (224-232)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build_and_test
🔇 Additional comments (3)
codegenerator/cli/src/config_parsing/chain_helpers.rs (3)

351-353: LGTM! Taraxa network addition follows conventions.

The new network is correctly added with:

  • Proper alphabetical ordering between Tangle and Unichain
  • HypersyncNetwork subenum attribute
  • Unique network ID 841

582-582: Tier assignments are consistent with network attributes.

The changes correctly:

  • Add Taraxa to the Bronze tier (line 582)
  • Remove PharosDevnet from the Stone tier (lines 584-591)

These changes align with the HypersyncNetwork attribute modifications.

Also applies to: 584-591


262-263: Confirm Hypersync support removal is intentional

We’ve verified that HypersyncNetwork::MorphTestnet no longer appears anywhere in the codebase (no matches for HypersyncNetwork::MorphTestnet), so dropping the #[subenum(HypersyncNetwork)] attribute simply removes MorphTestnet from all hypersync-related commands.

• If you intended to discontinue Hypersync support for MorphTestnet, no further action is needed.
• Otherwise, re-add the attribute to restore MorphTestnet in the HypersyncNetwork subenum.

@DZakh DZakh merged commit 0f5acf5 into main Jul 9, 2025
2 checks passed
@DZakh DZakh deleted the dz/envio-managed-db-schema branch July 9, 2025 06:46
This was referenced Nov 13, 2025
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