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

Genesis wasm used for parachains. #2591

Closed
xlc opened this issue Aug 7, 2022 · 4 comments · Fixed by #2602
Closed

Genesis wasm used for parachains. #2591

xlc opened this issue Aug 7, 2022 · 4 comments · Fixed by #2602

Comments

@xlc
Copy link
Contributor

xlc commented Aug 7, 2022

Trying with the demo client to connect to Acala and Karura. The state_getRuntimeVersion is returning the genesis block wasm. I believe the metadata is also the genesis metadata. Relaychain doesn't have this issue.

@tomaka
Copy link
Contributor

tomaka commented Aug 8, 2022

I know for sure that it works fine on Statemint and Statemine, as they were only a non-functional shell at the beginning.

Are you sure that you are calling state_getRuntimeVersion after the parachain has reached the head of the chain?

The way smoldot behaves is that it will tell you that it's at block 0 (and calling any RPC function such as state_getRuntimeVersion will return the information as if you were at block 0), and once it manages to connect to the relay chain it will jump from block 0 to the head of the chain.

@xlc
Copy link
Contributor Author

xlc commented Aug 8, 2022

I just tried for Statemine and isn't working. It is synced to latest block.

This is comparison for calling state_getRuntimeVersion with a same block hash with smoldot vs fullnode

Screen Shot 2022-08-08 at 9 07 43 PM

.

@tomaka
Copy link
Contributor

tomaka commented Aug 8, 2022

Notes for myself: after the warp sync, the sync service downloads the first parahead, and then reports that this parahead is a child of the genesis parablock. This is completely wrong.

@tomaka
Copy link
Contributor

tomaka commented Aug 9, 2022

The logic of the finalized_parahead variable in sync_service/parachain.rs is completely wrong. It's unclear to me what I was thinking when implementing this.

@tomaka tomaka mentioned this issue Aug 9, 2022
@mergify mergify bot closed this as completed in #2602 Aug 9, 2022
mergify bot added a commit that referenced this issue Aug 9, 2022
* Clarify docs of async_tree

* Add TODO

* Actually fix the issue

* finalized_parahead -> obsolete_finalized_parahead

* Tweak SubscribeAll handling

* Don't report new blocks if finalized parahead unknown

* Small tweak

* Also don't report best block changes

* Typo

* Renames

* Revamp best_parahead_hash

* Tweak IsNearHeadOfChainHeuristic

* CHANGELOG

* PR number

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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 a pull request may close this issue.

2 participants