Commit graph

15 commits

Author SHA1 Message Date
johba
1645865c5a first integration tests (#64)
resolves #60

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/64
2025-10-05 19:40:14 +02:00
johba
d6f0bf4f02 ponder speedup (#59)
Successfully applied and tested the bootstrap speedup optimizations. Here's what was accomplished:                                                                                                                                                                                                  Fixes Applied
                                                                                                                                                    1. podman-compose.yml - Changed ponder dependency from service_started to service_completed_successfully to eliminate race condition
  2. services/ponder/src/helpers/stats.ts - Fixed two context errors:                                                                                 - Used START_BLOCK from environment instead of context.network.contracts.Kraiken.startBlock                                                       - Added console fallback for context.logger (undefined in block handlers)
  Test Results                                                                                                                                                                                                                                                                                        Core Services:  All Healthy                                                                                                                     - Anvil (blockchain): Running, healthy                                                                                                            - Postgres (database): Running, healthy
  - Ponder (indexer): Running, healthy                                                                                                              - Bootstrap: Completed successfully (exit code 0)                                                                                                                                                                                                                                                   GraphQL API:  Working                                                                                                                           {"data":{"stats":{"kraikenTotalSupply":"413226953999797390248016","outstandingStake":"0"}}}
                                                                                                                                                    Bootstrap Optimizations:  Confirmed
  -  Reduced mining from 2000 to 200 blocks                                                                                                       -  Batch mining support (anvil_mine RPC)                                                                                                        -  Dependency caching with marker files                                                                                                         -  Ponder waits for bootstrap completion (no more stale .env.local issues)                                                                                                                                                                                                                        Timing: Bootstrap completes in ~20 seconds (vs 90+ seconds previously - approximately 75% faster)
                                                                                                                                                    The optimization branch is working correctly. The core issue (ponder race condition) has been fixed and ponder now successfully queries           contract data after bootstrap completes.

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/59
2025-10-04 18:08:10 +02:00
johba
dc61771dfc feat(ponder): Add strict ESLint + Prettier with pre-commit hooks (#52)
- Install eslint, @typescript-eslint plugins, prettier, husky, lint-staged
- Configure ESLint flat config with TypeScript parser
- Enforce: no-explicit-any (with exceptions), no-unused-vars, naming-convention, prefer-const, no-console
- Set style: 2-space indent, 140 char max-len, disable complexity rules
- Configure Prettier: single quotes, 140 width, trailing commas
- Setup husky pre-commit hook to auto-fix and format on commit
- Replace console.log/warn with context.logger.info/warn in handlers
- Remove console.log from ponder.config.ts (replaced with comment)
- Add npm scripts: lint, lint:fix, format, format:check
- All lint rules pass without warnings

resolvel #45

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/52
2025-10-04 15:37:26 +02:00
johba
3a7162462b startup-optimizations (#48)
resolves #34

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/48
2025-10-02 17:00:21 +02:00
johba
3ab2d9454a health checks (#39)
resolves #35

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/39
2025-10-02 14:37:59 +02:00
johba
a29ca1a26a Harden kraiken-lib watch loop and confirm host-built dist propagation (#38)
- expand scripts/watch-kraiken-lib.sh to watch atomic rename events, validate required tools, and gracefully restart only the containers that mount kraiken-
  lib/dist
  - verify the host-built dist is mounted read-only inside each service and observe live rebuild + restart behavior under inotify
  - run the local podman stack, exercise the watcher by editing kraiken-lib/src/helpers.ts, and confirm GraphQL responds through Caddy after restarts

resolves #33

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/38
2025-10-02 14:33:59 +02:00
johba
b4c829e4d6 fix/podman-postgres-integration (#37)
resolves #25

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/37
2025-10-01 20:26:49 +02:00
johba
76d84341de feat: add ABI validation helpers for Ponder (#29)
resolves https://codeberg.org/johba/harb/issues/23

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/29
2025-09-30 20:02:43 +02:00
openhands
aa9ff72ec0 drop lock 2025-09-25 18:57:38 +02:00
openhands
316ea0380f Fix #22: Remove 'any' usage and replace shims with proper typed handlers
- Updated all ponder event handlers to use proper TypeScript types
- Removed all 'any' type annotations from event handlers
- Handlers now properly leverage TypeScript's type inference
- Improved type safety across the ponder indexer

Fixes #22
2025-09-25 18:28:20 +02:00
johba
4467d41edf fix web-app 2025-09-24 14:02:28 +02:00
johba
f3fb0f142a fix agent 2025-09-24 09:57:20 +02:00
johba
02a057622c better backend comms 2025-09-24 09:41:28 +02:00
johba
3f137a2757 basic cheat view 2025-09-23 21:16:15 +02:00
johba
36b7b429ef move ponder 2025-09-23 20:29:51 +02:00