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

Add 668 functions to 07-tendermint #879

Closed
3 tasks
colin-axner opened this issue Feb 7, 2022 · 4 comments
Closed
3 tasks

Add 668 functions to 07-tendermint #879

colin-axner opened this issue Feb 7, 2022 · 4 comments

Comments

@colin-axner
Copy link
Contributor

colin-axner commented Feb 7, 2022

In preparation for the additional functions to the client state interface, #668, add:

  • VerifyHeader
  • CheckForMisbehaviour
  • UpdateStateOnMisbehaviour
  • UpdateState

for tendermint client

Recommended splits:

PR 1

Rename Misbehaviour to DuplicateHeightHeader or some name like that (we can discuss on pr)

We decided to leave as Misbehaviour, see comment

PR 2

Rename checkValidity to VerifyHeader. Code may need to be modified to fulfill the expected functionality of VerifyHeader, including changing API or pulling in/removing code from the existing function.

Add a switch

switch header.(type) {
case NormalHeader:
   // verify one TM header
  
case DuplicateHeightHeader:
    // verify both TM headers
   
default:
    return error
}

Additional code may need to be added to the normal header or duplicate height header. Code should be deduplicated from CheckMisbehaviourAndUpdateState as well

PR 3

CheckForMisbehaviour should check for duplicate height misbehaviour and BFT Time violation misbehaviour. See existing code. Code should be deduplicated from CheckMisbehaviourAndUpdateState as well. Ensure duplicate header misbehaviour is checked by seeing if a consensus state already exists for that height

PR 4

UpdateStateOnMisbehaviour set client state in state to be frozen

Closed by: #1168

PR 5

Rename update to UpdateState. Should account for no-ops for duplicate headers. Do pruning logic within this function as well


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@colin-axner
Copy link
Contributor Author

I will pickup PR 1

@seantking
Copy link
Contributor

seantking commented Mar 11, 2022

Edit: actually first I will start on -> #875

@seantking
Copy link
Contributor

PR 2 & 3/4

@colin-axner
Copy link
Contributor Author

Heyo. I can pickup pr 5

@damiannolan damiannolan self-assigned this Mar 25, 2022
@seantking seantking reopened this Mar 29, 2022
@crodriguezvega crodriguezvega added this to the 02-client refactor milestone Mar 30, 2022
CosmosCar pushed a commit to caelus-labs/ibc-go that referenced this issue Nov 6, 2023
cosmos#879)

Bumps
[github.com/celestiaorg/go-header](https://github.com/celestiaorg/go-header)
from 0.2.4 to 0.2.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/celestiaorg/go-header/releases">github.com/celestiaorg/go-header's
releases</a>.</em></p>
<blockquote>
<h2>v0.2.6</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(p2p): remove TrustedPeersRequestTimeout config field by <a
href="https://github.com/Wondertan"><code>@​Wondertan</code></a> in <a
href="https://redirect.github.com/celestiaorg/go-header/pull/29">celestiaorg/go-header#29</a></li>
<li>feat: WithParams option for every component by <a
href="https://github.com/Wondertan"><code>@​Wondertan</code></a> in <a
href="https://redirect.github.com/celestiaorg/go-header/pull/31">celestiaorg/go-header#31</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/celestiaorg/go-header/compare/v0.2.5...v0.2.6">https://github.com/celestiaorg/go-header/compare/v0.2.5...v0.2.6</a></p>
<h2>v0.2.5</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: avoid replacing proto dep and add pb-gen makefile rule by <a
href="https://github.com/Wondertan"><code>@​Wondertan</code></a> in <a
href="https://redirect.github.com/celestiaorg/go-header/pull/26">celestiaorg/go-header#26</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/celestiaorg/go-header/compare/v0.2.4...v0.2.5">https://github.com/celestiaorg/go-header/compare/v0.2.4...v0.2.5</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/celestiaorg/go-header/commit/47fe348901bffd17ff998eeaaa4b58adf46a1239"><code>47fe348</code></a>
feat: WithParams option for every component</li>
<li><a
href="https://github.com/celestiaorg/go-header/commit/5c9b68d6029a8e1bcf300965a29808994cf26284"><code>5c9b68d</code></a>
chore(p2p): remove TrustedPeersRequestTimeout config field</li>
<li><a
href="https://github.com/celestiaorg/go-header/commit/a0b233466688f046ae02be216cb4b8b976b98401"><code>a0b2334</code></a>
fix: avoid replacing proto dep and add pb-gen makefile rule</li>
<li>See full diff in <a
href="https://github.com/celestiaorg/go-header/compare/v0.2.4...v0.2.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/celestiaorg/go-header&package-manager=go_modules&previous-version=0.2.4&new-version=0.2.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 🥳
Development

No branches or pull requests

4 participants