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/rebase democracy #965

Merged
merged 95 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from 92 commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
da28bfd
feature: democracy draft
Feb 28, 2023
812d078
fix: basic democracy setup
Feb 28, 2023
1a21e9c
fix: cargo fmt
Feb 28, 2023
8c486c1
feat: setup maintenance manager origin
Feb 28, 2023
8f3d4f9
feat: root or tech comm cna set collators
Feb 28, 2023
92a970c
feat: root or tech commm can set identities
Feb 28, 2023
edb312a
fix: remove democracy benchmarks
Feb 28, 2023
55e3004
fix: pallet-presence
Mar 1, 2023
fa7bc54
fix: externalDefaultOrigin
Mar 2, 2023
bb9db42
fix: all tech comm can suspend/resume xcm
Mar 6, 2023
9d3f0ac
test(governance): first batch
Fahrrader Apr 10, 2023
9196cdc
revert(democracy): launch-config
Fahrrader Apr 10, 2023
e2a187f
refactor(governance): address suggestions
Fahrrader Apr 10, 2023
70505c1
refactor(governance): switch to frame's democracy pallet
Fahrrader Apr 10, 2023
ce5c452
chore: update deps
PraetorP Jul 10, 2023
6e8f16b
chore: fix deps
PraetorP Jul 10, 2023
a194b32
chore: fix xcm mod
PraetorP Jul 10, 2023
506c136
feature(governance): add new associated types from 42 v
PraetorP Jul 10, 2023
6c218f9
feat(governance): add ranked collective
PraetorP Jul 14, 2023
75810de
refactor(governance): split codebase to entities
PraetorP Jul 17, 2023
6b99208
feature(governance): pallets config & refactor
PraetorP Jul 18, 2023
5f999c7
feat(governance): fix tracks and mapping
PraetorP Jul 19, 2023
dcfaf54
feature(governance): tune types for maintenance&xcm
PraetorP Jul 19, 2023
93cf48a
feat(governance): rename pallet name to integrate with apps ui
PraetorP Jul 19, 2023
3c64f14
feature(governance): remove unused origins
PraetorP Jul 20, 2023
c5046d9
feature(governance): rename track
PraetorP Jul 20, 2023
1beb5f0
feature(governance): change rank mapper & democracy track id
PraetorP Jul 20, 2023
49a4b50
feat(governance): configuration impl
PraetorP Jul 20, 2023
632420b
refactor: remove old gov tests, add new test-cases + minor fix
mrshiposha Jul 20, 2023
a9264a9
feature(governance): aded events, config impl, bencmarks
PraetorP Jul 21, 2023
630db14
feature(governance): set correct weight to `set_governance_arg`
PraetorP Jul 21, 2023
8d638ec
refactor(governance): `ClassToRankMapper`
PraetorP Jul 21, 2023
9d771e4
Update runtime/common/config/pallets/governance/types.rs
PraetorP Jul 21, 2023
53b7fac
Update pallets/configuration/src/lib.rs
PraetorP Jul 21, 2023
910b342
Update runtime/common/config/pallets/governance/council_collective.rs
PraetorP Jul 21, 2023
78978f9
Update runtime/common/config/pallets/governance/council_collective.rs
PraetorP Jul 21, 2023
f01ebab
Update runtime/common/config/pallets/governance/council_collective.rs
PraetorP Jul 21, 2023
ebcf8a9
Update runtime/common/config/pallets/governance/technical_committee.rs
PraetorP Jul 21, 2023
6dccf31
Update runtime/common/config/pallets/governance/technical_committee.rs
PraetorP Jul 21, 2023
130ec51
Update runtime/common/config/pallets/governance/technical_committee.rs
PraetorP Jul 21, 2023
4a2b834
refactor(governance): code organization
PraetorP Jul 21, 2023
36490e3
fix: format
PraetorP Jul 21, 2023
730af1d
feature(governance): added new types
PraetorP Jul 21, 2023
2bb1b54
refactor: gov origins, minor fixes
mrshiposha Jul 24, 2023
de6b3ed
chore: regenerate types
mrshiposha Jul 24, 2023
a39ae5e
chore: update Cargo.lock
mrshiposha Jul 24, 2023
d55fded
fix: governance playground fixes
mrshiposha Jul 24, 2023
6be69b5
fix: cargo fmt
mrshiposha Jul 24, 2023
45b64e2
Initialize Council and Technical Committee tests
uandysmith Jul 25, 2023
4e92179
refactor: governance params + test timings
mrshiposha Jul 25, 2023
10a984e
feat(tests): add time-to-block constants
mrshiposha Jul 25, 2023
dff1cf3
refactor(tests): event helpers
mrshiposha Jul 25, 2023
06e4178
feat(tests): add fellowship helpers
mrshiposha Jul 25, 2023
a5cbc53
fix(tests): xcm tests use new event helpers
mrshiposha Jul 25, 2023
c9c017e
test: fellowship basic tests
mrshiposha Jul 25, 2023
477cc74
feat: add fellowship timing MIN_ENACTMENT_PERIOD
mrshiposha Jul 25, 2023
df8de53
refactor(tests): instroduce governance test infrastructure
mrshiposha Jul 25, 2023
ef79a49
fix: cargo fmt
mrshiposha Jul 25, 2023
3d26a07
fix: yarn lint
mrshiposha Jul 25, 2023
0f26085
feat: add moreThanHalfCouncil
mrshiposha Jul 26, 2023
c9ab358
fix: council test
mrshiposha Jul 26, 2023
de73431
test: fellowship
mrshiposha Jul 26, 2023
37f240d
test(council): added impl for 14 cases + helpers + refac
PraetorP Aug 8, 2023
f2ba156
test(council): prime member impl + Closed events parser
PraetorP Aug 9, 2023
1a15bee
test(council): tests + helpers
PraetorP Aug 10, 2023
4632de4
test(goverment): refactor test organization
PraetorP Aug 10, 2023
7af768e
test(governance): comm tests
PraetorP Aug 11, 2023
e59a3a7
fix: quartz test-env feature
mrshiposha Aug 11, 2023
3b810c4
feat: add gov workflow, add describeGov
mrshiposha Aug 11, 2023
29fa70b
test: democracy
mrshiposha Aug 11, 2023
6cc34b0
fix: optimize techcomm imports
mrshiposha Aug 11, 2023
694d333
fix: exclude unique from gov workflow
mrshiposha Aug 11, 2023
3e764be
Update tests/src/governance/council.test.ts
PraetorP Aug 14, 2023
d84de6a
fix(test governance): origin for council members
PraetorP Aug 14, 2023
ea7e0f0
No more state in governance test utils
uandysmith Aug 14, 2023
ede8936
fix typo
uandysmith Aug 14, 2023
312b0e8
fix(test gov): dummy prop impl
PraetorP Aug 14, 2023
9525b83
test(governance): refactor & remove unused
PraetorP Aug 16, 2023
8aa555a
refactor(gobv test): initCouncil
PraetorP Aug 16, 2023
ca4d9ec
chore(governance): after rebase fixes
PraetorP Aug 17, 2023
c6149d6
fix: fmt
PraetorP Aug 17, 2023
75f11ab
fix: fmt & types
PraetorP Aug 17, 2023
e652470
chore: polkadot types
PraetorP Aug 17, 2023
1249da3
chore(gov): fix gov workflow
PraetorP Aug 17, 2023
e741bc9
change api port to rpc for 0.9.43 polkadot
BuddyGlas Aug 17, 2023
3a8397a
test(gov): fix waiter for block
PraetorP Aug 18, 2023
e32efd6
test(gov): fix waiter for block
PraetorP Aug 18, 2023
96c5bed
Update runtime/common/config/pallets/governance/fellowship.rs
PraetorP Aug 18, 2023
a243f3a
add var wasm_name for goverments workflow for running sapphire
BuddyGlas Aug 18, 2023
9025c94
fix(runtime): spces -> tabs
PraetorP Aug 18, 2023
55ebfc9
add var wasm_name for goverments workflow for running sapphire
BuddyGlas Aug 18, 2023
45b1780
refactor(governance):
PraetorP Aug 21, 2023
83dea11
refactor(governacne): nitpicks
PraetorP Aug 22, 2023
104c845
refactor(governance):construct runtime.
PraetorP Aug 22, 2023
acdf6a4
fix(gov): added `origins` to pallets list
PraetorP Aug 23, 2023
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
24 changes: 24 additions & 0 deletions .docker/docker-compose.gov.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "3.5"

