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

fix trie proofs #5

Merged
merged 3 commits into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
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