Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ Add stop time functionality to Proofs Dealer pallet (Moonsong…
…-Labs#195) * refactor: ♻️ Rename `ChallengeTickToChallengedProviders` -> `TickToProvidersDeadlines` * feat: ✨ `ChallengesTicker` can now be paused * feat: 🚧 Implement `on_finalize` hook to register block weight used * feat: 🚧 Implement spamming condition check * feat: 🚧 Update runtime configs with new parameters * fix: 🐛 Use `mutate` correctly and only run spam check after tick suprasses block fullness period * fix: 🚨 Update types to new storage element name * test: 🚧 Write pending tests * fix: 🐛 Check for spamming after incrementing tic * test: ✅ Add passing tests of network spammed * fix: 🐛 Consider block not full when weight left is exactly headroom * test: Add tests for how much weight is considered block full * test: ✅ Add test cases for exact number of spammed blocks tolerated * test: ✅ Add test for ticker not affected in MBM * test: ✅ Provider is not marked as slashable when network is spammed * feat: ✨ Add `get_current_tick()` function to `ProofsDealerInterface` * feat: ✨ Make threshold calculations depend on ticks instead of block numbers to prevent spam attack * chore: 🏷️ Update `types-bundle` runtime API with ticks instead of blocks * feat: ✨ Update blockchain service and BSP tasks to use ticks instead of blocks for volunteering * test: 🧑💻 Hide consolo logs behind `verbose` flag in integration tests for better readability * fix: 🚨 Fix dangling compile error from merge * chore: 🏷️ Update api-augment * test: 🐛 Fix integration tests to use new variables and constant names with "tick" * test: ✅ Add spamming tests for file system pallet * fix: 🩹 Use less complicated types in file system tests to improve rust analyzer usability * test: ✅ Add threshold test with stopping time due to spamming attack * revert: ⏪ Rollback `only` and `networkConfig` flags in threshold testing * refactor: ♻️ Reorder tests to keep them as they were then adding new test at the end * chore: 🏷️ Update api-augment * docs: 📝 Add stopping time docs to proofs dealer pallet * docs: 📝 Add information on ticks to File System pallet docs * ci: 🧪 Increase CI tests timeout to allow spamming test to finish * fix: 🚨 Solve compilation errors and failing tests after merge * chore: 🏷️ Update `api-augment` after merge * fix: 🧪 Increase timeout in bspnet tests to 4hs * fix: 🧪 Reduce timout for CI tests back to 30m and skip long spamming test * docs: 📝 Add comment to quick return from proof verification * feat: ✨ Use pallet params in test setup * fix: 🐛 Fix calculation of weighted slope * docs: 📝 Update threshold formula docs * test: ✅ Update tests to work better with rust analyzer * fix: 🩹 Ammend PR review * chore: 🏷️ Update `api-augment` * fix: 🐛 Update not full blocks properly * test: ✅ Add test wait * chore: 🏷️ Update `api-augment`
- Loading branch information