[Human app] Add proposals endpoint and update frontend - #3509
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
There was a problem hiding this comment.
Looks much better now!
- please check logger usage examples
- there is still a case w/ 2+ concurrent requests where you access cache from them and can get invalid state
- one comment from prev review
dnechay
left a comment
There was a problem hiding this comment.
Looks way better and easier to understand now!
Some minor comments left.
Please also implement some safety-belt for getProposals to run only once in case of concurrent requests. Ideally - it should be a cron job to scan logs for new proposals and actualize data in cache and getProposals just to retrieve data from cache to return to the client
|
Concurrent requests are fine. It’s read-only and cached; worst case we duplicate work and last write wins. No correctness risk (merge by proposalId, only PENDING/ACTIVE). We only advance lastScannedBlock after successful event fetch. Anyway, this is just an optimization, previously we did per-user requests on frontend and now it’s cached on server-side. |
|
Sounds legit, concurrency shouldn't be an issue for now. I suppose that we are not going to have many active/pending proposals, so won't have to actualize their state as well by going to RPC. |
Issue tracking
#3444
Context behind the change
How has this been tested?
Deployed locally on testnet
Release plan
GOVERNANCE_RPC_URLandGOVERNOR_ADDRESSto ServerGOVERNOR_ADDRESSfrom FrontendPotential risks; What to monitor; Rollback plan
None