services:
node-dev:
build:
args:
- "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
- "NETWORK={{ NETWORK }}"
- "WASM_NAME={{ WASM_NAME }}"
context: ../
dockerfile: .docker/Dockerfile-chain-dev
image: node-dev
container_name: node-dev
expose:
- 9944
- 9933
ports:
- 127.0.0.1:9944:9944
- 127.0.0.1:9933:9933
logging:
options:
max-size: "1m"
max-file: "3"
command: cargo run --release --features={{ NETWORK }}-runtime,{{ WASM_NAME }}-runtime/test-env -- --dev -linfo --rpc-cors=all --unsafe-rpc-external
7 changes: 6 additions & 1 deletion .github/workflows/ci-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ jobs:
uses: ./.github/workflows/node-only-update.yml
secrets: inherit

gov:
if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-gov')) }} # Conditional check for draft & labels per job.
uses: ./.github/workflows/gov.yml
secrets: inherit # pass all secrets from initial workflow to nested

codestyle:
if: github.event.pull_request.draft == false # Conditional check for draft per job.
uses: ./.github/workflows/codestyle.yml
secrets: inherit
secrets: inherit
123 changes: 123 additions & 0 deletions .github/workflows/gov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Governance tests in --dev mode with test-env feature enabled to reduce gov timings
name: governance tests

