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/optimize size #151

Merged
merged 3 commits into from
Jan 24, 2024
Merged

Chore/optimize size #151

merged 3 commits into from
Jan 24, 2024

Conversation

lrazovic
Copy link
Member

@lrazovic lrazovic commented Jan 24, 2024

In this PR, we've made the following updates:

As a result of these changes, we've observed the following improvements in outputs:

  • The size of the binary has been reduced from 184,670,960 to 170,643,520 bytes, resulting in a reduction of approximately 7.60%.
  • The size of the compressed .wasm file has decreased from 997.19 kB to 970.84 kB, amounting to a reduction of approximately 2.64%.

@lrazovic lrazovic self-assigned this Jan 24, 2024
Copy link
Contributor

@JuaniRios JuaniRios left a comment

Choose a reason for hiding this comment

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

lgtm

@lrazovic lrazovic merged commit 68ea0b3 into main Jan 24, 2024
@lrazovic lrazovic deleted the chore/optimize-size branch January 24, 2024 10:48
vstam1 added a commit that referenced this pull request Jan 30, 2024
move to holds and freezes for election pallet

fix test

add pallets to base

add democracy pallet

set correct Governance config items

remove migrations

add test + default fast-gov

change fast-gov to fast-mode

add instant-mode

add gov tests

fmt

license changes + readme mentions

updated config items

