Expose actual_seconds_added on GET /v1/arena/buys (#282) #406
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!406
Loading…
Reference in a new issue
No description provided.
Delete branch "cursor/arena-buys-seconds-282-f1de"
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
Expose
actual_seconds_addedonGET /v1/arena/buys(already persisted inidx_arena_buy), wire the field throughfetchArenaBuysAsBuyItems, add integration coverage andscripts/verify-wallet-profile-anvil.shfor #258 / #282 QA.Rebased onto
main(resolved doc/guardrail conflicts with #278 Last Buy epoch and #280 Arena CSS naming).Verification checklist
api_arena_buys_actual_seconds_added_smoke)cd indexer && cargo test --test integration_stage2cd frontend && npm test -- indexerApibash scripts/verify-wallet-profile-anvil.shmaincursor/arena-buys-seconds-282-f1deontoorigin/mainChanges
actual_seconds_added::textinarena_buysSQL/JSON;integration_stage2smoke asserts API ↔ DB parity.ArenaBuyItem.actual_seconds_added+mapArenaBuyToBuyItem;indexerApi.test.tsfixture.scripts/verify-wallet-profile-anvil.sh— isolated Anvil (8548) + Postgres (5433) + indexer (3103); DOUB buy,/v1/arena/buys, wallet stats, optional donate-pools donor summary.INV-INDEXER-282-ARENA-BUYS-SECONDS, wallet-profile cross-links,docs/indexer/design.md,docs/testing/ci.md, guardrails/skills.Closes #282
mentioned in issue #282
Security review
Commit reviewed:
e0d9b4c04d2438ec3801e0e48526e7ad8079d976Scope: Expose
actual_seconds_addedonGET /v1/arena/buys(indexerapi_arena.rs), frontendindexerApimapping/types, integration smoke +scripts/verify-wallet-profile-anvil.sh, docs/guardrails only.Outcome:
FINDINGS: 0(no medium, high, or critical issues on this diff)What was reviewed
actual_seconds_added::textto the existing parameterizedidx_arena_buylist query (LIMIT/OFFSETbound as$1/$2). Value is indexer-sourced from decodedArenaBuylogs (already persisted inidx_arena_buy); no new request parameters or dynamic SQL.parseBigInt/formatLocaleIntegerpaths; CSS class selection usesBigInt()in try/catch. NodangerouslySetInnerHTMLor HTML injection surface introduced.GET /v1/arena/buysremains a public read surface (unchanged).actual_seconds_addedis on-chain event data already stored and used server-side (e.g. wallet stats). Exposing it on the buys list does not grant new write access or bypass wallet-scoped endpoints.verify-wallet-profile-anvil.shinterpolatesBUY_TXinto localpsqlqueries;BUY_TXis produced by localcast sendon Anvil (dev-only smoke). Not a production attack path.Prior threads
No prior security-review notes on this MR; nothing to re-report.
Inline comments: none (no qualifying findings).
added 8 commits
main1b207c5a- Expose actual_seconds_added on GET /v1/arena/buys (#282)Compare with previous version
changed the description
Security review
Commit reviewed:
1b207c5ac8495ceb8b9430dfd357042a731c780bScope: MR !406 full diff vs
main— #282actual_seconds_addedonGET /v1/arena/buys+ frontend mapping; rebased includes #278 Last Buy epoch ingest, #279 Anvil E2E trap/CL8Y extract, #280 Arena CSS rename, #281 dev-wallet seed minter alignment (DeployDev,anvil_deployer_key.sh,seed-evm-dev-wallets-anvil.sh), verify scripts/docs.Outcome:
FINDINGS: 0(no medium, high, or critical issues on this diff)What was reviewed
actual_seconds_added::textadded to the existing parameterizedidx_arena_buylist query ($1/$2limit/offset). Data is chain-sourced and already persisted; no new user-controlled SQL fragments.LastBuyEpochStarted→idx_arena_last_buy_epoch_started;idx_arena_buy.last_buy_epochfrom ordered in-block head (apply_epoch_startedafter epoch log, before subsequentBuyin same tx). Wallet stats useCOUNT(DISTINCT last_buy_epoch)with bound$1address — no injection path.parseBigInt/formatLocaleInteger/ React text nodes; nodangerouslySetInnerHTML. Display values are numeric strings from indexer/chain.actual_seconds_addedis already public inBuyevents and DB; exposing it on/v1/arena/buysdoes not grant writes or bypass wallet-scoped validation (invalid_addresson malformed paths unchanged).YIELDOMEGA_SEED_MINTER_ADDRESSgrantsMINTER_ROLEonly inDeployDev.s.sol(dev chain). Seed script enforces loopback RPC + chain id allowlist (31337/6342/6343) and_assert_minter_rolebefore mint — local QA only, not production deploy path.verify-wallet-profile-anvil.shinterpolatesBUY_TXinto localpsql(hash from localcast sendon isolated Anvil).anvil_deployer_key.shdocuments Foundry Anvil account #0 default PK for deploy alignment — dev-only, not production secrets.kill 0— reliability hardening, not a new exposure.Prior threads
Prior review on
e0d9b4creportedFINDINGS: 0for the narrower #282 slice. Re-reviewed expanded rebase content above; no prior medium+ findings to re-report — still none on current HEAD.Inline comments: none (no qualifying findings).
mentioned in commit
32ed77a179