-
Notifications
You must be signed in to change notification settings - Fork 81
[WIP] ideas for syncing validator set from one chain to another as well as making bridge work with dynamic validator sets #52
Conversation
…rocessOnChangeFinalizedEvent
if you have time feel free to take a look at https://github.com/paritytech/parity-bridge/blob/validator_set_thoughts/docs/bridged_validator_set.md i'd greatly appreciate feedback on that :) i'm still working on https://github.com/paritytech/parity-bridge/blob/validator_set_thoughts/docs/bridge_with_dynamic_validator_set.md which builds on top of https://github.com/paritytech/parity-bridge/blob/validator_set_thoughts/docs/bridged_validator_set.md |
The main issue I see is that the "transaction" actually finalizing a validator set change is extra-protocol and doesn't actually issue any log events. Otherwise it seems reasonable. |
@rphmeier many thanks for looking at it :) what exactly do you mean by "extra-protocol"? is my following thinking exhaustive and correct?: i guess by any pointers on how to solve the issue you see? |
extra-protocol is the wrong term. it's more like an "implied" transaction calling |
i see. wasn't aware of the possibility of that. so far i thought that the calls (done by validator processes) to the calls would happen similar to how the bridge currently relays deposits: what is the exact terminology for the case you're describing so i can read up on that? do you have any useful pointers to documentation? |
still adjusting my mental model on how specific parts of ethereum work |
This isn't something that exists in Ethereum. It's something we added to Parity specifically for the purpose of changing validator sets upon finality of a signal. |
where's the flaw in my following thought process?: after waiting for n confirmations (or figuring out finality some other way) on a similar to
all those transactions get mined and change the storage of the call to
ChangeFinalized event
the transaction containing the update and event gets mined and now acts as a log of that change to the validator set |
@snd no problem there really, just pointing out that there isn't an easy way for the validators on chain A to tell when a validator set change on A has been finalized without constantly polling |
@rphmeier very true. i get the issue now and will think about it |
might have found a much simpler solution to the "bridge with dynamic validator sets" problem. |
@debris @rphmeier would it be an option to have two distinct (not synced or relayed) validator sets and associated processes? one on one would be responsible for relaying withdrawals and the other for relaying deposits. if we then change withdrawals to work analogous to deposits (= remove the "collecting signatures on the this could work and requires no relaying of validator sets! it has the advantage of being relatively simple and probably less error prone. it has the disadvantage of having two sets of validator sets and processes. it also has the disadvantage of resulting in |
the two validator sets could represent the same set of addresses! changes would have to be done to both of them individually though. |
still thinking through other solutions but they all require the relay of a validator set so far |
i took a break from this to work on paritydb for a bit. had some more thoughts on new approach over the weekend, which is simpler than my previous thinking. in the process of writing it down |
@rphmeier if you have time could you have a look at my previous comment #52 (comment) i've thought something through that's based on that assumption. checking whether it's worthwhile to finish my writeup |
Talked w/ @snd in person about this. The foreign chain would be able to issue instant-support validator set changes with this event: The new set and signatures could then be sent to the home chain in a transaction, at which point the bridge validators would be updated. |
currently working on #54 which is unrelated and has higher priority. i'll get back to this afterwards. my thinking up till now assumed POW and a fuzzy sense of n blocks deep finality (since that's how parity-chain currently works). |
most PoA systems have instant or max-depth finality (Tendermint, Honeybadger, CasperFFG) but Aura does not |
just to be sure: home_chain would be POW and foreign_chain would be Aura, correct? |
yeah. although it would also be interesting to explore the cases where both are PoA |
the deposit case should be fairly straightforward: since the validator set exists on retrying |
closing this in favor of continuing discussion here #33 |
thought i'd do this as a branch on the relevant repo. seems cleaner than a bunch of gists
ready for review/feedback:
https://github.com/paritytech/parity-bridge/blob/validator_set_thoughts/docs/bridged_validator_set.md
writeup in progress:
https://github.com/paritytech/parity-bridge/blob/validator_set_thoughts/docs/bridge_with_dynamic_validator_set.md
feedback and questions are greatly appreciated :)