Feat/enable staking (#143)

* chore: add the bootnodes to the production chain-spec

* chore: bump the CLI version

* feat: update Dockerfile

* feat: enable staking and disable normal vesting

* Update Dockerfile to copy polimec-raw-chain-spec.json to /data directory

Feature/plmc 350 setup offchain worker for price injection with first usdxusd (#118)

* basic setup for kraken fetcher

* add crypto to offchain worker

* add membership

* check for membership

* add multiple sources

* add full flow + first test

* add coinbase source

* address feedback + fix warnings

* fmt

* add ocw pallet to base runtime

* remove oracle from base

* add ocw pallet to test runtime

* wip

* wip

* chore: Update dependencies in Cargo.toml

* fix runtime

* node builds

* test in zombienet

* ignore bin

* fmt

* update calculations

* add ocw to base runtime and fix try-runtime feature prop

* requested changes

* fmt

---------

Co-authored-by: Leonardo Razovic <4128940+lrazovic@users.noreply.github.com>

Feature/plmc 391 allow parallel instantiaton of projects (#130)

* feat(287): parachain information discovery and channel opening

automatic hrmp connection working

Genesis instantiator usage and first draft of HRMP connection

formatting

feature propagation

cleanup

new node functioning. genesis not yet sure if working

new node functioning. genesis not yet sure if working

somehow compiling and test passing

save

save

save

feat(287): para_id setting extrinsic implemented and tested

save

same log crate across workspace

same log crate across workspace

save

save

save

feat(287): changed tight couple of pallet_xcm by extracting sender trait

feat(287): first commit

feat(285): POC Hrmp automatic acceptance

* first commit

* save

* penpal local fork

* save

* save

* save

* HRMP establishment successfully mocked!

* pallet-funding tests fixed

* migration check working

* fixes

* add cargo lock

* dmp fix

* formatting

* small fixed

* fixes

* save

* compiling, unit converion to map

* revert staking changes

* saving now evaluation reward and move to u64 for migration

* save

* save

* migration is successfully sent and reflected in the system

* vesting scheduling working in polimec-receiver

* save: starting to implement transact response, but we need to store a new map of query id -> unconfirmed transactions

* save

* Migration for a single user working fully and tested

* Everything works!

* pallet_funding test broken currently

* bug found in evaluation unbonding by cleaner. Still an infinite loop bug remaining

* all bugs squashed B)

* need to find a way to generate function from a new macro

* need to find a way to generate function from a new macro

* e2e tests successfully adapted to the xcm emulator

* Testnet now using Oracle, and e2e successfully passing.

* not all xcmp messages being received

* save

* cleanup

* fmt

* fixes

* save

* limiting 5 migrations per block works

* fmt

* save

* back to normal migration without bundling per block, now works for some reason

* final commit

* first commit

* ct migration tests refactor

* stable

* using generate_accounts! macro in all integration tests

* wip

* big refactor

* almost there

* working

* final changes

* tests passing

* multiple projects test passing.
Big bug found with ever-increasing running times
Failing test for release of ct deposit on failed project

* state machine intergration for releasing deposit

* starting to fix last tests

* only evaluation automatic release working.
`bids_and_community_and_remainder_contribution_plmc_bonded_is_returned_automatically_on_funding_fail` failing because of this

* state machine fixed where it only worked on evaluations

* broken tests

* save

* manual and automatic ct mint tests now passing. Removed the specific ones for just bids/evals/contr. and merged them all into 1 for manual and one for automatic

* fixed most tests. Bid calculation function not working as intended now

* benchmark tests passing

* fmt. real benchmarks run successfully

* save

* fixes

* remove unnecessary time advancement in project creation

* MVP!

* multiple community projects can be parallelized

* all async creation functions working

* bid refund test not passing

* fixed

* projects meeting together at the desired state (they start at different points automatically)

* save

* fixed tests. they were failing due to debug durations not disabled

* traits broken :(

* save

* conditionally adding genesis config

* Fixed the externalities issue by using the single threaded tokio runtime. added check for asking more remainder CT buys that are available

* removed conditional instantiator fields and conditional genesis config on pallet-funding.

* fixes

* trying to remove Sync and Send traits

* trying to have one genesis config

* save

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* save

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* save

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* build-spec working but some logic in instantiator is failing bids

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* node instantiation confirmed to be working, and a test was written in integration-tests

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix: fmt

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix tests

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* merge fixes

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* new test

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove testing-node feature

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove cargo-expand-visible feature and unused modular genesis_config.rs

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove unused mut #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove unused mut #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* TODO added #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove unused old genesis builder #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove else statement #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove commented out lines #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove AccountList and use same pattern as other functions #130 (comment).

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* updated comment on Expendable reason
#130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix: could not compile pallet-funding alone due to missing `default = ["std"]"` in Cargo.toml

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix testnet runtime, bad merge with main

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix import

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* add unwrap() to advance_time

Co-authored-by: Leonardo Razovic <4128940+lrazovic@users.noreply.github.com>

* fix imports from Leo's PR comment #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

---------

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>
Co-authored-by: Leonardo Razovic <4128940+lrazovic@users.noreply.github.com>

Feature/plmc 413 fix existing benchmarks (#146)

* feat(287): parachain information discovery and channel opening

automatic hrmp connection working

Genesis instantiator usage and first draft of HRMP connection

formatting

feature propagation

cleanup

new node functioning. genesis not yet sure if working

new node functioning. genesis not yet sure if working

somehow compiling and test passing

save

save

save

feat(287): para_id setting extrinsic implemented and tested

save

same log crate across workspace

same log crate across workspace

save

save

save

feat(287): changed tight couple of pallet_xcm by extracting sender trait

feat(287): first commit

feat(285): POC Hrmp automatic acceptance

* first commit

* save

* penpal local fork

* save

* save

* save

* HRMP establishment successfully mocked!

* pallet-funding tests fixed

* migration check working

* fixes

* add cargo lock

* dmp fix

* formatting

* small fixed

* fixes

* save

* compiling, unit converion to map

* revert staking changes

* saving now evaluation reward and move to u64 for migration

* save

* save

* migration is successfully sent and reflected in the system

* vesting scheduling working in polimec-receiver

* save: starting to implement transact response, but we need to store a new map of query id -> unconfirmed transactions

* save

* Migration for a single user working fully and tested

* Everything works!

* pallet_funding test broken currently

* bug found in evaluation unbonding by cleaner. Still an infinite loop bug remaining

* all bugs squashed B)

* need to find a way to generate function from a new macro

* need to find a way to generate function from a new macro

* e2e tests successfully adapted to the xcm emulator

* Testnet now using Oracle, and e2e successfully passing.

* not all xcmp messages being received

* save

* cleanup

* fmt

* fixes

* save

* limiting 5 migrations per block works

* fmt

* save

* back to normal migration without bundling per block, now works for some reason

* final commit

* first commit

* ct migration tests refactor

* stable

* using generate_accounts! macro in all integration tests

* wip

* big refactor

* almost there

* working

* final changes

* tests passing

* multiple projects test passing.
Big bug found with ever-increasing running times
Failing test for release of ct deposit on failed project

* state machine intergration for releasing deposit

* starting to fix last tests

* only evaluation automatic release working.
`bids_and_community_and_remainder_contribution_plmc_bonded_is_returned_automatically_on_funding_fail` failing because of this

* state machine fixed where it only worked on evaluations

* broken tests

* save

* manual and automatic ct mint tests now passing. Removed the specific ones for just bids/evals/contr. and merged them all into 1 for manual and one for automatic

* fixed most tests. Bid calculation function not working as intended now

* benchmark tests passing

* fmt. real benchmarks run successfully

* save

* fixes

* remove unnecessary time advancement in project creation

* MVP!

* multiple community projects can be parallelized

* all async creation functions working

* bid refund test not passing

* fixed

* projects meeting together at the desired state (they start at different points automatically)

* save

* fixed tests. they were failing due to debug durations not disabled

* traits broken :(

* save

* conditionally adding genesis config

* Fixed the externalities issue by using the single threaded tokio runtime. added check for asking more remainder CT buys that are available

* removed conditional instantiator fields and conditional genesis config on pallet-funding.

* fixes

* trying to remove Sync and Send traits

* trying to have one genesis config

* save

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* save

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* save

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* build-spec working but some logic in instantiator is failing bids

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* node instantiation confirmed to be working, and a test was written in integration-tests

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix: fmt

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix tests

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* merge fixes

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* new test

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove testing-node feature

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove cargo-expand-visible feature and unused modular genesis_config.rs

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove unused mut #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove unused mut #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* TODO added #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove unused old genesis builder #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove else statement #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove commented out lines #130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove AccountList and use same pattern as other functions #130 (comment).

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* updated comment on Expendable reason
#130 (comment)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix: could not compile pallet-funding alone due to missing `default = ["std"]"` in Cargo.toml

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* save

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix linear-release benchmarks

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix staking benchmarks and add optional compilation for externalities on instantiator

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* pallet_funding benchmarks fixed.

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* uncommented integration-tests. Had to do it to compile workspace with `runtime-benchmarks`

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* all benchmarks running to completion

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* save

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix testnet runtime, bad merge with main

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fix import

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* fixed staking benchmarks

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* cleanup

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* uncomment integration-tests

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* remove pallet_funding dependency from linear-release

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

---------

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

Add custom migrations for OracleProvidersMembership (#147)

* Add custom migrations for OracleProvidersMembership

* fix: fat fingers

* chore: bump version

* fix: workspace compilation was failing due to using conditional compilation inside `parameter_types!`

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

---------

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>
Co-authored-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

Feature/plmc 417 Update docs (#150)

* chore: align license headers

* docs: update README

* chore: update headers

* chore: align toml files

* chore: fix more header

Chore/optimize size (#151)

* chore: strip debuginfo

* chore: disable logging when we build the production runtime

* chore: zepter format the tomls

set block number back to 0 at the end of pallet_funding genesis (#153)

Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

chore: add helikon bootnodes (#152)

fix integration tests

add locking period to elections phragmen

add default members cargo config and fix benchmark tests

add test + remove try-runtime + benchmarks from integration tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants