This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Commit ce449a5
Contracts pallet: removal on idle (#11202)
* on_initialize -> on_idle
* use remaining_weight info
* no weight_limit for on_idle
* call on_idle in tests
* attempt to fix tests
* run on_initiaize when queue full
* add on_idle to weight info
* add on_idle weight info to on_idle hook
* add basic test for on_initialize with full queue
* disbale check for all keys gone in full queue, full block test
* queue_deth as usize, add comment
* comment was removed by accident
* Update frame/contracts/src/lib.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* cargo +nightly fmt
* update lazy_removal_does_no_run_on_full_queue_and_full_block
* remove changes in weights.rs
* weights on_idle -> on_process_deletion_queue_batch
* use block number for on_idle
* use BlockNumber for on_initialize
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update frame/contracts/src/lib.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* remove outcommented code
* add check that queue still full for test
* cargo fmt
* cargo +nightly fmt
* Update frame/contracts/src/benchmarking/mod.rs
Co-authored-by: Alexander Gryaznov <hi@agryaznov.com>
* fix weights.rs
* add lazy_removal_does_no_run_on_low_remaining_weight test
* Apply suggestions from code review
Co-authored-by: Alexander Gryaznov <hi@agryaznov.com>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Alexander Gryaznov <hi@agryaznov.com>1 parent 7ca5e87 commit ce449a5
File tree
5 files changed
+200
-74
lines changed- frame/contracts/src
- benchmarking
5 files changed
+200
-74
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
| 205 | + | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
383 | 388 | | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
392 | 405 | | |
393 | 406 | | |
394 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
1610 | 1611 | | |
1611 | 1612 | | |
1612 | 1613 | | |
1613 | | - | |
| 1614 | + | |
1614 | 1615 | | |
1615 | 1616 | | |
1616 | 1617 | | |
1617 | 1618 | | |
1618 | 1619 | | |
1619 | 1620 | | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
1620 | 1640 | | |
1621 | 1641 | | |
1622 | 1642 | | |
| |||
1661 | 1681 | | |
1662 | 1682 | | |
1663 | 1683 | | |
1664 | | - | |
| 1684 | + | |
1665 | 1685 | | |
1666 | 1686 | | |
1667 | 1687 | | |
| |||
1761 | 1781 | | |
1762 | 1782 | | |
1763 | 1783 | | |
1764 | | - | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
1765 | 1812 | | |
1766 | 1813 | | |
1767 | 1814 | | |
| |||
1779 | 1826 | | |
1780 | 1827 | | |
1781 | 1828 | | |
1782 | | - | |
1783 | | - | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
| 1829 | + | |
1788 | 1830 | | |
1789 | 1831 | | |
1790 | | - | |
1791 | | - | |
1792 | | - | |
1793 | | - | |
1794 | | - | |
| 1832 | + | |
1795 | 1833 | | |
1796 | 1834 | | |
1797 | 1835 | | |
| |||
1806 | 1844 | | |
1807 | 1845 | | |
1808 | 1846 | | |
1809 | | - | |
1810 | | - | |
1811 | 1847 | | |
1812 | | - | |
1813 | | - | |
1814 | | - | |
| 1848 | + | |
1815 | 1849 | | |
1816 | | - | |
1817 | | - | |
1818 | | - | |
1819 | | - | |
1820 | | - | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
1821 | 1853 | | |
1822 | | - | |
1823 | | - | |
1824 | | - | |
1825 | | - | |
1826 | | - | |
| 1854 | + | |
| 1855 | + | |
1827 | 1856 | | |
1828 | | - | |
1829 | | - | |
1830 | | - | |
1831 | | - | |
| 1857 | + | |
| 1858 | + | |
1832 | 1859 | | |
1833 | | - | |
1834 | | - | |
| 1860 | + | |
| 1861 | + | |
1835 | 1862 | | |
1836 | | - | |
1837 | | - | |
1838 | | - | |
1839 | | - | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
1840 | 1871 | | |
1841 | 1872 | | |
1842 | 1873 | | |
| |||
0 commit comments