Skip to content

Commit

Permalink
chore: adding sentinel path for solomachine header (#2748)
Browse files Browse the repository at this point in the history
chore(statemachine)!: Adding sentinel value for header path in 06-solomachine.
  • Loading branch information
damiannolan authored Nov 17, 2022
1 parent a05247c commit 1f140ea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
### State Machine Breaking

* (light-clients/07-tendermint) [\#2554](https://github.com/cosmos/ibc-go/pull/2554) Forbid negative values for `TrustingPeriod`, `UnbondingPeriod` and `MaxClockDrift` (as specified in ICS-07).
* (06-solomachine) [\#2744](https://github.com/cosmos/ibc-go/pull/2744) `Misbehaviour.ValidateBasic()` now only enforces that signature data does not match when the signature paths are different.
* (06-solomachine) [\#2744](https://github.com/cosmos/ibc-go/pull/2744) `Misbehaviour.ValidateBasic()` now only enforces that signature data does not match when the signature paths are different.
* (06-solomachine) [\#2748](https://github.com/cosmos/ibc-go/pull/2748) Adding sentinel value for header path in 06-solomachine.

### Improvements

Expand Down
3 changes: 3 additions & 0 deletions modules/light-clients/06-solomachine/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import (
"github.com/cosmos/ibc-go/v6/modules/core/exported"
)

// SentinelHeaderPath defines a placeholder path value used for headers in solomachine client updates
const SentinelHeaderPath = "solomachine:header"

var _ exported.ClientMessage = &Header{}

// ClientType defines that the Header is a Solo Machine.
Expand Down
2 changes: 1 addition & 1 deletion modules/light-clients/06-solomachine/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (cs ClientState) verifyHeader(ctx sdk.Context, cdc codec.BinaryCodec, clien
Sequence: header.Sequence,
Timestamp: header.Timestamp,
Diversifier: cs.ConsensusState.Diversifier,
Path: []byte{},
Path: []byte(SentinelHeaderPath),
Data: dataBz,
}

Expand Down
2 changes: 1 addition & 1 deletion testing/solomachine.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (solo *Solomachine) CreateHeader(newDiversifier string) *solomachine.Header
Sequence: solo.Sequence,
Timestamp: solo.Time,
Diversifier: solo.Diversifier,
Path: []byte{},
Path: []byte(solomachine.SentinelHeaderPath),
Data: dataBz,
}

Expand Down

0 comments on commit 1f140ea

Please sign in to comment.