Skip to content

Commit

Permalink
Merge pull request #5 from ComposableFi/seun-trie-proofs
Browse files Browse the repository at this point in the history
fix trie proofs
  • Loading branch information
Web3 Philosopher authored Mar 16, 2022
2 parents bf498eb + e61702c commit 6933758
Show file tree
Hide file tree
Showing 8 changed files with 681 additions and 309 deletions.
19 changes: 1 addition & 18 deletions docs/ibc/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@
- [ParachainHeader](#ibc.lightclients.beefy.v1.ParachainHeader)
- [PayloadItem](#ibc.lightclients.beefy.v1.PayloadItem)
- [SignedCommitment](#ibc.lightclients.beefy.v1.SignedCommitment)
- [TimestampExtrinsic](#ibc.lightclients.beefy.v1.TimestampExtrinsic)

- [ibc/lightclients/localhost/v1/localhost.proto](#ibc/lightclients/localhost/v1/localhost.proto)
- [ClientState](#ibc.lightclients.localhost.v1.ClientState)
Expand Down Expand Up @@ -3417,7 +3416,7 @@ data needed to prove parachain header inclusion in mmr.
| `parachain_heads_proof` | [bytes](#bytes) | repeated | proofs for our header in the parachain heads root |
| `heads_leaf_index` | [uint32](#uint32) | | leaf index for parachain heads proof |
| `heads_total_count` | [uint32](#uint32) | | total number of para heads in parachain_heads_root |
| `timestamp` | [TimestampExtrinsic](#ibc.lightclients.beefy.v1.TimestampExtrinsic) | | data needed to provide timestamp for ConsensusState |
| `extrinsic_proof` | [bytes](#bytes) | repeated | trie merkle proof of inclusion in header.extrinsic_root this already encodes the actual extrinsic |



Expand Down Expand Up @@ -3455,22 +3454,6 @@ signed commitment data




<a name="ibc.lightclients.beefy.v1.TimestampExtrinsic"></a>

### TimestampExtrinsic
Timestamp extrinsic data


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `extrinsic_proof` | [bytes](#bytes) | repeated | merkle proof of inclusion in header.extrinsic_root |
| `extrinsic` | [bytes](#bytes) | | actual scale encoded timestamp extrinsic. |





<!-- end messages -->

<!-- end enums -->
Expand Down
45 changes: 45 additions & 0 deletions modules/light-clients/11-beefy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# How to run integration tests for 11-Beefy
<br/>

### First run the relay chain & parachain nodes:

<br/>

```bash
docker run -ti -p9944:9944 -p9988:9988 -p9998:9998 composablefi/composable-sandbox:latest
```
<br/>

### Then wait until you see this line:
<br/>

```
🚀 POLKADOT LAUNCH COMPLETE 🚀
```
<br/>

### Now you can run the tests in `./11-beefy/types/update_test.go`
<br/>

```bash
go test -test.timeout=0 -run TestCheckHeaderAndUpdateState -v
```
<br/>

### You should start to see these lines:
<br/>

```bash
==== connected! ====
====== subcribed! ======


Initializing client state


clientState.LatestBeefyHeight: 169
clientState.MmrRootHash: 89a2850e8b5e475980ca1ef4c145f4c5624a072d287b85f0430815d5c9b7b387
====== successfully processed justification! ======
```

### This means the light client is following the relay chain consensus protocol
Loading

0 comments on commit 6933758

Please sign in to comment.