Sitelet https://github.com/init4tech/builder/compare/v1.0.1...v1.1.0
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: init4tech/builder
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.1
Choose a base ref
...
head repository: init4tech/builder
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.0
Choose a head ref
  • 3 commits
  • 8 files changed
  • 1 contributor

Commits on May 7, 2026

  1. feat: replace TxPoller polling with SSE streaming (#259)

    ## Summary
    
    Replaces the 1s timer-based polling loop in `TxPoller` with SSE streaming for real-time transaction delivery from the tx-pool. The new task lifecycle:
    
    1. **Startup**: full paginated fetch of all transactions currently in the cache
    2. **Steady state**: SSE stream (`/transactions/feed`) pushes new transactions as they arrive β€” no more redundant refetches
    3. **Block env change**: full refetch to ensure consistency (covers any items the SSE stream may have missed)
    
    On SSE disconnect or error, the poller reconnects with exponential backoff (1s initial, doubling up to 30s cap) and does a full refetch to cover the gap. Backoff resets on each successfully received transaction.
    
    ## Changes
    
    - **`Cargo.toml`**: enable `sse` feature on `init4-bin-base` (transitively enables `signet-tx-cache/sse`)
    - **`src/tasks/cache/tx.rs`**: rewrite `TxPoller` β€” replace poll loop with `full_fetch()` + `subscribe()` + `select!` over SSE items and block env changes. Add `reconnect()` with exponential backoff. Remove `poll_interval_ms`, `poll_duration()`, `Default` impl.
    - **`src/tasks/cache/system.rs`**: pass `block_env` watch receiver to `TxPoller::new()`
    - **`tests/tx_poller_test.rs`**: update integration test to use `TxCache` directly (no more `check_tx_cache()` method)
    
    `BundlePoller` is unchanged β€” the `/bundles/feed` server endpoint is not yet available.
    
    ## Test plan
    
    - [x] `make clippy` passes clean
    - [x] `make test` β€” all 8 unit tests pass, integration tests correctly ignored
    - [ ] Manual test against tx-pool: verify SSE subscription log, real-time tx delivery, refetch on block env change, reconnect with backoff on disconnect
    
    πŸ€– Generated with [Claude Code](https://claude.com/claude-code)
    Evalir authored May 7, 2026
    Configuration menu
    Copy the full SHA
    390c4eb View commit details
    Browse the repository at this point in the history
  2. feat: replace BundlePoller polling with SSE streaming (#269)

    ## Description
    
    Mirrors #259 (tx-poller SSE) for bundles. Replaces the 1s polling loop in `BundlePoller` with an SSE subscription to `/bundles/feed` via `BuilderTxCache::subscribe_bundles` (newly exposed by the SDK, matched by the tx-pool-webservice endpoint).
    
    The structure matches `TxPoller` exactly:
    - Initial `full_fetch` paginates through `stream_bundles` to seed the cache on startup.
    - `subscribe` opens the SSE stream and yields `CachedBundle`s in real time.
    - On stream error / stream end, reconnects with exponential backoff (1s β†’ 30s cap), racing the sleep against the block-env watcher so an env change wins and triggers a fresh full refetch immediately.
    - On block-env change, the full_fetch runs again to cover anything missed during disconnection.
    - `NotOurSlot` is logged at trace level (expected when the builder is not slot-permissioned) in both the full-fetch and subscribe paths β€” avoids spurious warn-level noise.
    
    The public `check_bundle_cache()` wrapper is dropped; the integration test now uses `BuilderTxCache::stream_bundles` directly, matching the style of `tx_poller_test.rs`.
    
    ## Related Issue
    
    Stacked on #259.
    
    ## Testing
    
    - [x] `make fmt` passes
    - [x] `make clippy` passes
    - [x] `make test` passes
    - [x] `cargo doc --no-deps` passes with `-D warnings`
    - [x] `cargo test --features test-utils --no-run` builds all integration tests
    - [ ] Exercise against a live tx-pool-webservice to verify SSE reconnect and env-driven refetch behavior end-to-end
    Evalir authored May 7, 2026
    Configuration menu
    Copy the full SHA
    22cd9b0 View commit details
    Browse the repository at this point in the history
  3. chore: v1.1.0 (#273)

    ## Description
    
    <!-- Brief description of changes -->
    
    ## Related Issue
    
    <!-- Link to Linear issue: Closes ENG-XXX -->
    
    ## Testing
    
    - [ ] `make fmt` passes
    - [ ] `make clippy` passes
    - [ ] `make test` passes
    - [ ] New tests added (if applicable)
    Evalir authored May 7, 2026
    Configuration menu
    Copy the full SHA
    05acd6d View commit details
    Browse the repository at this point in the history
Loading