Skip to content

Commit 130db80

Browse files
authored
v2.31 (#789)
* Rename blocks table * Break everything * Turn reorg checkpoints into general checkpoints * Load relevant reorg checkpoints on restart * Move a lot of logic to the Batch module * Make tests compile * Merge branch 'main' of github.com:enviodev/hyperindex into dz/track-blocks * Rename last block scanned hashes to reorg detection module * Fix next progress block number calculation * Turn batch module into a single array * Include reorg checkpoints to the batch * Fix a few e2e tests * Restore commited checkpoint id from the db * Store checkpoint in the db * Return back old prunning logic for checkpoints * Make rollback logic work again * Fix tests * Fix tests * Fix erc20 tests * Fix coderabbit comments * Find reorg depth concurrently * Track safe checkpoint and optimize pruning * Correctly rollback chains progress * Correctly rollback checkpoints from db * Pass checkpointId to every entity identifier * Fix items iteration * Move event identifier to internal * Finish rollback on reorg rewrite * Final touches and test fixes * Merge main * Multiple reorg&rollback fixes, tests and improvements * Fix review comments and fuel tests * Fix #786 * Fix [BigInt!]! precision loss in Hasura * Fix #749 * Try to add hasura service for tests pipeline * Add Effect cache load prom metrics * Remove processing prom metrics and add envio_progress_batches_count * Validate effect cache when loading it from db * Improve batch processing log * Sync chains * Fix chains order
1 parent d906825 commit 130db80

File tree

78 files changed

+6044
-6113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+6044
-6113
lines changed

.cursor/rules/navigation.mdc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ globs: ""
44
alwaysApply: true
55
---
66

7+
# Always
8+
9+
- Sacrifice grammar for the sake of concision
10+
- List any unresolved questions at the end, if any
11+
12+
## Navigation
13+
714
- The Rust CLI lives in `codegenerator/cli`.
815
- Entry point: `codegenerator/cli/src/lib.rs`.
916
- Command dispatcher: `codegenerator/cli/src/commands.rs`.

.github/workflows/build_and_test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ jobs:
3737
# Maps tcp port 5432 on service container to the host port of 5433 which envio will use.
3838
- 5433:5432
3939

40+
hasura:
41+
image: hasura/graphql-engine:v2.43.0
42+
env:
43+
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:testing@postgres:5432/envio-dev
44+
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
45+
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
46+
HASURA_GRAPHQL_NO_OF_RETRIES: 10
47+
HASURA_GRAPHQL_ADMIN_SECRET: testing
48+
HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES: "true"
49+
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: public
50+
PORT: 8080
51+
ports:
52+
- 8080:8080
53+
4054
steps:
4155
- uses: actions/checkout@v4
4256
- uses: dorny/paths-filter@v3
@@ -122,6 +136,15 @@ jobs:
122136
pnpm hardhat compile --verbose
123137
pnpm res:build
124138
139+
- name: Wait for Hasura
140+
if: steps.changes.outputs.testChanges == 'true'
141+
shell: bash
142+
run: |
143+
for i in {1..60}; do
144+
if curl -sSf http://localhost:8080/healthz >/dev/null; then
145+
echo "Hasura is up"; exit 0; fi; sleep 1; done
146+
echo "Hasura did not become ready in time"; exit 1
147+
125148
- name: test_codegen test
126149
if: steps.changes.outputs.testChanges == 'true'
127150
working-directory: scenarios/test_codegen

0 commit comments

Comments
 (0)