# Triger: only call from main workflow(re-usable workflows)
on:
workflow_call:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

prepare-execution-marix:

name: Prepare execution matrix

runs-on: self-hosted-ci
outputs:
matrix: ${{ steps.create_matrix.outputs.matrix }}

steps:
- name: Clean Workspace
uses: AutoModality/action-clean@v1.1.0

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit

- name: Read .env file
uses: xom9ikk/dotenv@v2

- name: Create Execution matrix
uses: CertainLach/create-matrix-action@v4
id: create_matrix
with:
# TODO: Remove state-version-0 after mainnet upgrade
CertainLach marked this conversation as resolved.
Show resolved Hide resolved
matrix: |
network {quartz}, wasm_name {quartz}
network {opal}, wasm_name {opal}
network {sapphire}, wasm_name {quartz}

dev_build_int_tests:

needs: prepare-execution-marix
# The type of runner that the job will run on
runs-on: [self-hosted-ci,medium]
timeout-minutes: 1380

name: ${{ matrix.network }}
strategy:
matrix:
include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}

continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.

steps:
- name: Clean Workspace
uses: AutoModality/action-clean@v1.1.0

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit

- name: Read .env file
uses: xom9ikk/dotenv@v2

- name: Generate ENV related extend file for docker-compose
uses: cuchi/jinja2-action@v1.2.0
with:
template: .docker/docker-compose.gov.j2
output_file: .docker/docker-compose.${{ matrix.network }}.yml
variables: |
RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
NETWORK=${{ matrix.network }}
WASM_NAME=${{ matrix.wasm_name }}


- name: Show build configuration
run: cat .docker/docker-compose.${{ matrix.network }}.yml

- name: Build the stack
run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans

- uses: actions/setup-node@v3.5.1
with:
node-version: 16

- name: Run tests
working-directory: tests
run: |
yarn install
yarn add mochawesome
./scripts/wait_for_first_block.sh
echo "Ready to start tests"
yarn polkadot-types
NOW=$(date +%s) && yarn testGovernance --reporter mochawesome --reporter-options reportFilename=test-${NOW}
env:
RPC_URL: http://127.0.0.1:9944/

- name: Test Report
uses: phoenix-actions/test-reporting@v10
id: test-report
if: success() || failure() # run this step even if previous step failed
with:
name: int test results - ${{ matrix.network }} # Name of the check run which will be created
path: tests/mochawesome-report/test-*.json # Path to test results
reporter: mochawesome-json
fail-on-error: 'false'

- name: Read output variables
run: |
echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"

- name: Stop running containers
if: always() # run this step always
run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down

- name: Remove builder cache
if: always() # run this step always
run: |
docker builder prune -f -a
docker system prune -f
docker image prune -f -a
Loading
Loading