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

Feature/plmc 391 allow parallel instantiaton of projects #130

Merged
merged 121 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 105 commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
e7cf200
feat(287): parachain information discovery and channel opening
JuaniRios Oct 9, 2023
b0e0258
first commit
JuaniRios Oct 26, 2023
01fbe0a
save
JuaniRios Oct 27, 2023
396e1c8
penpal local fork
JuaniRios Oct 30, 2023
8549be2
save
JuaniRios Oct 30, 2023
3fd4ee0
save
JuaniRios Oct 31, 2023
b272479
save
JuaniRios Nov 7, 2023
4aeb55e
HRMP establishment successfully mocked!
JuaniRios Nov 7, 2023
223c4cd
pallet-funding tests fixed
JuaniRios Nov 7, 2023
f96b048
migration check working
JuaniRios Nov 8, 2023
5713267
Merge branch 'main' into feature/plmc-288-receiver-pallet
JuaniRios Nov 8, 2023
3782ac6
fixes
JuaniRios Nov 8, 2023
85e817f
add cargo lock
JuaniRios Nov 8, 2023
f76ad0e
dmp fix
JuaniRios Nov 9, 2023
373345e
formatting
JuaniRios Nov 9, 2023
94f4229
small fixed
JuaniRios Nov 9, 2023
6801c51
fixes
JuaniRios Nov 9, 2023
25d5919
Merge branch 'main' into feature/plmc-290-xcm-instruction-that-reveal…
JuaniRios Nov 9, 2023
258746f
save
JuaniRios Nov 10, 2023
483dd10
compiling, unit converion to map
JuaniRios Nov 10, 2023
3c22eda
revert staking changes
JuaniRios Nov 13, 2023
308b955
saving now evaluation reward and move to u64 for migration
JuaniRios Nov 13, 2023
f1bae11
save
JuaniRios Nov 13, 2023
154ee8a
save
JuaniRios Nov 13, 2023
79adcc9
migration is successfully sent and reflected in the system
JuaniRios Nov 14, 2023
88eeb2a
vesting scheduling working in polimec-receiver
JuaniRios Nov 14, 2023
62adc46
save: starting to implement transact response, but we need to store a…
JuaniRios Nov 14, 2023
85bdfb9
save
JuaniRios Nov 15, 2023
1b4d8bb
Migration for a single user working fully and tested
JuaniRios Nov 15, 2023
7d27c36
Everything works!
JuaniRios Nov 15, 2023
26ae34e
pallet_funding test broken currently
JuaniRios Nov 15, 2023
5275f2f
bug found in evaluation unbonding by cleaner. Still an infinite loop …
JuaniRios Nov 16, 2023
41a3465
all bugs squashed B)
JuaniRios Nov 16, 2023
1888e79
Merge branch 'main' into feature/plmc-290-xcm-instruction-that-reveal…
JuaniRios Nov 16, 2023
a8e5dff
Merge branch 'feature/plmc-290-xcm-instruction-that-reveals-polimecs-…
JuaniRios Nov 16, 2023
0095a22
need to find a way to generate function from a new macro
JuaniRios Nov 16, 2023
f1c8bfa
need to find a way to generate function from a new macro
JuaniRios Nov 17, 2023
a87cff2
e2e tests successfully adapted to the xcm emulator
JuaniRios Nov 21, 2023
a65814a
Testnet now using Oracle, and e2e successfully passing.
JuaniRios Nov 21, 2023
9c0b29b
not all xcmp messages being received
JuaniRios Nov 21, 2023
bd07a48
save
JuaniRios Nov 22, 2023
901d741
cleanup
JuaniRios Nov 23, 2023
9c627a8
fmt
JuaniRios Nov 23, 2023
251882b
Merge branch 'main' into feature/plmc-291-extrinsic-that-does-one-mig…
JuaniRios Nov 23, 2023
d0b1827
fixes
JuaniRios Nov 23, 2023
1d72b75
Merge branch 'feature/plmc-291-extrinsic-that-does-one-migration' int…
JuaniRios Nov 23, 2023
c10f4d6
save
JuaniRios Nov 24, 2023
c0d2451
limiting 5 migrations per block works
JuaniRios Nov 28, 2023
899c258
Merge branch 'main' into feature/plmc-359-migrations-being-put-into-o…
JuaniRios Nov 28, 2023
c698ce8
fmt
JuaniRios Nov 28, 2023
5cb739f
save
JuaniRios Nov 28, 2023
4e0a6c3
back to normal migration without bundling per block, now works for so…
JuaniRios Nov 28, 2023
ad0bdc0
final commit
JuaniRios Nov 29, 2023
0780656
first commit
JuaniRios Nov 29, 2023
8a098bd
ct migration tests refactor
JuaniRios Nov 29, 2023
90558f0
stable
JuaniRios Nov 29, 2023
6b03214
using generate_accounts! macro in all integration tests
JuaniRios Nov 30, 2023
6401c3c
wip
JuaniRios Nov 30, 2023
e5a27e2
big refactor
JuaniRios Nov 30, 2023
18ec093
almost there
JuaniRios Nov 30, 2023
968c6e1
working
JuaniRios Dec 1, 2023
f5c51f3
Merge branch 'main' into feature/plmc-365-disallow-duplicated-migrati…
JuaniRios Dec 4, 2023
7c37160
final changes
JuaniRios Dec 4, 2023
80a14cf
tests passing
JuaniRios Dec 5, 2023
9a0a32d
multiple projects test passing.
JuaniRios Dec 5, 2023
ed61665
state machine intergration for releasing deposit
JuaniRios Dec 5, 2023
d978e06
starting to fix last tests
JuaniRios Dec 5, 2023
ab61caf
only evaluation automatic release working.
JuaniRios Dec 6, 2023
b80d50d
state machine fixed where it only worked on evaluations
JuaniRios Dec 6, 2023
98280ae
broken tests
JuaniRios Dec 6, 2023
9370b2c
save
JuaniRios Dec 7, 2023
fe2ba74
manual and automatic ct mint tests now passing. Removed the specific …
JuaniRios Dec 7, 2023
e9dd2b0
fixed most tests. Bid calculation function not working as intended now
JuaniRios Dec 11, 2023
2df11c1
benchmark tests passing
JuaniRios Dec 11, 2023
2b78c68
fmt. real benchmarks run successfully
JuaniRios Dec 11, 2023
d465582
fmt after merge
JuaniRios Dec 12, 2023
1a76ece
save
JuaniRios Dec 12, 2023
aaf9850
fixes
JuaniRios Dec 12, 2023
99f0c87
remove unnecessary time advancement in project creation
JuaniRios Dec 13, 2023
8b21bb2
MVP!
JuaniRios Dec 13, 2023
797c3ed
multiple community projects can be parallelized
JuaniRios Dec 14, 2023
963f027
all async creation functions working
JuaniRios Dec 14, 2023
aad3f8e
bid refund test not passing
JuaniRios Dec 14, 2023
7117d84
fixed
JuaniRios Dec 14, 2023
3607332
projects meeting together at the desired state (they start at differe…
JuaniRios Dec 15, 2023
5ca32f7
save
JuaniRios Dec 18, 2023
acb601b
fixed tests. they were failing due to debug durations not disabled
JuaniRios Dec 18, 2023
441bbed
traits broken :(
JuaniRios Dec 18, 2023
8a525ca
save
JuaniRios Dec 18, 2023
937a97f
conditionally adding genesis config
JuaniRios Jan 3, 2024
59dc6e8
Fixed the externalities issue by using the single threaded tokio runt…
JuaniRios Jan 3, 2024
c48caa5
removed conditional instantiator fields and conditional genesis confi…
JuaniRios Jan 4, 2024
b6f27fb
fixes
JuaniRios Jan 4, 2024
2544d0f
trying to remove Sync and Send traits
JuaniRios Jan 4, 2024
44861bf
trying to have one genesis config
JuaniRios Jan 4, 2024
8d60746
save
JuaniRios Jan 4, 2024
68fb714
save
JuaniRios Jan 4, 2024
574a8ac
save
JuaniRios Jan 4, 2024
dcf41d5
build-spec working but some logic in instantiator is failing bids
JuaniRios Jan 4, 2024
28da8b4
node instantiation confirmed to be working, and a test was written in…
JuaniRios Jan 5, 2024
df4390e
fix: fmt
JuaniRios Jan 8, 2024
a29c351
fix tests
JuaniRios Jan 8, 2024
ada8e8c
Merge remote-tracking branch 'origin/main' into feature/plmc-391-allo…
JuaniRios Jan 8, 2024
b8af2ad
merge fixes
JuaniRios Jan 8, 2024
89b3868
new test
JuaniRios Jan 8, 2024
92eaf58
remove testing-node feature
JuaniRios Jan 9, 2024
405cdf2
remove cargo-expand-visible feature and unused modular genesis_config.rs
JuaniRios Jan 9, 2024
6c8198e
remove unused mut https://github.com/Polimec/polimec-node/pull/130#di…
JuaniRios Jan 9, 2024
f9c3411
remove unused mut https://github.com/Polimec/polimec-node/pull/130#di…
JuaniRios Jan 9, 2024
dcba4f2
TODO added https://github.com/Polimec/polimec-node/pull/130#discussio…
JuaniRios Jan 9, 2024
9149b14
remove unused old genesis builder https://github.com/Polimec/polimec-…
JuaniRios Jan 10, 2024
13e97de
remove else statement https://github.com/Polimec/polimec-node/pull/13…
JuaniRios Jan 10, 2024
c60ad31
remove commented out lines https://github.com/Polimec/polimec-node/pu…
JuaniRios Jan 10, 2024
6775336
remove AccountList and use same pattern as other functions https://gi…
JuaniRios Jan 10, 2024
fba9d69
updated comment on Expendable reason
JuaniRios Jan 10, 2024
68f9e38
fix: could not compile pallet-funding alone due to missing `default =…
JuaniRios Jan 12, 2024
dd83dd9
Merge branch 'main' into feature/plmc-391-allow-parallel-instantiaton…
JuaniRios Jan 15, 2024
1a60a77
fix testnet runtime, bad merge with main
JuaniRios Jan 15, 2024
03e916c
fix import
JuaniRios Jan 15, 2024
b8464c3
add unwrap() to advance_time
JuaniRios Jan 16, 2024
c3f801e
fix imports from Leo's PR comment https://github.com/Polimec/polimec-…
JuaniRios Jan 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 29 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ members = [
"pallets/*",
"integration-tests",
"integration-tests/penpal",
"integration-tests/macros",
"integration-tests/macros/tests",
"traits",
"macros",
"macros/tests",
"polimec-common",
]

resolver = "2"
Expand Down Expand Up @@ -61,16 +61,16 @@ polimec-xcm-executor = { path = "pallets/xcm-executor", default-features = false
polimec-receiver = { path = "pallets/polimec-receiver", default-features = false }

# Internal macros
macros = { path = "integration-tests/macros" }
macros-tests = { path = "integration-tests/macros/tests" }
macros = { path = "macros" }
macros-tests = { path = "macros/tests" }


# External pallets (with default disabled)
orml-oracle = {git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.0.0", default-features = false}
orml-traits = {git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.0.0", default-features = false}
# Internal support (with default disabled)
shared-configuration = { path = "runtimes/shared-configuration", default-features = false }
polimec-traits = { path = "traits", default-features = false }
polimec-common = { path = "polimec-common", default-features = false }

# External support (with default disabled)
substrate-fixed = { git = "https://github.com/encointer/substrate-fixed", default-features = false }
Expand Down
7 changes: 2 additions & 5 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ scale-info = { workspace = true, features = ["derive"] }
# Local
polimec-receiver.workspace = true
macros.workspace = true
polimec-traits.workspace = true

polimec-common.workspace = true
sp-arithmetic.workspace = true
frame-system.workspace = true
frame-support.workspace = true
Expand Down Expand Up @@ -99,7 +98,6 @@ std = [
"penpal-runtime/std",
"polimec-parachain-runtime/std",
"polimec-receiver/std",
"polimec-traits/std",
"polkadot-core-primitives/std",
"polkadot-parachain/std",
"polkadot-primitives/std",
Expand Down Expand Up @@ -140,7 +138,6 @@ runtime-benchmarks = [
"polimec-base-runtime/runtime-benchmarks",
"polimec-parachain-runtime/runtime-benchmarks",
"polimec-receiver/runtime-benchmarks",
"polimec-traits/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks",
Expand Down Expand Up @@ -177,7 +174,7 @@ try-runtime = [
"polimec-base-runtime/try-runtime",
"polimec-parachain-runtime/try-runtime",
"polimec-receiver/try-runtime",
"polimec-traits/try-runtime",
"polimec-common/try-runtime",
"polkadot-runtime-parachains/try-runtime",
"polkadot-runtime/try-runtime",
"polkadot-service/try-runtime",
Expand Down
5 changes: 1 addition & 4 deletions integration-tests/penpal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ smallvec = "1.10.0"

# Local
polimec-receiver.workspace = true
polimec-traits.workspace = true
polimec-common.workspace = true

# Substrate
frame-benchmarking = { workspace = true, optional = true }
Expand Down Expand Up @@ -117,7 +117,6 @@ std = [
"parachain-info/std",
"parachains-common/std",
"polimec-receiver/std",
"polimec-traits/std",
"polkadot-parachain/std",
"polkadot-primitives/std",
"polkadot-runtime-common/std",
Expand Down Expand Up @@ -158,7 +157,6 @@ runtime-benchmarks = [
"pallet-vesting/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"polimec-receiver/runtime-benchmarks",
"polimec-traits/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
Expand Down Expand Up @@ -192,7 +190,6 @@ try-runtime = [
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
"polimec-receiver/try-runtime",
"polimec-traits/try-runtime",
"polkadot-runtime-common/try-runtime",
"polkadot-runtime-parachains/try-runtime",
"sp-runtime/try-runtime",
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/penpal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use frame_system::{
limits::{BlockLength, BlockWeights},
EnsureRoot, EnsureSigned,
};
use polimec_traits::migration_types::MigrationInfo;
use polimec_common::migration_types::MigrationInfo;
use smallvec::smallvec;
use sp_api::impl_runtime_apis;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ pub mod polimec {
.to_vec(),
..Default::default()
},
polimec_funding: Default::default(),
balances: polimec_parachain_runtime::BalancesConfig { balances: funded_accounts },
parachain_info: polimec_parachain_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(),
Expand Down Expand Up @@ -359,6 +358,7 @@ pub mod polimec {
},
technical_committee: Default::default(),
treasury: Default::default(),
polimec_funding: Default::default(),
vesting: Default::default(),
};

Expand Down
2 changes: 0 additions & 2 deletions integration-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

pub mod constants;

#[cfg(all(test, feature = "std", feature = "testing-node"))]
mod tests;

pub use constants::{accounts::*, penpal, polimec, polimec_base, polkadot, statemint};
Expand Down
1 change: 1 addition & 0 deletions integration-tests/src/tests/basic_comms.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use crate::*;

const MAX_REF_TIME: u64 = 300_000_000;
Expand Down
31 changes: 31 additions & 0 deletions integration-tests/src/tests/build_spec.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#[test]
fn build_spec_testing_node() {
JuaniRios marked this conversation as resolved.
Show resolved Hide resolved
// run the polimec-parachain-node compiled with "std" with the build-spec command and --raw flag
// This makes sure our async parallel instantiation of projects is working as intended.
// We need this to test the protocol with the UI.

match std::env::current_dir() {
Ok(path) => {
println!("The current directory is {}", path.display());
},
Err(e) => {
println!("Error getting the current directory: {}", e);
},
}

let output = std::process::Command::new("../target/release/polimec-parachain-node")
.arg("build-spec")
.arg("--chain=polimec-testing")
.arg("--disable-default-bootnode")
.arg("--raw")
.output()
.expect("failed to execute process");

assert_eq!(
output.status.success(),
true,
"Make sure you compile the node with \"std\" and \"fast-gov\" feature enabled before running this test."
);

dbg!(output);
}
Loading