Skip to content
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

refactor decode proof to extract all keys #569

Merged
merged 1 commit into from
Nov 28, 2023
Merged

Conversation

ermalkaleci
Copy link
Collaborator

No description provided.

@ermalkaleci
Copy link
Collaborator Author

this will make it easy to implement new inherent #561
decode_proof will find all possible keys so there's no need to inject unchanged ones

@ermalkaleci
Copy link
Collaborator Author

setValidationData is executed first so other inherent can read proofs from query.parachainSystem.relayStateProof()
@girazoki

@ermalkaleci ermalkaleci merged commit a755f09 into master Nov 28, 2023
6 checks passed
@ermalkaleci ermalkaleci deleted the refactor_decode_proof branch November 28, 2023 19:43
@girazoki
Copy link
Contributor

thank you!

@girazoki
Copy link
Contributor

girazoki commented Dec 14, 2023

@ermalkaleci as I am understanding it, now every key that was proven from the previous block and that is not modified will be included and proved on the new built block?

@ermalkaleci
Copy link
Collaborator Author

yes, you don't need to touch SetValidationData inherent. SetValidationData will be executed first and set new proofs which you can read on your inherent from query.parachainSystem.relayStateProof()

@girazoki
Copy link
Contributor

girazoki commented Dec 14, 2023

ah that's amazing. I think it does cover most of our needs so we will shortly propose a PR adding tanssi support. The only thing I am thinking is: what happens if there are some keys being proved in one inherent (set-validation-data) and others in another inherent (authorities-noting in our case) in production? Probably the nibbles passed to set-validation-data do not include all keys to be able to fork correctly.

We might propose the possibility to add additional keys to set-validation-data inherent if that's fine in the PR that supports tanssi (in other words, being able to add additional keys to the WellKnownKeys struct)

@girazoki
Copy link
Contributor

girazoki commented Dec 14, 2023

the other thing we can do is refactor our node to inject a single proof (in set-validation-data) that contains all keys we need to prove. That should work with this implementation and I think its cleaner! So in that case you dont need to worry about what I just said :)

@ermalkaleci
Copy link
Collaborator Author

I think I was wrong. I will look again tomorrow, maybe it needs a refactor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants