-
Notifications
You must be signed in to change notification settings - Fork 59
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
Store parachain bootnodes in relay chain DHT #8
Conversation
Co-authored-by: asynchronous rob <rphmeier@gmail.com>
I've found a pretty big issue with this proposal, which is that the I initially just wanted to add a note in the RFC saying that the calculated genesis hash must not be used for purposes other than determining the networking protocol names. As a side note, if you connect in a chain-spec-less way the JSON-RPC API can't be fully implemented anyway, as the chainSpec_unstable_properties and chainSpec_unstable_chainName functions can't be implemented. But that's already covered by the JSON-RPC spec, which allows some namespaces to not be implemented. In this case, you wouldn't implement the functions in the We can maybe simply remove the JSON-RPC functions that allow querying the genesis hash, except that when you submit a transaction you need to include the genesis hash in it. I can see two ways of solving this problem, I'm not sure right now which way is best:
|
I ended up going for the first option, but I have also opened paritytech/json-rpc-interface-spec#61 in order to make it future-proof. |
It seems that light clients will always need some form of chain spec, but that it only needs a few piecse of information:
Given the weakly synchronous model it would also make sense for light clients to have additional information such as a recent (~1 month) finalized block hash, for maximum deterrence of long range attacks. |
Also needed is the
I don't understand why? Isn't it enough to look into the relay chain which parablock is finalized? |
Properties could definitely be placed in on-chain metadata. Para ID could too, no? |
The light client looks into the relay chain (and thus needs to know the para ID) in order to know which of the parachain blocks is canonical. |
Technically, validator sets can "go back in time" after their stake is withdrawn and create an alternative chain. This puts an expiration date on finality's trustworthiness, and is the case in all PoS blockchains. Most of the time this is not a problem in practice, but in theory the correct thing to do is make sure that the node has some reference block for finality (which it either gets by synchronizing at least once every month, or has hardcoded in its chain spec). Earlier I said it'd be a parachain block hash, but it could just as well be a relay chain block hash to use as a starting point for finality. I suppose we can agree that light clients need some minimal chain spec?
|
That's what I'm currently going for in smoldot. It seems easier to me to update the relay chain specification with an up-to-date block from time to time, rather than update the chain specs of every parachains. Substrate-connect hardcodes the 4 relay chains (Polkadot, Kusama, Westend, Rococo), and is meant to publish a new version at a regular interval containing an up-to-date chain spec for these four relay chains (although the publishing doesn't always happen in practice because it's currently a semi-manual process and the maintainers forget). With this solution, dApps/uApps don't need to deal with this problem.
The finalized relay chain block hash would be contained the relay chain spec, and you're missing the |
Could we not store the |
What you suggest is correct, but in practice it's very complicated to implement. The problem is: what to do if multiple parachain bootnodes return multiple different The way I was going with this RFC is to start with a minimal version, and then maybe add the |
Also, while the This means that it's possible for multiple different parachain bootnodes to return multiple different |
I've pushed another commit that adds back I would like to submit this for voting, but there's still the unresolved question of what to do when it comes to obtaining randomness. Should we use the |
I would 'aye' this in its current state |
/rfc-propose |
Hey @tomaka, here is a link you can use to create the referendum aiming to approve this RFC number 0008. Instructions
It is based on commit hash d8298f6dbd96da490047e27634e89cc2a87f7251. The proposed remark text is: |
I can't seem to be able to create a referendum ("bad origin" error), guessing it's because I'm not in the fellowship. |
I wouldn't mind some help or guidance with this administrative process |
/rfc process 0x56bfa1b49e69991617d8aed0c880101f5506e0595b06a6b97b9d5a6cc014b264 |
/rfc process 0x56bfa1b49e69991617d8aed0c880101f5506e0595b06a6b97b9d5a6cc014b264 |
/rfc process 0x56bfa1b49e69991617d8aed0c880101f5506e0595b06a6b97b9d5a6cc014b264 |
The on-chain referendum has approved the RFC, however I was not able to merge the PR automatically. |
The bot seems to be missing permissions to merge the PR, although I cannot find out what exactly is missing and what needs to be changed. There were no changes to the bot since the last time it merged a PR. |
/rfc process 0x56bfa1b49e69991617d8aed0c880101f5506e0595b06a6b97b9d5a6cc014b264 |
The on-chain referendum has approved the RFC, however I was not able to merge the PR automatically. |
/rfc process 0x56bfa1b49e69991617d8aed0c880101f5506e0595b06a6b97b9d5a6cc014b264 |
1 similar comment
/rfc process 0x56bfa1b49e69991617d8aed0c880101f5506e0595b06a6b97b9d5a6cc014b264 |
The on-chain referendum has approved the RFC, however I was not able to merge the PR automatically. |
/rfc process 0x56bfa1b49e69991617d8aed0c880101f5506e0595b06a6b97b9d5a6cc014b264 |
The on-chain referendum has approved the RFC, however I was not able to merge the PR automatically. |
1 similar comment
The on-chain referendum has approved the RFC, however I was not able to merge the PR automatically. |
/rfc process 0x39fbc57d047c71f553aa42824599a7686aea5c9aab4111f6b836d35d3d058162 |
Unable to find the referendum confirm event in the given block. |
/rfc process 0x56bfa1b49e69991617d8aed0c880101f5506e0595b06a6b97b9d5a6cc014b264 |
The on-chain referendum has approved the RFC. |
@tomaka, do you have an update on the status of this RFC? |
Rendered.