-
Notifications
You must be signed in to change notification settings - Fork 5
Description
In multi-party contracts where several parties are allowed to "optimistically" update the state of the contract, the challenge period might be problematic, as it would normally prevent other parties to further update the state until a relatively long delay.
A solution might be to chain the optimistic updates: each update records both the new state, and a hash of the previous one). A challenger should challenge the oldest invalid update. (Note: such contracts might need a way to preventing a party from spamming the optimistic update mechanism and preventing other parties to ever start a challenge)
This works in principle, but doesn't scale: the cost of challenging a state that has been optimistically updated
Merkle trees could be used as accumulators, bringing the cost down to
This draft describes an append-only accumulator that would cost a single write in a vector of size
TODO: is it worth it? Maybe the simpler solution with Merkle trees is good enough in practice.