Skip to content

Commit

Permalink
Merge PR cosmos#193: Various alterations to misbehaviourPredicate
Browse files Browse the repository at this point in the history
  • Loading branch information
cwgoes authored Aug 13, 2019
1 parent 370d1dd commit ffca8cf
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
1 change: 0 additions & 1 deletion misc/aspell_dict
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ changelog
datapipe
queryClientRoot
Pre
CLOSETRY
createClient
dataflow
BIP
Expand Down
1 change: 1 addition & 0 deletions scripts/make_pdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ find $DIR -type f -name "*.md" -exec cp {} {}.xfm \;
find $DIR -type f -name "*.md.xfm" -exec awk -i inplace '/## Backwards Compatibility/ {exit} {print}' {} \;
find $DIR -type f -name "*.png" -exec cp {} . \;
pandoc --pdf-engine=xelatex --template eisvogel --filter pandoc-include --mathjax --toc --number-sections -o spec.pdf spec.pdc
find $DIR -type f -name "*.md.xfm" -exec rm {} \;
rm *.png
Binary file modified spec.pdf
Binary file not shown.
7 changes: 5 additions & 2 deletions spec/ics-002-consensus-verification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,13 @@ state transitions, or other evidence as defined by the consensus algorithm.
The `MisbehaviourPredicate` type is defined as
```typescript
type MisbehaviourPredicate = (ConsensusState, bytes) => bool
type MisbehaviourPredicate = (ConsensusState, bytes) => (bool)
```
The boolean returned indicates whether the evidence of misbehaviour was valid.
The client MUST also mutate internal state to mark appropriate heights which
were previously considered valid invalid, according to the nature of the misbehaviour.
More details about `MisbehaviourPredicate`s can be found in [CONSENSUS.md](./CONSENSUS.md)
### Sub-protocols
Expand Down Expand Up @@ -285,7 +289,6 @@ method can be introduced in the future versions.
function freezeClient(identifier: Identifier, evidence: bytes) {
consensusState = get(consensusStateKey(identifier))
assert(consensusState.misbehaviourPredicate(evidence))
set(frozenKey(id), true)
}
```

Expand Down
9 changes: 4 additions & 5 deletions spec/ics-003-connection-semantics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,10 @@ The closing handshake sub-protocol defines three datagrams: *ConnCloseInit*, *Co
A correct protocol execution flows as follows (note that all calls are made through modules per ICS 25):
| Initiator | Datagram | Chain acted upon | Prior state (A, B) | Post state (A, B) |
| --------- | ----------------- | ---------------- | ------------------ | ------------------ |
| Actor | `ConnCloseInit` | A | (OPEN, OPEN) | (CLOSETRY, OPEN) |
| Relayer | `ConnCloseTry` | B | (CLOSETRY, OPEN) | (CLOSETRY, CLOSED) |
| Relayer | `ConnCloseAck` | A | (CLOSETRY, CLOSED) | (CLOSED, CLOSED) |
| Initiator | Datagram | Chain acted upon | Prior state (A, B) | Post state (A, B) |
| --------- | ------------------- | ---------------- | ------------------ | ----------------- |
| Actor | `ConnCloseInit` | A | (OPEN, OPEN) | (CLOSED, OPEN) |
| Relayer | `ConnCloseConfirm` | B | (CLOSED, OPEN) | (CLOSED, CLOSED) |
*ConnCloseInit* initialises a close attempt on chain A.
Expand Down
3 changes: 2 additions & 1 deletion spec/ics-004-channel-and-packet-semantics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ category: ibc-core
requires: 2, 3, 5, 23, 24
author: Christopher Goes <cwgoes@tendermint.com>
created: 2019-03-07
modified: 2019-06-29
modified: 2019-08-13
---

## Synopsis
Expand Down Expand Up @@ -790,6 +790,7 @@ Coming soon.
4 July 2019 - Modifications for unordered channels & acknowledgements
16 July 2019 - Alterations for multi-hop routing future compatibility
29 July 2019 - Revisions to handle timeouts after connection closure
13 August 2019 - Various edits

## Copyright

Expand Down

0 comments on commit ffca8cf

Please sign in to comment.