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

chore!: Stabilize lazy-pages feature #3123

Merged
merged 35 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6abe653
Remove "lazy-pages" feature
ark0f Aug 21, 2023
03b6187
Make `enable_lazy_pages` non-conditional
ark0f Aug 21, 2023
8f206dd
Inline `get_and_track_memory_pages`
ark0f Aug 21, 2023
365e78b
Remove memory pages argument from `core_processor::process`
ark0f Aug 21, 2023
d6f233d
Cleanup errors in executor.rs
ark0f Aug 21, 2023
069ba8f
Remove `Ext::LAZY_PAGES_ENABLED`
ark0f Aug 21, 2023
dca7ddb
Remove `lazy-pages` feature in scripts
ark0f Aug 21, 2023
c6269aa
Merge remote-tracking branch 'origin/master' into al-non-lazy-removal
ark0f Aug 21, 2023
1383237
Inline `into_ext_info_inner`
ark0f Aug 22, 2023
0f268ae
Move `lazy_pages_*` functions into `Ext`
ark0f Aug 22, 2023
38d1daa
Remove unused imports
ark0f Aug 22, 2023
8b1446f
Inline `alloc_inner`
ark0f Aug 22, 2023
abcd364
Remove `LazyPagesExt`
ark0f Aug 22, 2023
fa308ea
Return `NoopGrowHandler` back
ark0f Aug 22, 2023
6553e9e
Remove useless log
ark0f Aug 22, 2023
be6a822
Shorten build command
ark0f Aug 22, 2023
aaa107a
Merge remote-tracking branch 'origin/master' into al-non-lazy-removal
ark0f Aug 22, 2023
af227d3
Fix features in Cargo.toml
ark0f Aug 22, 2023
683d3e6
Add `lazy-pages` support in `gtest`
ark0f Aug 23, 2023
ba175fc
Fix memory dump loading and `read_state`
ark0f Aug 23, 2023
49eb153
Merge remote-tracking branch 'origin/master' into al-non-lazy-removal
ark0f Aug 23, 2023
ca622ce
Add `lazy-pages` support in `gcli::Meta`
ark0f Aug 24, 2023
237b063
Merge remote-tracking branch 'origin/master' into al-non-lazy-removal
ark0f Aug 24, 2023
9d0aeb2
Merge remote-tracking branch 'origin/master' into al-non-lazy-removal
ark0f Aug 25, 2023
bbd8abe
Fix `pallets/gear/Cargo.toml`
ark0f Aug 25, 2023
60c31a2
Merge `origin/master`
ark0f Sep 4, 2023
902796c
Merge remote-tracking branch 'origin/master' into al-non-lazy-removal
ark0f Sep 5, 2023
8f8d1b9
Define types explicitly
ark0f Sep 5, 2023
cc26b6c
Move trace log
ark0f Sep 5, 2023
bbb7c92
Fix wasm-gen test
ark0f Sep 5, 2023
1e2fb7e
Merge remote-tracking branch 'origin/master' into al-non-lazy-removal
ark0f Sep 11, 2023
1259fb6
Fix post-merge mess
ark0f Sep 11, 2023
d242af3
Move `alloc` property test into core
ark0f Sep 11, 2023
edaab28
Merge remote-tracking branch 'origin/master' into al-non-lazy-removal
ark0f Sep 15, 2023
d55bfd6
Fix review marks
ark0f Sep 18, 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
1 change: 0 additions & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ jobs:
-p "pallet-*"
-p gear-lazy-pages
-p gear-runtime-interface
--features=lazy-pages
--release

upload:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,11 @@ jobs:
run: curl -LsSf https://get.nexte.st/latest/mac | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin

- name: "Build: Node"
run: >-
cargo build
-p gear-cli --features=lazy-pages
run: cargo build -p gear-cli

- name: "Test: Lazy pages"
ark0f marked this conversation as resolved.
Show resolved Hide resolved
run: >-
cargo nextest run
-p "pallet-*"
-p gear-lazy-pages
-p gear-runtime-interface
--features=lazy-pages
6 changes: 1 addition & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,8 @@ jobs:
- name: "Check: Vara runtime imports"
run: ./target/release/wasm-proc --check-runtime-imports target/release/wbuild/vara-runtime/vara_runtime.compact.wasm

- name: "Test: Gear pallet tests with lazy pages"
run: ./scripts/gear.sh test pallet --features lazy-pages --release --locked

