Commit d5beaa55 authored by Sergej Sakac's avatar Sergej Sakac Committed by GitHub
Browse files

Glutton pallet (#12833)



* Pov-Limit pallet

* use Perbill & fixes

* fixes

* reads & writes

* update docs

* tests

* calculate weight

* fmt

* benchmark

* logic fix

* naming fix

* caclulate computation weight limit

* make the Hasher generic

* make the code compile

* generate weight

* fix on_idle

* fix

* fix

* make reading generic

* fix?

* fixes

* remove warning

* fix

* hasher fix :D

* change value

* test

* actual weight and expected weight are the same

* update

* fix

* add events

* remove useless line

* using actual hashing algorithm

* better readability

* fix nits

* Update

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* add migration

* hardcode proof_size in weights.rs

* format

* fixes

* Fix weight

* docs

* fix

* Update frame/pov-limit/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update frame/pov-limit/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* empty on_ilde & update weight.rs

* remove migration & fix benchmark

* remove migration from migrations

* initialize_pallet

* use blake2

* Update frame/pov-limit/Cargo.toml

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update frame/pov-limit/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update frame/pov-limit/Cargo.toml

Co-authored-by: default avatarBastian Köcher <[email protected]>

* rename pallet

* make the wasters non-generic

* rename to glutton

* fix

* small fixes & run benchmark

* increase left over ref-time in tests

* Update frame/glutton/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* or values

* fix

* generate weight

* Update frame/glutton/Cargo.toml

Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>

* fix nits

* Adjustments

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Fixes

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* fix

* Update weights

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Tweak constants

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Update weights

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* remove genesis config

* passing tests

* More precise results

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* update node-executor test

* Calculate number of iterations in advance

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* increase criteria

* Final fixes

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Update frame/glutton/src/tests.rs

Co-authored-by: default avatarKian Paimani <[email protected]>

* Update frame/glutton/src/lib.rs

Co-authored-by: default avatarKian Paimani <[email protected]>

* Update frame/glutton/src/lib.rs

Co-authored-by: default avatarKian Paimani <[email protected]>

* fix typos

* Update frame/glutton/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update frame/glutton/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* expand/shrink

* fmt

* Revert "Update frame/glutton/src/lib.rs"

This reverts commit 98a237afd27de3deb15ba381871e12f71a9d71b1.

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Use CountedStorageMap

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Add benchmark

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Use manual map counter

Something with the R/W count in the benchmarking result did not add
up. Need to investigate but for now just using a manual counter.

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Use new template

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Doc+typos

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_glutton

* Apply suggestions from code review

Co-authored-by: default avatarKoute <[email protected]>

* Add minimal README

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_glutton

---------

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
Co-authored-by: default avatarBastian Köcher <[email protected]>
Co-authored-by: default avatarKian Paimani <[email protected]>
Co-authored-by: command-bot <>
Co-authored-by: default avatarKoute <[email protected]>
parent fbba5106
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment