Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difftest core: small PR removes some todos #656

Merged
merged 5 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/difference/core/driver/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ func (s *CoreSuite) matchState() {
for j := 0; j < initState.NumValidators; j++ {
s.Require().Equalf(int64(s.traces.Tokens(j)), s.providerTokens(int64(j)), diagnostic+"P tokens mismatch for val %d", j)
}
// TODO: delegations
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a good idea/ not worth doing. The method is blackbox and delegations are implementation detail.
More docs/ onboarding material is coming which will explain method and reasoning.

s.Require().Equalf(int64(s.traces.DelegatorTokens()), s.delegatorBalance(), diagnostic+"P del balance mismatch")
for j := 0; j < initState.NumValidators; j++ {
a := s.traces.Jailed(j) != nil
Expand All @@ -256,7 +255,6 @@ func (s *CoreSuite) matchState() {
s.Require().Errorf(err, diagnostic+" power mismatch for val %d, expect 0 (nil), got %d", j, actual)
}
}
// TODO: outstanding downtime
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a good idea/ not worth doing. The method is blackbox and delegations are implementation detail.
More docs/ onboarding material is coming which will explain method and reasoning.

}
}

Expand Down Expand Up @@ -313,7 +311,11 @@ func (s *CoreSuite) TestAssumptions() {
s.T().Fatal(FAIL_MSG)
}

// TODO: write assumption that checks that throttle params are appropriate
// TODO: Write a check to make sure that the slash throttle params are set correctly.
// The params should be set such that the slash throttle never kicks in and stop a slash.
// This is because the model assumes that a slash will always be executed, no matter
// how many. This can be achieve by setting the slash factor to e.g. 1.0 and the refresh
// period to 1 block.
Comment on lines -316 to +318
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll try to get to this but it's very low prio so I enhanced the description.


// Delegator balance is correct
s.Require().Equal(int64(initState.InitialDelegatorTokens), s.delegatorBalance())
Expand Down
1 change: 0 additions & 1 deletion tests/difference/core/model/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { strict as assert } from 'node:assert';
* This model may need updating pending
* https://github.com/cosmos/ibc/issues/825 (model updated, spec has open PR)
* https://github.com/cosmos/ibc/issues/796 (model updated, spec awaiting PR)
* TODO: implement automatic commit hash comparison warning against spec
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not worth doing/ too much hassle.

*/

import {
Expand Down