- name: "Test: Gear workspace"
run: ./scripts/gear.sh test gear --exclude gclient --exclude gcli --exclude gsdk --features pallet-gear-debug/lazy-pages --release --locked
run: ./scripts/gear.sh test gear --exclude gclient --exclude gcli --exclude gsdk --release --locked

- name: "Test: gsdk tests"
run: ./scripts/gear.sh test gsdk --release
Expand Down Expand Up @@ -252,7 +249,6 @@ jobs:
-p "pallet-*"
-p gear-lazy-pages
-p gear-runtime-interface
--features=lazy-pages
--release
env:
CARGO_BUILD_TARGET: x86_64-pc-windows-msvc
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-measurements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ jobs:
tar -xf /cache/check_cargo_registry_${{ github.ref_name }}.tar -C /

- name: "Build: Gear"
run: ./scripts/gear.sh build gear --release --locked --features=dev,runtime-benchmarks,lazy-pages
run: ./scripts/gear.sh build gear --release --locked --features=dev,runtime-benchmarks

- name: "Collect: Gear workspace tests"
run: |
mkdir -p ./target/analysis/tests/
mkdir -p ./target/analysis/output/
for i in `seq 1 $COUNT`; do echo $i; ./scripts/gear.sh test gear --exclude gclient --exclude gcli --features pallet-gear-debug/lazy-pages --release -j1 > ./target/analysis/output/$i 2>&1 ; mv ./target/nextest/ci/junit.xml ./target/analysis/tests/$i; done
for i in `seq 1 $COUNT`; do echo $i; ./scripts/gear.sh test gear --exclude gclient --exclude gcli --release -j1 > ./target/analysis/output/$i 2>&1 ; mv ./target/nextest/ci/junit.xml ./target/analysis/tests/$i; done
./target/release/regression-analysis collect-data --data-folder-path ./target/analysis/tests/ --output-path ./target/pallet-tests.json

- name: "Generate report: Gear workspace tests"
Expand Down
8 changes: 7 additions & 1 deletion Cargo.lock

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

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ node-release:

.PHONY: vara
vara:
@ ./scripts/gear.sh build node --no-default-features --features=vara-native,lazy-pages
@ ./scripts/gear.sh build node --no-default-features --features=vara-native

.PHONY: vara-release
vara-release:
@ ./scripts/gear.sh build node --release --no-default-features --features=vara-native,lazy-pages
@ ./scripts/gear.sh build node --release --no-default-features --features=vara-native

.PHONY: gear-replay
gear-replay:
Expand Down Expand Up @@ -197,13 +197,13 @@ test-doc:
test-gear: #\
We use lazy-pages feature for pallet-gear-debug due to cargo building issue \
and fact that pallet-gear default is lazy-pages.
@ ./scripts/gear.sh test gear --exclude gclient --exclude gcli --exclude gsdk --features pallet-gear-debug/lazy-pages
@ ./scripts/gear.sh test gear --exclude gclient --exclude gcli --exclude gsdk

.PHONY: test-gear-release
test-gear-release: # \
We use lazy-pages feature for pallet-gear-debug due to cargo building issue \
and fact that pallet-gear default is lazy-pages.
@ ./scripts/gear.sh test gear --release --exclude gclient --exclude gcli --exclude gsdk --features pallet-gear-debug/lazy-pages
@ ./scripts/gear.sh test gear --release --exclude gclient --exclude gcli --exclude gsdk

.PHONY: test-gsdk
test-gsdk: node-release
Expand Down
6 changes: 4 additions & 2 deletions core-processor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ gear-core.workspace = true
gear-core-errors = { workspace = true, features = ["codec"] }
gear-backend-common.workspace = true
gear-wasm-instrument.workspace = true
gear-lazy-pages-common.workspace = true
ark0f marked this conversation as resolved.
Show resolved Hide resolved

scale-info = { workspace = true, features = ["derive"] }
log.workspace = true
Expand All @@ -23,10 +24,11 @@ static_assertions.workspace = true
actor-system-error.workspace = true

[dev-dependencies]
proptest.workspace = true
env_logger.workspace = true
enum-iterator.workspace = true

[features]
default = ["std"]
std = ["gear-lazy-pages-common/std"]
strict = []
mock = []
mock = []
2 changes: 0 additions & 2 deletions core-processor/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,6 @@ pub struct WasmExecutionContext {
pub gas_reserver: GasReserver,
/// Program to be executed.
pub program: Program,
/// Memory pages with initial data.
pub pages_initial_data: BTreeMap<GearPage, PageBuf>,
/// Size of the memory block.
pub memory_size: WasmPage,
}
Expand Down
Loading