Commit Graph

68 Commits

Author SHA1 Message Date
Uncle Stinky
d6ecdcd468 correct benchmarking of self applause and remove of unnecessary storage during tests
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-11-05 22:13:28 +03:00
Uncle Stinky
decf6665df make slow-clap tests work again based on new functionality, new tests added too
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-11-05 20:55:04 +03:00
Uncle Stinky
ebae9fadbe fixes for self_applause function
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-11-05 20:52:00 +03:00
Uncle Stinky
c872eca8ac back look during the slashing
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-11-05 15:55:37 +03:00
Uncle Stinky
eb181c7f44 fixes for the inconsistency of the slow claps
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-11-04 17:43:36 +03:00
Uncle Stinky
7edc8935b6 optimize offenders gathering with a single pass over the data
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-08-27 15:31:32 +03:00
Uncle Stinky
46aa18aafe implement cross session claim via self_applause
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-08-27 14:41:46 +03:00
Uncle Stinky
f245879925 force parameters for RewardCurve to be a default balance type, which is u64
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-08-14 16:55:46 +03:00
Uncle Stretch
60b887f812 make MulDiv to be used with any 32 bit unsigned
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-08-10 22:07:53 +03:00
Uncle Stretch
f7f25bd087 nullify bridged imbalance on each era reward payout
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-08-10 16:51:04 +03:00
Uncle Stretch
e2c75ca558 implement muldiv without overflow and underflow
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-08-10 16:41:14 +03:00
Uncle Stinky
1c4c517728 avoiding back in time travel
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-07-31 15:30:28 +03:00
Uncle Stinky
b969081cbf make sure that disabled validator will not be checked with is_good_actor
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-07-31 14:21:55 +03:00
Uncle Stinky
9bdb7b5d5c add an early check for the disabled validator
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-07-31 14:02:14 +03:00
Uncle Stinky
c4b16805f7 fix calculation of median, include special case when there're no claps
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-07-31 13:56:05 +03:00
Uncle Stretch
7216f1d82b rustfmt ghost slow clap and fix typos
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-07-29 14:58:23 +03:00
Uncle Stretch
792e70c988 rustfmt ghost sudo and fix typos
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-07-29 14:57:58 +03:00
Uncle Stretch
63979e34a7 update weights for the ghost-networks based on the latest update
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-07-29 13:28:46 +03:00
Uncle Stinky
1d826fbf7e rotate endpoints on each offchain worker exection
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-07-29 12:42:36 +03:00
Uncle Stretch
0375bd1434 preparation for the benchmarking of upgraded ghost-networks pallet
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-07-28 23:53:11 +03:00
Uncle Stretch
b4ef445281 make ability to have multiple default endpoints for the network
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-07-28 23:34:42 +03:00
Uncle Stretch
fe46566d7e insert measured weights for ghost-sudo
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-07-28 16:18:24 +03:00
Uncle Stinky
4f23c39994 sudo pallet ported as local pallet
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-07-28 13:12:08 +03:00
Uncle Stinky
47f7ae3847 separate evm structs, deserialisation functions and main logic
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-25 19:28:59 +03:00
Uncle Stinky
591cce1fb1 rustfmt the ghost-slow-clap pallet
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-25 18:20:10 +03:00
Uncle Stinky
f7ba592d50 rustfmt the ghost-networks pallet
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-25 18:17:55 +03:00
Uncle Stinky
40a8152f69 rustfmt the ghost-claims pallet
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-25 18:17:14 +03:00
Uncle Stinky
116ca39dc4 rustfmt the ghost-traits pallet
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-25 18:16:06 +03:00
Uncle Stinky
8464da831f rate limit for the rpc endpoint based on network_id, storage guard lock for the current network_id and other minor improvements
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-25 18:09:29 +03:00
Uncle Stretch
d87184bbc2 update weights for the ghost networks pallet
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-06-19 22:37:03 +03:00
Uncle Stretch
43f72ec842 update weights and add rate_limit_delay for slow claps
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-06-19 22:35:51 +03:00
Uncle Stretch
060f61105c additional network field, that represents default rate limit measured in blocks
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-06-19 21:32:40 +03:00
Uncle Stretch
818f41d05e update slow claps because of finality delay non-option type
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-06-19 15:00:30 +03:00
Uncle Stretch
7bb18939bd no need for finality delay to be an Option<u64>
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-06-19 14:37:06 +03:00
Uncle Stinky
d8e934a98e ability to avoid too big deviations between from_block and to_block
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-19 14:31:33 +03:00
Uncle Stretch
671196ebac remove legacy release_delay and add block_distance for maximum block range for the eth_getLogs
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-06-18 18:53:19 +03:00
Uncle Stinky
39a6192d28 avoid re-using of to_block during rotation of block_range
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-18 17:20:25 +03:00
Uncle Stinky
6100e79ebf make clap regardless of fail during applause
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-18 17:03:09 +03:00
Uncle Stinky
417de5a7b2 clear storage based on provided history depth
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-18 13:47:13 +03:00
Uncle Stretch
b5845924dc fixes for the default weights on slow-clap package
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-06-17 20:56:32 +03:00
Uncle Stretch
f28e57cf8e add files with weights for the slow-clap, benchmarked according to the casper reference machine
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-06-17 20:44:44 +03:00
Uncle Stretch
3040dfb775 make benchmark work, issue with authorities fixed
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-06-17 20:34:42 +03:00
Uncle Stinky
66fa8409fa additional tests for the pallet
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-17 13:50:38 +03:00
Uncle Stinky
5beb22f116 avoid errors from minting sub-existential balance
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-13 16:42:14 +03:00
Uncle Stinky
7be24ed139 use latest version of ghost-networks
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-13 16:22:21 +03:00
Uncle Stretch
b5fc86aa9e separate bridged imbalance and gatekeeper amount. requested by @st1nky for ghost-slow-clap
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-06-13 16:16:01 +03:00
Uncle Stinky
e73f3855fd authorities stored based on the session hash map
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-11 22:56:48 +03:00
Uncle Stinky
a00eec9bb9 tests for clap and applause events added
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-04 16:33:03 +03:00
Uncle Stinky
2c2df5a607 ability to do self applause if claps received
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-04 15:44:53 +03:00
Uncle Stinky
186fb58367 merge new functionality which will be used for benchmarking purposes
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
2025-06-04 15:40:13 +03:00