bump contract to 2.9.0 - #1410
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/run-security-scan |
alexcos20
left a comment
There was a problem hiding this comment.
AI automated code review (Gemini 3).
Overall risk: low
Summary:
The PR successfully upgrades @oceanprotocol/contracts to v2.9.0 and implements indexer support for the new ReLock escrow event, along with the updated Auth event signature. Database schemas (Elasticsearch and Typesense), event processors, and constants have been seamlessly updated to reflect the new on-chain event properties. The addition of the new integration test thoroughly exercises the updated functionality. LGTM!
Comments:
• [INFO][style] Excellent work keeping the event processing simple and strictly mapping the new ReLock event properties using the existing addr and num type-safe helper functions.
• [INFO][other] Great addition of integration tests for the reLock transaction. Using real contract interactions to ensure the indexer captures the newly emitted events guarantees strong end-to-end reliability.
• [INFO][other] Good catch on updating the EVENT_HASHES for ESCROW_AUTH to reflect the newly added address parameter. Keeping these synchronized perfectly aligns the indexer with the v2.9.0 ABI.
* Shared Hardware Resource Pool for Compute Environments (#1390) * shared hw resources * Add Services (#1402) * services * bump contract to 2.9.0 (#1410) * bump contract to 2.9.0 * cross-node auth tokens (#1404) * cross-node auth tokens * new validate auth token method * stateless * fix comment reviews * revert to ask remote node * finite number expiry + oom protection * fix test * remove meax ttl * add peerid for signature check * issuerpeerid on create auth token only --------- Co-authored-by: alexcos20 <alex.coseru@gmail.com> * Update src/components/Auth/index.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update src/components/Auth/index.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix network recreate (#1416) * add cpuList (#1417) * add cpuList * services updates (#1422) * Service lifecycle hardening * remove axios (#1424) * remove axios * Feature/use native sqlite (#1423) * use native sql * resources constrains (#1425) * resources constrains * New updatedAt record for services (#1428) * add updatedAt * fix review comments * lint * allow docker specs on service restart (#1429) * add more templates * fix stable diffusion template * fix extend service (#1435) * new arg "release" for stop service (#1434) * fix bugs * fix comment * add database retry * add envs, validations, tests * fix return type * remove timeout * fix review * fix type * Authenticate `PolicyServerPassthrough` / `initializePSVerification`, and stop logging credentials (#1449) * Authenticate `PolicyServerPassthrough` / `initializePSVerification`, and stop logging credentials * Feature/docker stats (#1436) * docker stats * remove serviceEndpoints (#1448) * use custom ocean.js/cli * fix merge errors * Dependency and toolchain refresh (#1453) * updates * bump node version * fix review * use correct ocean.js branch * workflows comfy (#1442) * workflows comfy * fix template * fix download * split in two bundles * workflow id * multiscene test * multishoot v2 * fix v2 * v3 try * voice concat * update ugc product template to include new fields necessary on dashboard * concat voices too * install missing services * cut to new scene * remove sizeGb * cleanup * readd sizegb and schema * minimax flow * simplify * minimax h3 v2 * v3 h3 * h3 v4 * image defaults * speed improvement * fixes * fix box sizes * fix corrupt model download * new carachters * fix tail sound * add prompt creation model * add minimax-music3 template * ltx 2.5 * space out boxes ltx 2.5 * fix template id * simplify flow * fix bugs * fix wrong img size * fixes from official docs * fix input out of range * minimax h3 fix models * fix new carachters * minimax fixes * find old videos * fixes ltx 2.5 * try open github minimax flow * live preview * allinone fixes * portarait mode * more allinone fixes * fix extend video * fix libraries * add muse, qwen38 templates * fix openweb ui bootstrap * remove pre configured admin * fix muse tag * ui flows * add glm 5.2 template * remove comment * remove incorrect comment * ecommerce flow fixes * update templates to run with opencode * adapt description * text changes * fixes ecom * fixes for ecom * fixes for ecom * update glm5.2 template * reduce context * add glm5.2 template * add deepseek harness * update harness template * update deepseek template * update template * update template * use bucket snapshot * deepseek fix * remove hardcoded flows * fix dockerfile and path * update deepseek template * add other type * fix prettier * update mamba version * remove templates * remove muse-glimmer * remove files * remove Agents.md * fix coderabbit comments --------- Co-authored-by: Denis <61563365+dnsi0@users.noreply.github.com> Co-authored-by: alexcos20 <alex.coseru@gmail.com> * Fix: indexer silently skipping DDOs on transient provider errors (#1458) * fix indexer provider * bump to node 24 (#1454) * bump to node 24 * guard fix * p2p_improve (#1455) * add metrics (#1456) * keep C2D running when the metadata DB is unreachable (#1457) * guard ddo metadata * fix ocean.js branch * make "Failed to advertise queued" and Caught "The operation was aborted" while republishing debug events, as they are not errors * use proper ocean-cli branch * add helper script * fix ci --------- Co-authored-by: Giurgiu Razvan <giurgiur99@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Denis <61563365+dnsi0@users.noreply.github.com> Co-authored-by: Bogdan Fazakas <bogdan.fazakas@gmail.com>
Integrate @oceanprotocol/contracts 2.9.0 — Escrow
Auth+ReLockeventsSummary
Updates the indexer to the Escrow contract shipped in
@oceanprotocol/contracts@2.9.0(contracts#1031, "add bundles &
relocks"). Two indexer-relevant changes landed on-chain:
Authevent gained a non-indexedaddress token(betweenpayeeandmaxLockedAmount), so indexers no longer have to infer which token an authorizationapplies to.
ReLockevent is emitted when a payee adjusts an active lock's amount/expiry.This PR wires both into the existing Escrow indexing pipeline. It does not adopt the new
bundle entrypoints (
bundle,bundleJobs) or callreLock/reLocksfrom the node — we onlyindex the events.
Why the code change is needed
The indexer matches logs against a hardcoded
EVENT_HASHEStable (topic0 → signature),used both as the
getLogstopic filter and for dispatch. Because theAuthsignature changed,its keccak256 topic0 changed too — the stale entry meant new-format
Authlogs would beneither fetched nor dispatched.
ReLockhad no entry at all. The ABI decode path itself needsno change:
EscrowEventProcessorbuilds itsInterfacefrom the imported 2.9.0 artifact.What's included
src/utils/constants.tsAuthtopic0 →0x5a3021f4…, signature →Auth(address,address,address,uint256,uint256,uint256); addedESCROW_RELOCKtoEVENTS,ESCROW_EVENTS, andEVENT_HASHES(0x1ccec59c…)src/components/Indexer/processor.tsReLock→EscrowEventProcessorinEVENT_PROCESSOR_MAPsrc/components/Indexer/processors/EscrowEventProcessor.tstokenon theAuthcase; added theReLockcase (payer,payee,jobId,oldAmount,newAmount,newExpiry,token)src/@types/Escrow.tsoldAmount?,newAmount?,newExpiry?toEscrowEventsrc/components/database/{Typesense,Elastic}Schemas.tsescrowschema (uint256 kept as raw strings)package.json@oceanprotocol/contractsto 2.9.0The
Authtokenreuses the existingEscrowEvent.tokenfield, and the query/read path(
GetEscrowEventsCommand,EscrowEventsHandler, theescrowHTTP route) needs no change —eventType: 'ReLock'is accepted becauseReLockis now inESCROW_EVENTS. The other fiveEscrow events (Deposit/Lock/Claimed/Canceled/Withdraw) are unchanged; their topic0s already
match the 2.9.0 ABI.
Tests
src/test/integration/escrow.test.ts: theAuthtest now also asserts the indexedtoken,and a new
indexes a ReLock eventtest creates a lock thenreLocks it and asserts theindexed
payer/payee/jobId/oldAmount/newAmount/token(and thatnewExpiryispopulated).
pass on both Typesense and Elasticsearch backends.
type-checkandlintare clean.