Skip to content

Commit

Permalink
Feature/plmc 267 add complexity parameters to extrinsic benchmarks (#148
Browse files Browse the repository at this point in the history
)

* 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>

* write single test for each benchmark

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

* successfully added the async parallel instantiaton in a real benchmark :)

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>

* rename start_evaluation fn

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

* remove unnecessary parameters from `create` and `edit_metadata`

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

* fix testnet pallet config

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

* changed add_to_update_store

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

* check tests pass, add new draft tests

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

* add_to_update_store benchmark in start_evaluation

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

* new pr template

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

* only one pr template

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

* new ProjectToUpdate functions that return parameters for weight functions.
Benchmark functions broken

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

* fixed eval start bench

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

* fix manual auction benchmark

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

* english_start benchmarked

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

* trying to remove `z` and add automatic auction bench

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

* finished automatic auction benchmark, now running it for real

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

* new weight gen

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

* evaluation benchmarks. fix auction round extrinsic

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

* save contributions extrinsic

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

* contribution logic split into separate functions

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

* all contribution bench branches coded. Missing single tests and using those weights in the contribute extrinsic

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

* contribute benches tested and passing. Missing real benchmarking and adding the correct weights on the extrinsic

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

* contribution_over_limit_ends_round removed since that case never happens

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

* abstracted away `ProjectsToUpdate` filling

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

* weight gen v2

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

* added weight returns on contribute()

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

* all tests for benches rewritten so far are passing

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

* added ct_deposit difference benchmarks for first contribution. Bench running atm. Onward to bids

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

* weight generated. Seems off

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

* rename benches

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

* modify contribution function to return new bench fns

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

* removed chance to bid over the limit by removing the lowest bid.

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

* bid benchmark abstracted for future complexity parametrization

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

* complexity parameter `x` working (existing bids). Missing `y` for times "perform_bid" is called

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

* new parameter "y" for amount of perform_bid calls on one extrinsic

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

* remove unused bucket helper function

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

* ct deposit bid benchmark difference

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

* real weight returns added for bid extrinsic. Trying to update now price calculation test

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

* updated test, but still inaccurate. 11.1818 vs 11

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

* evaluation_unbond_for does not need complexity parameters

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

* bug fixed in instantiator where multiple evaluations by same account didnt get the correct assertion. Bench written for reward to evaluators. Two branches: ct account created, and not

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

* real weight returns on evaluation reward payouts

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

* default weight on fn

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

* evaluation slash does not need complexity parameters or logic branches

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

* test for bench now passing. had to modify the state machine, but we will revise that code later

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

* bid_ct_mint_for done

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

* contribution_ct_mint_for done

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

* contribution_ct_mint_for done

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

* vesting schedule benchmarks (minimal changes)

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

* payouts benchmarks (minimal changes)

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

* all benchmarks passing

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

* price test was correct, fixed the expectation

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

* save

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

* fix evaluator rewards test

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

* fmt, remove draft tests

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

* remove unused tests. Add real weights on pallet-funding

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

* delete commented out code

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

* weight returns testing possible :)
`start_evaluation` test done

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

* removed benchmark tests. we think they are not necessary

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

* add constant annotations to Config types
#148 (comment)

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

* rename benchmark variables to weight return variables

#148 (comment)
Signed-off-by: Juan Ignacio Rios <juani.rios.99@gmail.com>

* is_empty()

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

* is_zero()

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

* fix post merge

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

* push lock

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

* fix syntax

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

* fmt

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

* fmt

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>
  • Loading branch information
JuaniRios and lrazovic authored Feb 9, 2024
1 parent 3cadd6a commit f554953
Show file tree
Hide file tree
Showing 17 changed files with 4,223 additions and 1,938 deletions.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## What?

## Why?

## How?

## Testing?

## Screenshots (optional)

## Anything Else?
10 changes: 0 additions & 10 deletions .github/workflows/pull_request_template.md

This file was deleted.

Loading

0 comments on commit f554953

Please sign in to comment.