You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement backwards compatible, opt-in load behavior that enables returning commits that have been consensus-pruned from stream state.
Background
At @desci-labs, we have strong needs to maximize determinism in state resolution. One area where this could be improved is under the effects of late-publishing attacks, because if this is performed, nodes will stop resolving any pruned commitID. We would like to be able to optionally resolve these pruned commits, if the node has knowledge about it. This would allow us to build truly stable references to historical stream state, reducing the impact of late publishing attacks.
At the present time, this would require the node to have been alive and well during the attack. In a CIP-145 future, new nodes would automatically be made aware of these historical forks, and hence could resolve pruned commits even if they were not online at the time.
These two changes together make for a dramatically improved resilience against late-publishing attacks, as they would not be able to prevent resolution of previously valid state.
Technical Information
This is the function that loads streams at a CommitID, and it currently hard-codes throwOnConflict to true:
This can be made a function argument, threaded through the caller all the way up to the HTTP API. There, it can be added as a property in LoadOptions that can be passed from the HTTP client.
Thanks to @stbrody for suggesting an implementation path 🧁
Note that it is my intention to contribute the code for this enhancement, if there are no objections.
The text was updated successfully, but these errors were encountered:
Description
Implement backwards compatible, opt-in load behavior that enables returning commits that have been consensus-pruned from stream state.
Background
At @desci-labs, we have strong needs to maximize determinism in state resolution. One area where this could be improved is under the effects of late-publishing attacks, because if this is performed, nodes will stop resolving any pruned
commitID
. We would like to be able to optionally resolve these pruned commits, if the node has knowledge about it. This would allow us to build truly stable references to historical stream state, reducing the impact of late publishing attacks.At the present time, this would require the node to have been alive and well during the attack. In a CIP-145 future, new nodes would automatically be made aware of these historical forks, and hence could resolve pruned commits even if they were not online at the time.
These two changes together make for a dramatically improved resilience against late-publishing attacks, as they would not be able to prevent resolution of previously valid state.
Technical Information
This is the function that loads streams at a
CommitID
, and it currently hard-codesthrowOnConflict
totrue
:js-ceramic/packages/core/src/stream-loading/stream-loader.ts
Line 140 in d2db904
This can be made a function argument, threaded through the caller all the way up to the HTTP API. There, it can be added as a property in
LoadOptions
that can be passed from the HTTP client.Thanks to @stbrody for suggesting an implementation path 🧁
Note that it is my intention to contribute the code for this enhancement, if there are no objections.
The text was updated successfully, but these errors were encountered: