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

With "production-ready" by default #1089

Merged
merged 8 commits into from
Dec 22, 2023
Merged

With "production-ready" by default #1089

merged 8 commits into from
Dec 22, 2023

Conversation

yrong
Copy link
Contributor

@yrong yrong commented Dec 22, 2023

Copy link

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (491d9ba) 80.69% compared to head (cd490c1) 58.12%.

❗ Current head cd490c1 differs from pull request most recent head cf5b960. Consider uploading reports for the commit cf5b960 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1089       +/-   ##
===========================================
- Coverage   80.69%   58.12%   -22.58%     
===========================================
  Files          55       55               
  Lines        2274     2173      -101     
  Branches       71       71               
===========================================
- Hits         1835     1263      -572     
- Misses        422      893      +471     
  Partials       17       17               
Flag Coverage Δ
rust 53.17% <ø> (-27.54%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yrong yrong marked this pull request as ready for review December 22, 2023 04:14
Copy link
Contributor

@claravanstaden claravanstaden left a comment

Choose a reason for hiding this comment

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

Looks great @yrong, thanks!

@@ -233,8 +233,8 @@ try-runtime = [
"snowbridge-system/try-runtime",
"sp-runtime/try-runtime",
]
beacon-spec-mainnet = [
"snowbridge-ethereum-beacon-client/beacon-spec-mainnet",
fast-runtime = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets use beacon-spec-minimal here so that the flag sounds like its to do with beacon chain as opposed to any of the runtimes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree!

Copy link
Contributor Author

@yrong yrong Dec 22, 2023

Choose a reason for hiding this comment

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

Then the prod_or_fast macro will not work.
https://github.com/Snowfork/polkadot-sdk/pull/89/files#r1434875211

Btw, it's already used in Polkadot codebase everywhere(e.g. for a fast epoch time) and I would prefer to be in consistent with them.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see that problem. The BridgeHub runtime will continue to have a fast-runtime feature, that will enable the beacon-spec-mainnet feature within the beacon client spec

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -92,4 +91,4 @@ try-runtime = [
"pallet-timestamp?/try-runtime",
"sp-runtime/try-runtime",
]
beacon-spec-mainnet = []
fast-runtime = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

Within the context of this crate, I prefer the name beacon-spec-minimal

Copy link
Contributor Author

@yrong yrong Dec 22, 2023

Choose a reason for hiding this comment

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

#1089 (comment) and IMO mininal-spec is just some kind of the fast-runtime, it's more abstract not only apply to the context of beacon but other contexts we may need later.

Copy link
Contributor Author

@yrong yrong Dec 22, 2023

Choose a reason for hiding this comment

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

d702ab8

As Vincent suggests, Stick to use fast-runtime feature in BH runtime and only enables the beacon-spec-minimal feature in that case.

Copy link
Collaborator

@vgeddes vgeddes left a comment

Choose a reason for hiding this comment

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

+1

@yrong yrong merged commit 09af5e4 into main Dec 22, 2023
7 checks passed
@yrong yrong deleted the ron/fast-runtime branch December 22, 2023 11:43
claravanstaden pushed a commit that referenced this pull request Dec 22, 2023
* Refactor with fast runtime

* CI test with fast-runtime

* Fix ci

* Update sdk

* beacon-spec-minimal

* Fix ci

* Update sdk

* Update sdk
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.

4 participants