-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ERC: Cache invalidation in ERC-5219 mode Web3 URL #652
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Andrew B Coathup <[email protected]>
Hi! Thanks for the initial review! |
… additional places to listen for cache clearing, on top of the current contract+path.
ERCS/erc-7774.md
Outdated
|
||
## Security Considerations | ||
|
||
No security considerations were found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are definitely some security considerations, no? At the very least contracts need to correctly emit cache invalidation events, or stale content could be served.
I bet there are some unpleasant interactions between this and chain reorgs. as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed!
I have added 3 :
- Stale content will be served during the delay between a user transaction emitting a cache clearing event, and the
web3://
client picking and processing the event. - For each cached page, websites must properly implement cache invalidation events; otherwise, stale content will be served indefinitely.
- In the event of a chain reorganization, the
web3://
client must roll back its caching state, or reverted content will be served until the next cache clearing event.
The first one is something that conceptually annoys me (even if the web3://
client is optimizing its logs reading by using streams, it can theorically be missed).
So I am thinking about ways for the website to signal to the web3://
client when fetching a page: "hey please ensure you are up to date with block XXX (because I just made a change on it via a TX)".
A HTTP header in the request is an idea, but may be not practical when doing a page change (e.g. in blog post edit page, save tx, then go to blog post page view). Thinking...
Co-authored-by: Sam Wilson <[email protected]>
Co-authored-by: Sam Wilson <[email protected]>
Co-authored-by: Sam Wilson <[email protected]>
@SamWilsn Also thanks again for the review; for taking the time to read this whole thing and make comments! :-) Now thinking about the signaling discussed just before. |
Ok got the rough idea : a I'll add that shortly. |
Abstract
In the context of the ERC-6860
web3://
standard, this ERC extends the ERC-6944 resolve mode: This standard add mechanisms to alleviate limitations to the use of standard RFC 9111 HTTP caching.