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

feat: create testing runtime #226

Merged
merged 45 commits into from
Jul 29, 2021
Merged

feat: create testing runtime #226

merged 45 commits into from
Jul 29, 2021

Conversation

Roznovjak
Copy link
Contributor

Description

Create new testing node and runtime

Related Issue

Fixes: #150
Local copy of #197

Motivation and Context

Current implementation filters certain extrinsic calls. Testing runtime does not block any calls and makes testing easier.

@Roznovjak Roznovjak added the enhancement New feature or request label Apr 27, 2021
@Roznovjak Roznovjak self-assigned this Apr 27, 2021
@Roznovjak Roznovjak changed the title Feat/create testing runtime feat: create testing runtime Apr 27, 2021
@Roznovjak
Copy link
Contributor Author

The following params have been modified:

Calls are not filtered
LaunchPeriod = MINUTES ( changed from 7 days )
VotingPeriod = MINUTES ( changed from 7 days )
EpochDuration = 10 * MINUTES ( changed from 4 hours )
SessionsPerEra = 1 ( changed from 6 )
Affected params:

ReportLongevity = BondingDuration * SessionsPerEra * EpochDuration

@codecov
Copy link

codecov bot commented Jul 13, 2021

Codecov Report

Merging #226 (e17280a) into master (6a5bad0) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #226   +/-   ##
=======================================
  Coverage   15.27%   15.27%           
=======================================
  Files          20       20           
  Lines        6776     6776           
=======================================
  Hits         1035     1035           
  Misses       5741     5741           
Impacted Files Coverage Δ
pallets/exchange/src/lib.rs 75.77% <ø> (ø)
pallets/transaction-multi-payment/src/lib.rs 70.96% <ø> (ø)
pallets/xyk/src/lib.rs 84.01% <ø> (ø)
primitives/src/lib.rs 85.71% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1298bd...e17280a. Read the comment docs.

node/src/chain_spec.rs Outdated Show resolved Hide resolved
@@ -0,0 +1,352 @@
//! HydraDX Client abstractions
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe it is needed because of the abstraction and generics used in service.rs file.

@@ -34,7 +34,8 @@ use frame_support::sp_runtime::{
};
use frame_support::{dispatch::DispatchResult, ensure, traits::Get, transactional};
use frame_system::ensure_signed;
use primitives::{asset::AssetPair, fee, traits::AMM, AssetId, Balance, Price, MAX_IN_RATIO, MAX_OUT_RATIO};
use primitives::{asset::AssetPair, fee, traits::AMM, AssetId, Balance, Price};
use common_runtime::constants::chain::{MAX_IN_RATIO, MAX_OUT_RATIO};
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a wanted change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it makes sense to store common constants in common_runtime. There is also an option to create a new submodule for constants in primitives module.

@jak-pan
Copy link
Contributor

jak-pan commented Jul 26, 2021

Just some general questions about possible improvements but other than that LGTM.

@jak-pan
Copy link
Contributor

jak-pan commented Jul 28, 2021

Update docs pls and we can merge

@jak-pan jak-pan merged commit 073fda0 into master Jul 29, 2021
@jak-pan jak-pan deleted the feat/create_testing_runtime branch February 22, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create new runtime build for testing
4 participants