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

Add automation pallets #2

Merged
merged 36 commits into from
Sep 9, 2024
Merged

Add automation pallets #2

merged 36 commits into from
Sep 9, 2024

Conversation

imstar15
Copy link
Member

@imstar15 imstar15 commented Aug 15, 2024

Development

patch polkadot: OK

pallet-valve: compile success
pallet-xcmp-handler: compile success
oak-primitives: compile success
pallet-autmation-time: compile success
runtime-common: compile success

Add orml-asset-registry to runtime: compile success
Add orml-xtokens to runtime: compile success
Add pallet-xcmp-handler to runtime: compile success
Add pallet-autmation-time to runtime: compile success

Remove unused patch: OK

Launch chain with moonwall: OK

Run zombie_tanssi with moonwall

  • Compile rust binaries
    rust version: rustc 1.75.0
cargo build --features=fast-runtime --release
  • Install node and pnpm
sudo npm i -g pnpm
  • Run zombie_tanssi with moonwall
    Typescript tests are run with Moonwall. To run these you will need to have pnpm installed:
# Install moonwall
sudo npm i -g pnpm
pnpm -g i @moonwall/cli

# Create typescript-api local interfaces
cd typescript-api && pnpm i && pnpm create-local-interfaces && cd ..

# Change directory to test
cd test

# Run zombienet tests (with container-chains)
pnpm i
pnpm moonwall run zombie_tanssi
  • Test task extrinsic

https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9949#/explorer

https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9949#/extrinsics/decode/0xce030004903dcb66000000000a00008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a480b0060defb7405

image

Unit Tests

cargo test --features=fast-runtime --release

pallet-xcmp-handler

     Running unittests src/lib.rs (/Users/star/devlab/tanssi/target/release/deps/pallet_xcmp_handler-3aac3cb4dcd5a55c)

running 10 tests
test mock::test_genesis_config_builds ... ok
test mock::__construct_runtime_integrity_test::runtime_integrity_tests ... ok
test tests::get_instruction_set_local_currency_instructions ... ok
test tests::transact_in_target_chain_with_non_reserved_currency_will_throw_unsupported_fee_payment_error ... ok
test tests::get_local_currency_instructions_works ... ok
test tests::pay_xcm_fee_works ... ok
test tests::pay_xcm_fee_keeps_wallet_alive ... ok
test tests::transact_in_local_chain_works ... ok
test tests::transact_in_target_chain_with_to_reserved_currency_works ... ok
test tests::transact_in_target_chain_works ... ok

test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

pallet-automation-time

     Running unittests src/lib.rs (/Users/star/devlab/tanssi/target/release/deps/pallet_automation_time-276347a00b02fd0a)

running 93 tests
test fees::tests::errors_when_not_enough_funds_for_fee ... ok
test fees::tests::does_not_charge_fees_when_prereq_errors ... ok
......
test result: ok. 93 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

github actions:

CI / set-tags (pull_request): Fixed
Enforce PR labels / enforce-noteworthiness-label (pull_request): Fixed
CI / check-copyright (pull_request) : Fixed
Enforce PR labels / enforce-auditability-label (pull_request) : Fixed
CI / Check with rustfmt (pull_request): Fixed
CI / check-copyright (pull_request): Fixed
CI / toml-formatting (pull_request): Fixed
CI / cargo-clippy (pull_request) : Fixed

@imstar15 imstar15 force-pushed the charles-add_automation_pallets branch 4 times, most recently from 77f8529 to e7c2f66 Compare August 23, 2024 12:01
@imstar15 imstar15 force-pushed the charles-add_automation_pallets branch from e7c2f66 to 9f9b8f7 Compare August 23, 2024 14:14
@imstar15 imstar15 force-pushed the charles-add_automation_pallets branch from c67f2b3 to c437244 Compare August 24, 2024 03:02
Copy link
Member

@chrisli30 chrisli30 left a comment

Choose a reason for hiding this comment

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

Looks okay, but the name change comments need to be addressed.

@@ -0,0 +1,42 @@
[package]
name = "oak-primitives"
Copy link
Member

Choose a reason for hiding this comment

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

We don’t use this name oak any more. This needs to be "ava-protocol-primitives".

It always need to be "ava-protocol", but can’t be "ava".

[package]
name = "oak-primitives"
version = "1.0.0"
description = "OAK Runtime primitives"
Copy link
Member

Choose a reason for hiding this comment

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

Replace all "OAK" to "Ava Protocol"

description = "OAK Runtime primitives"
authors = ["OAK Developement Team"]
license = "GPL-3.0"
homepage = "https://oak.tech"
Copy link
Member

Choose a reason for hiding this comment

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

update website

name = "oak-primitives"
version = "1.0.0"
description = "OAK Runtime primitives"
authors = ["OAK Developement Team"]
Copy link
Member

Choose a reason for hiding this comment

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

Ava Protocol Team

authors = ["OAK Developement Team"]
license = "GPL-3.0"
homepage = "https://oak.tech"
repository = 'https://github.com/OAK-Foundation/OAK-blockchain'
Copy link
Member

Choose a reason for hiding this comment

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

repo address is wrong.

@imstar15 imstar15 force-pushed the charles-add_automation_pallets branch from 6bf5457 to 886106d Compare August 29, 2024 14:01
authors = ["Ava Protocol Team"]
license = "GPL-3.0"
homepage = "https://avaprotocol.org"
repository = 'https://github.com/AvaProtocol/OAK-blockchain'
Copy link
Member

Choose a reason for hiding this comment

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

this repo address has changed, not OAK-blockchain any more.

Please examine all other "oak" references.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@imstar15 imstar15 added D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited and removed D1-audited👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited labels Sep 2, 2024
@imstar15 imstar15 force-pushed the charles-add_automation_pallets branch 5 times, most recently from 32f8cb8 to b3f039b Compare September 3, 2024 03:07
@imstar15 imstar15 force-pushed the charles-add_automation_pallets branch 2 times, most recently from 0f47aba to 1d35a6b Compare September 3, 2024 08:55
@imstar15 imstar15 force-pushed the charles-add_automation_pallets branch from 1d35a6b to becd2b5 Compare September 3, 2024 12:03
@imstar15 imstar15 force-pushed the charles-add_automation_pallets branch 3 times, most recently from 5ee7cf7 to 5f2f1f0 Compare September 4, 2024 12:27
@imstar15 imstar15 force-pushed the charles-add_automation_pallets branch 2 times, most recently from d4b2c46 to 66091cf Compare September 7, 2024 07:25
@imstar15 imstar15 force-pushed the charles-add_automation_pallets branch from 66091cf to 0b9dd08 Compare September 7, 2024 07:29
@imstar15 imstar15 requested a review from chrisli30 September 7, 2024 12:58
Copy link
Member

@chrisli30 chrisli30 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@imstar15 imstar15 merged commit 04be81f into dev Sep 9, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B5-clientnoteworthy B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants