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

New Asset System - Prepare merge into main #1292

Merged
merged 113 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
3d48313
Merge release v0.4.2 (#1174)
sea212 Nov 6, 2023
9eeae56
Remove migrations (#1180)
maltekliemann Nov 6, 2023
186a8ab
Filter admin functions for main-net (#1190)
Chralt98 Nov 13, 2023
9333393
Add debug assertions for slashes and reserves (#1188)
Chralt98 Nov 13, 2023
30beab9
Add some verify checks to court (#1187)
Chralt98 Nov 13, 2023
258d163
Bypass battery stations contracts call filter for court, parimutuel, …
Chralt98 Nov 13, 2023
d570b44
Fix failing court benchmark (#1191)
Chralt98 Nov 21, 2023
fd3e547
Implement trusted market close (#1184)
Chralt98 Nov 21, 2023
1cc3803
Modify court events for indexer (#1182)
Chralt98 Nov 21, 2023
fb53170
Ensure MinBetSize after fee (#1193)
Chralt98 Nov 30, 2023
53b0f64
Replace fixed math operations with traited versions (#1149)
maltekliemann Dec 12, 2023
8790095
Add env_logger and add force-debug feature (#1205)
Chralt98 Dec 12, 2023
6c2e9f7
Inflate defensively (#1195)
Chralt98 Dec 12, 2023
6ee0368
Maintain order book (#1183)
Chralt98 Dec 12, 2023
db4a485
Implement AMM 2.0 (#1173)
maltekliemann Dec 20, 2023
d26dc8c
Implement Liquidity Tree (#1178)
maltekliemann Dec 21, 2023
71c8464
Improve XCM fee handling (#1225)
sea212 Jan 5, 2024
3761f96
Remove court and global disputes from call filter for the main-net (#…
Chralt98 Jan 8, 2024
9e1cc2c
Sunset old AMMs and their pools (#1197)
maltekliemann Jan 8, 2024
b96446b
Merge release v0.4.3 (#1211)
sea212 Jan 8, 2024
cb6a053
Reduce `market_status_manager` aka `on_initialize` iterations (#1160)
Chralt98 Jan 11, 2024
a5f4b39
Update style guide to streamline reviews (#1228)
maltekliemann Jan 12, 2024
e10b9c9
Reduce benchmark runs of Zeitgeist pallets (#1233)
sea212 Jan 16, 2024
b5e0d4e
Set inflation to more than zero for a full benchmark of handle_inflat…
Chralt98 Jan 16, 2024
ca684ac
Implement `force_pool_exit` and disable other zrml-swaps functions (#…
maltekliemann Jan 18, 2024
1918416
Implement and test `bmul_bdiv_*`; use in zrml-orderbook and zrml-pari…
maltekliemann Jan 22, 2024
c8604f9
Utilize Merigify's Merge Queue (#1243)
sea212 Jan 22, 2024
bb0eab6
Set in-progress when needed and rerun CI in merge queue (#1244)
sea212 Jan 22, 2024
0cab1fa
Avoid mergify dequeue (#1245)
sea212 Jan 23, 2024
dcbb006
Extend neo-swaps tests and clean up `math.rs` (#1238)
maltekliemann Jan 23, 2024
e1ff1e1
Remove migrations and dead code (#1241)
maltekliemann Jan 23, 2024
761cc59
Reorganize prediction-market tests (#1242)
maltekliemann Jan 23, 2024
8ee0d1a
Improve fee payment management (#1246)
sea212 Jan 24, 2024
f755cc1
Fix Rust and Discord badge (#1247)
sea212 Jan 24, 2024
235f341
Fix neo-swaps doc strings (#1250)
maltekliemann Feb 9, 2024
20358a9
Adjust style guide (loops) and add unreachable macro (#1252)
sea212 Feb 9, 2024
3b486c8
Merge Old* and New* asset variants
sea212 Feb 13, 2024
cf2f1f4
Partially integrate lazy migration routing
sea212 Feb 13, 2024
79487b9
Integrate lazy migration routing
sea212 Feb 14, 2024
0268004
Fix ExistentialDeposit mapping & Satisfy Clippy
sea212 Feb 14, 2024
9af819d
Merge main
sea212 Feb 15, 2024
f793cf3
Integrate Moonwall (#1192)
Chralt98 Feb 15, 2024
be75fa9
Use `Balance` instead of `u128` as type for Balancer weights (#1251)
maltekliemann Feb 15, 2024
45f42b8
Remove primitives/macros
sea212 Feb 15, 2024
8115543
Filter certain asset destroy calls (they're managed)
sea212 Feb 15, 2024
b7e75e6
Remove unchecked modulo operations from production (#1254)
maltekliemann Feb 19, 2024
934bf0f
Refactor swaps (#1255)
maltekliemann Feb 20, 2024
f75e83b
Integrate asset destruction into prediction markets
sea212 Feb 20, 2024
92e20f9
Add BaseAssetClass
sea212 Feb 20, 2024
d1b53a1
Update prediction-markets & market-commons
sea212 Feb 20, 2024
60ce949
Update authorized
sea212 Feb 20, 2024
f215128
Update liquidity-mining
sea212 Feb 20, 2024
d23da95
Update simple-disputes
sea212 Feb 20, 2024
de0cda4
Update parimutuels (wip)
sea212 Feb 21, 2024
eb2621a
Merge release v0.5.0 into main (#1262)
sea212 Feb 22, 2024
048ceca
Move functions into market struct and properly delete assets
sea212 Feb 22, 2024
ec04212
Add ParimutuelAssetClass
sea212 Feb 22, 2024
44cdd8e
Add parimutuel.rs
sea212 Feb 22, 2024
525d451
Merge branch 'sea212-new-asset-system' into sea212-new-asset-system-p…
sea212 Feb 22, 2024
9986c09
Remove duplicate code
sea212 Feb 22, 2024
9f403ac
Adjust asset type and managed destroy after refund in parimutuels
sea212 Feb 23, 2024
b2c3fcb
Add MarketTransitionApi
sea212 Feb 23, 2024
15b5239
Add MarketTransitionApi
sea212 Feb 23, 2024
faee7ef
Implement MarketTransitionApi for Parimutuels
sea212 Feb 23, 2024
8bd8fa5
Only run copyright CI when merging into `main` (#1263)
maltekliemann Feb 24, 2024
5d88474
Bring README up to date (#1264)
maltekliemann Feb 26, 2024
40b3c02
Update proxy types (#1259)
maltekliemann Feb 26, 2024
ff3b5f1
Update toolchain to fix codecov and fuzz errors (#1269)
maltekliemann Feb 29, 2024
c102f66
Use GitHub action to free up space (#1271)
maltekliemann Feb 29, 2024
3131130
Remove unused dependencies (#1270)
maltekliemann Feb 29, 2024
22992bc
License checker: Replace incorrect `push` with `append` (#1268)
maltekliemann Feb 29, 2024
239b086
Partially implement asset creation/destruction in parimutuels
sea212 Mar 4, 2024
0e53eaa
Add all asset creation / destruction tests to parimutuels
sea212 Mar 4, 2024
53533a0
Adjust Court
sea212 Mar 5, 2024
ee6f2b5
Update global-disputes
sea212 Mar 5, 2024
9f5b610
Update swaps
sea212 Mar 5, 2024
9f782fd
Update neo-swaps
sea212 Mar 5, 2024
090c1f5
Integrate OnStateTransition hooks into prediction-markets
sea212 Mar 6, 2024
a2a60df
Use proper state transition weights
sea212 Mar 6, 2024
73b576f
Make cargo check succeed
sea212 Mar 6, 2024
7d3afb2
Partially update orderbook
sea212 Mar 6, 2024
fa0a83b
Update orderbook
sea212 Mar 6, 2024
d274ef6
Update orderbook
sea212 Mar 6, 2024
22efb24
Finalize orderbook update
sea212 Mar 7, 2024
419e258
Improve style
sea212 Mar 7, 2024
351329f
Add XcmAssetClass
sea212 Mar 7, 2024
23818ea
Add sub asset classes, extend Market, provide market transition trait
sea212 Mar 7, 2024
d572a64
Update asset-router
sea212 Mar 7, 2024
3cbb370
Integrate asset system into prediction-market, market-commons and par…
sea212 Mar 7, 2024
a1c1013
Implement support for non-reservable assets in orderbook
sea212 Mar 7, 2024
ed11a33
Update Codeowners (#1286)
sea212 Mar 11, 2024
b139db7
Integrate new asset system into Battery Station XCM
sea212 Mar 13, 2024
9d0154c
Integrate new asset system into Zeitgeist XCM
sea212 Mar 13, 2024
dba98ef
Implement Unbalanced for asset-router
sea212 Mar 19, 2024
29f9940
Enable fee payment for campaign assets
sea212 Mar 19, 2024
5d3909a
Fix conditional import
sea212 Mar 19, 2024
5b8eef1
Merge branch 'sea212-new-asset-system' into sea212-new-asset-system-p…
sea212 Mar 22, 2024
602ab96
Merge branch 'sea212-new-asset-system' into sea212-new-asset-system-p…
sea212 Mar 22, 2024
63cabdd
Format
sea212 Mar 22, 2024
e8cbf41
Fix unfillable / unremovable order bug
sea212 Mar 23, 2024
fbf7a20
Merge branch 'sea212-new-asset-system-part-7c' into sea212-new-asset-…
sea212 Mar 24, 2024
915e446
Merge branch 'sea212-new-asset-system-part-8' into sea212-new-asset-s…
sea212 Mar 24, 2024
3f898f0
Merge branch 'sea212-new-asset-system' into sea212-new-asset-system-p…
sea212 Mar 26, 2024
656d019
Add tests for Unbalanced impl
sea212 Mar 27, 2024
9c1c783
Implement fee charging tests
sea212 Mar 27, 2024
c6cc52f
Undo unnecessray change
sea212 Mar 27, 2024
30e0cea
Undo last commit
sea212 Mar 27, 2024
4d3519c
Add previous stake information after rejoin (#1285)
Chralt98 Mar 27, 2024
482a634
Merge branch 'main' into sea212-new-asset-system-part-10
sea212 Mar 27, 2024
440de9c
Update asset-router readme
sea212 Mar 28, 2024
29409f9
Extended changelog for devs
sea212 Mar 28, 2024
41fd052
Remove deprecated ExistentialDeposits type
sea212 Mar 28, 2024
537fcd5
Merge branch 'sea212-new-asset-system' into sea212-new-asset-system-p…
sea212 Apr 2, 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
34 changes: 34 additions & 0 deletions .github/workflows/copyright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Copyright

on:
pull_request:
types: [ labeled ]
branches: [ main ]
push:
branches: [ main ]

jobs:
copyright:
name: Copyright Notices
if: |
github.event_name == 'pull_request' &&
(contains(github.event.pull_request.labels.*.name, 's:review-needed') ||
contains(github.event.pull_request.labels.*.name, 's:accepted')) ||
github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
- name: Install check-license and dependencies
run: |
pip install scripts/check-license
pip install -r scripts/check-license/requirements.txt
- name: Query files changed
id: files_changed
uses: Ana06/[email protected]
with:
filter: '*.rs$'
- name: Check copyright notices
run: check-license ${{ steps.files_changed.outputs.added_modified }}
23 changes: 7 additions & 16 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Free up disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false

- name: Install rust toolchain
run: rustup show

- uses: actions-rs/[email protected]
with:
crate: grcov
use-tool-cache: true

# No disk space: https://github.com/zeitgeistpm/zeitgeist/actions/runs/5085081984/jobs/9144298675?pr=1006
# Workaround: https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
- name: Free up disk space on GitHub hosted runners
run: |
# Ensure context is GitHub hosted runner
# https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
if [[ "${{ runner.name }}" == "GitHub Actions"* ]]; then
echo "Freeing up space in GitHub hosted runner"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
fi
use-tool-cache: false

- name: Cache Dependencies
uses: Swatinem/rust-cache@v1
Expand All @@ -58,4 +49,4 @@ jobs:
fail_ci_if_error: true
flags: tests
verbose: true
name: unit-tests
name: unit-tests
269 changes: 269 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
name: Integration Tests

on:
push:
tags:
- '^v[0-9]+.[0-9]+.[0-9]+(-rc[0-9]+)?$'

env:
CARGO_TERM_COLOR: always

jobs:
build_parachain:
name: Build Parachain
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

- name: Build Parachain
run: cargo build --release --features parachain

- name: Save runtime wasm
run: |
mkdir -p runtimes
cp target/release/wbuild/battery-station-runtime/battery_station_runtime.compact.compressed.wasm runtimes/;
cp target/release/wbuild/zeitgeist-runtime/zeitgeist_runtime.compact.compressed.wasm runtimes/;
- name: Upload runtimes
uses: actions/[email protected]
with:
name: runtimes
path: runtimes

- name: Save zeitgeist binary
run: |
mkdir -p binaries
cp target/release/zeitgeist binaries/;
- name: Upload binary
uses: actions/[email protected]
with:
name: binaries
path: binaries

zombienet_zndsl:
name: ZNDSL Tests
runs-on: ubuntu-20.04
needs: ["build_parachain"]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "./integration-tests/pnpm-lock.yaml"

- name: Install pnpm packages
run: |
cd integration-tests
pnpm install
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Create local folders
run: |
mkdir -p target/release/wbuild/zeitgeist-runtime/
mkdir -p integration-tests/tmp
- name: Download runtime
uses: actions/[email protected]
with:
name: runtimes
path: target/release/wbuild/zeitgeist-runtime/

- name: Download binary
uses: actions/[email protected]
with:
name: binaries
path: target/release

- name: Display structure of downloaded files
run: ls -R
working-directory: target/

- name: Run ZNDSL integration tests
run: |
chmod uog+x target/release/zeitgeist
cd integration-tests
./scripts/download-polkadot.sh
./scripts/deploy-zombienet.sh --no-build --test
zombienet_zeitgeist_upgrade:
name: Zeitgeist Zombienet Post-Upgrade Tests
runs-on: ubuntu-20.04
needs: ["build_parachain"]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "./integration-tests/pnpm-lock.yaml"

- name: Install pnpm packages
run: |
cd integration-tests
pnpm install
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Create local folders
run: |
mkdir -p target/release/wbuild/zeitgeist-runtime/
mkdir -p integration-tests/tmp
- name: Download runtime
uses: actions/[email protected]
with:
name: runtimes
path: target/release/wbuild/zeitgeist-runtime/

- name: Download binary
uses: actions/[email protected]
with:
name: binaries
path: target/release

- name: Display structure of downloaded files
run: ls -R
working-directory: target/

- name: Test zeitgeist runtime upgrade using Zombienet
run: |
chmod uog+x target/release/zeitgeist
cd integration-tests
pnpm exec moonwall test zombienet_zeitgeist_upgrade
chopsticks_battery_station_upgrade:
name: Battery Station Chopsticks Post-Upgrade Tests
runs-on: ubuntu-20.04
needs: ["build_parachain"]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "./integration-tests/pnpm-lock.yaml"

- name: Install pnpm packages
run: |
cd integration-tests
pnpm install
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Create local folders
run: |
mkdir -p target/release/wbuild/battery-station-runtime/
mkdir -p integration-tests/tmp/node_logs
- name: Download runtime
uses: actions/[email protected]
with:
name: runtimes
path: target/release/wbuild/battery-station-runtime/

- name: Display structure of downloaded files
run: ls -R
working-directory: target/

- name: Battery Station post-upgrade tests using Chopsticks
run: |
cd integration-tests
pnpm exec moonwall test chopsticks_battery_station_upgrade
- name: Show chopsticks logs
if: ${{ failure() }}
run: |
cd integration-tests
ls -R tmp/node_logs/
cat tmp/node_logs/*.log | tail -n 1000
chopsticks_zeitgeist_upgrade:
name: Zeitgeist Chopsticks Post-Upgrade Tests
runs-on: ubuntu-20.04
needs: ["build_parachain"]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "./integration-tests/pnpm-lock.yaml"

- name: Install pnpm packages
run: |
cd integration-tests
pnpm install
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Create local folders
run: |
mkdir -p target/release/wbuild/zeitgeist-runtime/
mkdir -p integration-tests/tmp/node_logs
- name: "Download runtime"
uses: actions/[email protected]
with:
name: runtimes
path: target/release/wbuild/zeitgeist-runtime/

- name: Display structure of downloaded files
run: ls -R
working-directory: target/

- name: Zeitgeist post-upgrade tests using Chopsticks
run: |
cd integration-tests
pnpm exec moonwall test chopsticks_zeitgeist_upgrade
- name: Show chopsticks logs
if: ${{ failure() }}
run: |
cd integration-tests
ls -R tmp/node_logs/
cat tmp/node_logs/*.log | tail -n 1000
5 changes: 5 additions & 0 deletions .github/workflows/migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ jobs:
- name: Install build tools
run: ./scripts/init.sh

- name: Free up disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true

- run: ./scripts/runtime-upgrade/test_runtime_upgrade.sh ${{ github.event.inputs.block }}
Loading
Loading