feat: lazy pool-state loading benchmark & docs, contract SDK-27 fixes (closes #712) - #887
Merged
Smartdevs17 merged 3 commits intoSep 1, 2026
Merged
Conversation
…artdevs17#884) Upstream main (3b731f2) left the hello-world contract library with 93 compile errors after the architectural refactor in Smartdevs17#884. This repairs the crate so cargo check -p hello-world passes: restored the mangled get_legacy_risk_params body and removed the duplicate get_risk_params in risk_params.rs, restored the dropped timelock module declaration in lib.rs, and fixed SDK-27 API drift (sequence(), ReentrancyGuard::new_with_key 3-arg form, is_zero_address via XDR, Vec::remove(u32), typed flags), enum/structural mismatches (CircuitBreakerStatus Paused/Emergency variants, RecoveryRequest.ready_at, CircuitBreakerState construction), missing GovernanceError/DebtTokenError variants, the missing From<EmergencyWithdrawalError> impl, and shared-events conversion helpers.
…ry index ops - lending_bridge: contractevent topic symbols exceed the 32-char cap once snake-cased; pin shorter topic names via #[contractevent(topics = [...])] - pool-factory: replace Address::from_contract_id with env.current_contract_address(); drop usize casts for Vec index APIs Unblocks building the benchmarks runner (cargo check -p bridge and -p stellarlend-pool-factory now pass).
Covers the epoch-keyed snapshot cache, contract surface and entrypoints, API-service caching, consistency rules, the <50ms performance target with benchmark evidence status, and monitoring. (closes Smartdevs17#712)
|
@kaluuba-org is attempting to deploy a commit to the smartdevs17's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@kaluuba-org Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Owner
|
Thanks for contributing! The changes have been merged. Feel free to leave a review or feedback. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the missing documentation deliverable for lazy pool-state on-demand
loading and unblocks the benchmarks runner, closing #712.
The lazy pool-state implementation itself (epoch-keyed snapshot cache,
on-demand build, explicit invalidation, API-service caching and monitoring)
was already merged via #721/#883. This PR adds the remaining piece — the
docs/POOL_STATE_LAZY_LOADING.mdreference — plus SDK-27 compatibility fixesin two contracts that the benchmark runner depends on.
Closes #712
Changes
PoolStateTempKey::Snapshot(pool, epoch)cache, contract surface andentrypoints (
get_pool_state,get_pool_state_epoch,get_pool_state_metrics,invalidate_pool_state), API-service caching, consistency rules, the<50 ms performance target with the benchmark-evidence status, and monitoring.
lending_bridge.rs):#[contractevent]topic names exceeded the32-char cap once snake-cased; pinned shorter topic names via
#[contractevent(topics = [...])].cargo check -p bridgepasses.lib.rs): SDK-27 drift —Address::from_contract_id→env.current_contract_address(), and dropped uselessusizecasts for theVec::get/Vec::setindex APIs.cargo check -p stellarlend-pool-factorypasses.
Notes
fix/hello-world-build-repair(fix(hello-world): repair contract lib build after merged refactor (#884) #886). Its diffagainst
upstream/maintherefore includes the fix(hello-world): repair contract lib build after merged refactor (#884) #886 build-repair until thatPR merges.
cargo check -p stellarlend-benchmarks) still cannotbuild due to a pre-existing soroban-sdk 27
testutils×#[contracttype]incompatibility (see the doc's "Current status / blocker": contracttypes at
storage.rs:3,rate_limiter.rs:134,mev_protection.rs:70). This isunrelated to pool-state and tracked as a follow-up; the doc records the exact
block and how to run the suite once resolved.
missing
proptestdev-dependency); out of scope here.Test plan
cargo check -p hello-worldpasses (26 pre-existing warnings)cargo check -p bridgepassescargo check -p stellarlend-pool-factorypassescargo check -p stellarlend-benchmarks— blocked (documented above)