Expose polled_at_ms on arena timers and deepen API integration tests #506
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega!506
Loading…
Reference in a new issue
No description provided.
Delete branch "verify/333-polled-at-ms"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
polled_at_msonGET /v1/arena/timers(schema 2.18.0) from the internal chain-timer snapshot.ArenaTimersResponse, legacy sale-state mappers, anduseArenaHeroTimerprefer indexer poll time overDate.now()when present (fallback for older indexers).integration_stage2api_http_smoke: typed timer contract, activity buy row shape, wallet-stats bonus keys, malformed address 400, missing chain timer 503.Verification checklist (GitLab #333)
GET /v1/arena/timersreturnspolled_at_msmatching snapshotYIELDOMEGA_PG_TEST_URL=… cargo test --test integration_stage2— assertspolled_at_ms == 1700000000123polled_at_mscd frontend && npm run typecheck && npm test—indexerFirstDisplay.test.tschecksuseArenaHeroTimerreferencespolled_at_mscargo test --test integration_stage2— extendedapi_http_smoke+ existingapi_arena_activity_smoke/arena_wallet_stats_two_epochs_and_bonus_fieldsindexer/src/api.rs→ 2.18.0;indexer/README.md,docs/indexer/design.mdcd indexer && cargo clippy --all-targets -- -D warnings && cargo testcd frontend && npm run typecheck && npm run lint && npm testbash scripts/verify-podium-live-anvil.shpolled_at_msintegration_stage2api_http_smokeintegration_stage2api_http_smokepolled_at_msread-only metadatabash scripts/verify-cloud-postgres.shRelated: #333 (issue stays open until merge)
Security review — MR !506
Commit reviewed:
6b081c7ec93f4936fb81e317d34233900f3c7e21Branch:
verify/333-polled-at-msScope: Expose
polled_at_msonGET /v1/arena/timers(schema 2.18.0); frontend hero timer / legacy mappers prefer indexer poll instant; deepenintegration_stage2api_http_smokeassertions (timers contract, activity buy shape, wallet-stats keys, chain-timer-unavailable 503).Outcome:
FINDINGS: 0medium+Method
polled_at_msfromchain_timer.rs(SystemTime::now()at poll) throughapi_arena.rsJSON to frontenduseArenaHeroTimer/indexerApi.ts.chainNowSec, buy-cooldown display) against on-chain submit-time gates.Assessment
polled_at_mstrust boundaryu64from internal poller — not writable by HTTP clients. Frontend already trusts indexer-first display for deadlines, prices, and head block (#301); this field aligns wall-clock skew with the same snapshot asblock_timestamp_sec/ deadlines rather than opening a new control surface.nextBuyAllowedAt/ contract checks and fresh wallet RPC preflight. Manipulated or stale poll metadata could at most skew display under a compromised indexer/MITM — same pre-existing indexer trust model, not a new fund-loss path.Security review: no medium+ findings on this diff.
No inline threads (nothing to anchor).
mentioned in commit
071ec841e0