OpenZeppelin / OpenZeppelin/guardian
Add a canonical nonce endpoint to skip unnecesary syncs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 10
- Forks
- 20
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 43
Description
sync() should stop fetching full Guardian state when Guardian has no newer canonical state than the local account.
Add a lightweight authenticated API that returns the latest canonical nonce for an account, and update client sync to use it as a pre-check:
- run the normal network sync first
- fetch Guardian’s latest canonical nonce
- if guardian_nonce <= local_nonce, skip the Guardian state fetch
- if guardian_nonce > local_nonce, continue with the existing full sync flow
Scope:
- add the new HTTP/gRPC endpoint in Guardian
- add support in crates/client and packages/guardian-client
- update multisig sync to use the nonce pre-check
Acceptance criteria:
- Guardian exposes the latest canonical nonce for an account
- sync skips full Guardian fetches when Guardian is not ahead
- existing sync behavior is unchanged when Guardian is ahead
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing sync flow in crates/client, packages/guardian-client, and the multisig sync code. Review how Guardian’s HTTP/gRPC APIs are exposed, then verify the nonce pre-check against the acceptance criteria: unchanged behavior when Guardian is ahead and no full state fetch when it is not.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, rust
- Domain
- backend-api-design, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100