From 463ec20c87423897009bd78c2dbf96d28bd8f150 Mon Sep 17 00:00:00 2001 From: Daniel T <30197399+danwt@users.noreply.github.com> Date: Wed, 11 Jan 2023 18:24:12 +0000 Subject: [PATCH] Difftest core: small PR removes some todos (#656) * Removes model TODO * Removes 1 TODO * Removes 1 TODO * Clarify 1 TODO Co-authored-by: Daniel Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com> --- tests/difference/core/driver/core_test.go | 8 +++++--- tests/difference/core/model/src/model.ts | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/difference/core/driver/core_test.go b/tests/difference/core/driver/core_test.go index 1d8e8d8ee9..25752bcf06 100644 --- a/tests/difference/core/driver/core_test.go +++ b/tests/difference/core/driver/core_test.go @@ -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 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 @@ -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 } } @@ -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. // Delegator balance is correct s.Require().Equal(int64(initState.InitialDelegatorTokens), s.delegatorBalance()) diff --git a/tests/difference/core/model/src/model.ts b/tests/difference/core/model/src/model.ts index 65b710d72a..bfd7fbd179 100644 --- a/tests/difference/core/model/src/model.ts +++ b/tests/difference/core/model/src/model.ts @@ -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 */ import {