-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Revert "Optimize merkle proofs for efficient verification in Solidity (#12857)" #14176
Revert "Optimize merkle proofs for efficient verification in Solidity (#12857)" #14176
Conversation
…paritytech#12857)" This reverts commit f9d1dcd since we still require commitment to the leaves - see paritytech#12820.
@vgeddes @seunlanlege can we get an explicit ack here? I don't want you to be surprised by this protocol change. |
Thanks, yes, we would definitely like this to be merged. |
No objections here |
bot merge |
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/exploring-beefy-authority-set-subsampling-optimisations/3106/1 |
…paritytech#12857)" (paritytech#14176) * Revert "Optimize merkle proofs for efficient verification in Solidity (paritytech#12857)" This reverts commit f9d1dcd since we still require commitment to the leaves - see paritytech#12820. * remove PartialOrd trait from mmr hash type
Yup, I had multi proofs for unsorted nodes (v1 Merkle scheme) Then it was changed to sorted nodes, and I designed another multi proof scheme for this Now that the sorting has been removed. Neither of my previous designs work anymore. Can we just use the first version? |
I'm confused, after this revert we're actually using the "first version", no? |
Apologies, Yeah this is now the case. I was unwittingly pre-sorting leaves in my tests. An artifact of the previous scheme |
Reverts the lexical ordering of hashing of the BEEFY authority merkle tree #12857 since we still require commitment to the leaf indices, which the lexical ordering removes and would require another mechanism for enforcement.
See #12820 for context. Some candidates for salvaging the gas improvement down the line are described here, albeit they currently still require benchmarking.
cc @doubledup & @vgeddes (can't request review), since you'll adjust correspondingly in Solidity, and in case you've had changes to the verifier affected by this (other than the lexical ordering).