-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Misc PoS cleanup and improvements (#1207)
* 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]>
- Loading branch information
Showing
16 changed files
with
289 additions
and
53 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ members = [ | |
resolver = "2" | ||
|
||
[workspace.package] | ||
version = '2.225.0' | ||
version = '2.225.1' | ||
authors = ['Gluwa Inc.', 'Nathan Whitaker <[email protected]>'] | ||
edition = '2021' | ||
license = 'Unlicense' | ||
|
@@ -133,6 +133,7 @@ sp-keyring = { branch = "pos-keep-history-polkadot-v0.9.41", git = "https://gith | |
sc-consensus-babe = { branch = "pos-keep-history-polkadot-v0.9.41", git = "https://github.com/gluwa/substrate.git" } | ||
sp-consensus-babe = { branch = "pos-keep-history-polkadot-v0.9.41", git = "https://github.com/gluwa/substrate.git", default-features = false } | ||
sc-consensus-grandpa = { branch = "pos-keep-history-polkadot-v0.9.41", git = "https://github.com/gluwa/substrate.git" } | ||
sc-consensus-grandpa-rpc = { branch = "pos-keep-history-polkadot-v0.9.41", git = "https://github.com/gluwa/substrate.git" } | ||
sp-consensus-grandpa = { branch = "pos-keep-history-polkadot-v0.9.41", git = "https://github.com/gluwa/substrate.git", default-features = false } | ||
pallet-babe = { branch = "pos-keep-history-polkadot-v0.9.41", git = "https://github.com/gluwa/substrate.git", default-features = false } | ||
pallet-grandpa = { branch = "pos-keep-history-polkadot-v0.9.41", git = "https://github.com/gluwa/substrate.git", default-features = false } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2022 Gluwa, Inc. & contributors | ||
// SPDX-License-Identifier: The Unlicense | ||
|
||
import { ApiPromise, WsProvider } from 'creditcoin-js'; | ||
|
||
describe('Grandpa RPC sanity test', (): void => { | ||
let api: ApiPromise; | ||
|
||
beforeEach(async () => { | ||
const provider = new WsProvider((global as any).CREDITCOIN_API_URL); | ||
|
||
api = await ApiPromise.create({ provider }); | ||
}); | ||
|
||
afterEach(async () => { | ||
await api.disconnect(); | ||
}); | ||
|
||
it('rpc.grandpa.roundState() works', async (): Promise<void> => { | ||
const result = await api.rpc.grandpa.roundState(); | ||
expect(result.best.round.toNumber()).toBeGreaterThanOrEqual(0); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.