Skip to content

Conversation

@claireclark1
Copy link
Collaborator

Goal

The goal of this PR is to update mocks to have >1 ED so that we can test over and under cases in the future.

Closes #1852

Discussion

  • Only for time-release pallet and capacity pallet
  • Increased from 1 to 10
  • Fixed breaking tests

Checklist

  • Updated Pallet Readme?
  • Updated js/api-augment for Custom RPC APIs?
  • Design doc(s) updated?
  • Unit Tests added?
  • e2e Tests added?
  • Benchmarks added?
  • Spec version incremented?

@codecov
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@mattheworris mattheworris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 it!

Copy link
Collaborator

@saraswatpuneet saraswatpuneet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, since benchmarking.rs got updated we may want to run benchmarks for time-release

Copy link
Collaborator

@enddynayn enddynayn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 great!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really understanding why these benchmarks wouldn't have worked without the ED.
Or is it just that we don't want the generated weights to include reaping or creating an account?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was due to changes in the mock runtime, however, benchmarking uses the real runtime. Therefore, I am guessing it might be due to changes in the polkadot-sdk?

I double checked by removing the benchmarking.rs changes: removing the ED causes the benchmarking tests to fail because the values in the time-release schedule are less than ED, and the error is: "Account cannot exist with the funds that would be given".

Copy link
Collaborator

@JoeCap08055 JoeCap08055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One non-blocking question, but otherwise looks good.
Nice work!

@claireclark1 claireclark1 merged commit 944a17b into main Oct 10, 2025
64 of 65 checks passed
@claireclark1 claireclark1 deleted the 1852-pallet-unit-tests-concerning-balances-modify-mockrs-to-have-ed-1-to-test-balances-less-than-ed branch October 10, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pallet Unit Tests concerning Balances: Modify mock.rs to have ED > 1, to test balances less than ED.

6 participants