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

Misc PoS cleanup and improvements #1207

Merged
merged 10 commits into from
Aug 9, 2023
Merged

Conversation

nathanwhit
Copy link
Contributor

Description of proposed changes

This is sort of a mishmash of changes, but there are two general categories here:

Things that make disaster recovery easier (found during research for CSUB-260)

  • Exposed GRANDPA RPCs (these allow you to inspect the state of GRANDPA voting to debug stalled finality)
  • Added BadBlocks chain spec extension (this allows you to blacklist certain block hashes to easily hard fork)

Things that I should have done

  • Enabled warp syncing
  • Added the chainspec for the PoS devnet (i.e. the currently deployed one)
  • Removed dead code and commented out code from the PoS switchover and surrounding area

I can split it into multiple PRs, but I wanted to get something up before I forgot about this

Practical tips for PR review & merge:
Commit by commit

  • All GitHub Actions report PASS
  • Newly added code/functions have unit tests
    • Coverage tools report all newly added lines as covered
    • The positive scenario is exercised
    • Negative scenarios are exercised, e.g. assert on all possible errors
    • Assert on events triggered if applicable
    • Assert on changes made to storage if applicable
  • Modified behavior/functions - try to make sure above test items are covered
  • Integration tests are added if applicable/needed

@nathanwhit nathanwhit force-pushed the misc-pos-cleanup-and-improvements branch from 770ffa7 to b5af617 Compare July 28, 2023 01:30
@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2023

Codecov Report

Merging #1207 (e105b28) into dev (e06ceba) will decrease coverage by 0.13%.
Report is 7 commits behind head on dev.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##              dev    #1207      +/-   ##
==========================================
- Coverage   69.36%   69.24%   -0.13%     
==========================================
  Files         101      101              
  Lines       11901    11922      +21     
  Branches       97       97              
==========================================
  Hits         8255     8255              
- Misses       3646     3667      +21     
Files Changed Coverage Δ
node/src/chain_spec.rs 0.00% <0.00%> (ø)
node/src/rpc.rs 0.00% <0.00%> (ø)
node/src/service.rs 0.00% <0.00%> (ø)
node/src/service/consensus_switcher.rs 0.00% <0.00%> (ø)
runtime/src/version.rs 0.00% <ø> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

For full LLVM coverage report click here!

atodorov
atodorov previously approved these changes Jul 28, 2023
Copy link
Contributor

@atodorov atodorov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can add some sanity tests.

node/src/rpc.rs Show resolved Hide resolved
@nathanwhit nathanwhit force-pushed the misc-pos-cleanup-and-improvements branch from 65e9079 to e105b28 Compare August 7, 2023 20:03
@AdaJane AdaJane merged commit 63ba4cc into dev Aug 9, 2023
34 checks passed
@AdaJane AdaJane deleted the misc-pos-cleanup-and-improvements branch August 9, 2023 14:46
AdaJane pushed a commit that referenced this pull request Aug 14, 2023
* Add grandpa RPCs

* Enable warp sync

* Add BadBlocks to chain spec extensions

* Add PoS devnet chainspec

* Remove commented out line

* Appease version check

* Add grandpa RPC sanity integration test

* Auto-update creditcoin-js type definitions

* Make grandpa test a little bit more substantive

* Appease clippy

---------

Co-authored-by: gluwa-bot <[email protected]>
AdaJane pushed a commit that referenced this pull request Aug 14, 2023
* Add grandpa RPCs

* Enable warp sync

* Add BadBlocks to chain spec extensions

* Add PoS devnet chainspec

* Remove commented out line

* Appease version check

* Add grandpa RPC sanity integration test

* Auto-update creditcoin-js type definitions

* Make grandpa test a little bit more substantive

* Appease clippy

---------

Co-authored-by: gluwa-bot <[email protected]>
AdaJane pushed a commit that referenced this pull request Aug 14, 2023
* Add grandpa RPCs

* Enable warp sync

* Add BadBlocks to chain spec extensions

* Add PoS devnet chainspec

* Remove commented out line

* Appease version check

* Add grandpa RPC sanity integration test

* Auto-update creditcoin-js type definitions

* Make grandpa test a little bit more substantive

* Appease clippy

---------

Co-authored-by: gluwa-bot <[email protected]>
atodorov pushed a commit that referenced this pull request Aug 15, 2023
* Add grandpa RPCs

* Enable warp sync

* Add BadBlocks to chain spec extensions

* Add PoS devnet chainspec

* Remove commented out line

* Appease version check

* Add grandpa RPC sanity integration test

* Auto-update creditcoin-js type definitions

* Make grandpa test a little bit more substantive

* Appease clippy

---------

Co-authored-by: gluwa-bot <[email protected]>
zacharyfrederick pushed a commit that referenced this pull request Aug 16, 2023
* Add grandpa RPCs

* Enable warp sync

* Add BadBlocks to chain spec extensions

* Add PoS devnet chainspec

* Remove commented out line

* Appease version check

* Add grandpa RPC sanity integration test

* Auto-update creditcoin-js type definitions

* Make grandpa test a little bit more substantive

* Appease clippy

---------

Co-authored-by: gluwa-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants