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

🗑️ Scrap Async Instantiation #310

Merged
merged 1 commit into from
Jun 11, 2024
Merged

Conversation

JuaniRios
Copy link
Contributor

@JuaniRios JuaniRios commented May 29, 2024

What?

  • Remove async instantiation

Why?

  • Tried making genesis parallel instantiation work, but after the SDK update it seems it's no longer possible due to features like "std" not being passed when calling the runtime for the genesis raw spec creation.
  • It is used only in a few tests, and so it's better to delete it all to avoid maintaining it.

How?

  • Delete the async file
  • Modify tests that used it
  • Remove the populated chain spec

@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-contribution-interaction branch from 0d86ab1 to 5e03703 Compare May 31, 2024 09:36
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch from 85161c8 to 896cddb Compare May 31, 2024 10:02
@JuaniRios JuaniRios mentioned this pull request May 31, 2024
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch 6 times, most recently from 5c65d7b to 17f7d12 Compare June 3, 2024 11:48
@JuaniRios JuaniRios changed the title fix async genesis config 🗑️ Scrap Async Instantiation Jun 3, 2024
@JuaniRios JuaniRios self-assigned this Jun 3, 2024
@JuaniRios JuaniRios requested review from lrazovic and vstam1 June 3, 2024 11:55
@JuaniRios JuaniRios marked this pull request as ready for review June 3, 2024 11:55
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-contribution-interaction branch from 5e03703 to c2734e9 Compare June 3, 2024 14:16
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch from 17f7d12 to 21d555e Compare June 3, 2024 14:16
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-contribution-interaction branch from c2734e9 to 00658aa Compare June 3, 2024 14:42
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch from 21d555e to c250bbe Compare June 3, 2024 14:42
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-contribution-interaction branch from 00658aa to 816e301 Compare June 4, 2024 09:32
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch from c250bbe to 0564e7e Compare June 4, 2024 09:32
Copy link
Collaborator

@vstam1 vstam1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love every piece of code simplification! I was wondering about the whole RefCell setup. I can vaguely remember that it was needed for the Async feature with different execution environments? I was wondering if we could change this RefCell implementation now, as we do not require the std execution environment anymore? I might be completely mistaken, but just a general question.

integration-tests/src/constants.rs Show resolved Hide resolved
pallets/funding/src/lib.rs Outdated Show resolved Hide resolved
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-contribution-interaction branch from 816e301 to 5a10755 Compare June 11, 2024 08:42
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch from 0564e7e to 56200a0 Compare June 11, 2024 08:42
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-contribution-interaction branch 3 times, most recently from 7bcbf6d to 27538ee Compare June 11, 2024 10:48
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch from 56200a0 to 25766bd Compare June 11, 2024 10:48
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-contribution-interaction branch from 27538ee to 80fbb7f Compare June 11, 2024 10:50
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch from 25766bd to 4b88419 Compare June 11, 2024 10:50
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-contribution-interaction branch from 80fbb7f to a3c2e3d Compare June 11, 2024 10:54
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch 2 times, most recently from 7ca9bb8 to b75fa39 Compare June 11, 2024 11:20
Copy link
Contributor Author

Love every piece of code simplification! I was wondering about the whole RefCell setup. I can vaguely remember that it was needed for the Async feature with different execution environments? I was wondering if we could change this RefCell implementation now, as we do not require the std execution environment anymore? I might be completely mistaken, but just a general question.

RefCell is there for tests, since we need to setup the mock externalities manually. We use "std" because is needed in both tests and benchmark tests, but cannot be included in the wasm runtime

@JuaniRios JuaniRios requested a review from vstam1 June 11, 2024 13:02
@JuaniRios JuaniRios force-pushed the 05-27-test-freeze-contribution-interaction branch from a3c2e3d to 1c59fc6 Compare June 11, 2024 14:43
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch from b75fa39 to d4ff8ea Compare June 11, 2024 14:43
Base automatically changed from 05-27-test-freeze-contribution-interaction to main June 11, 2024 14:46
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch from d4ff8ea to aec9bcb Compare June 11, 2024 14:52
@JuaniRios JuaniRios force-pushed the 05-29-fix_async_genesis_config branch from aec9bcb to b30e975 Compare June 11, 2024 15:01
@JuaniRios JuaniRios merged commit cb1b6e4 into main Jun 11, 2024
@JuaniRios JuaniRios deleted the 05-29-fix_async_genesis_config branch June 11, 2024 15:02
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