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

feat: add ledger sync protocol #529

Merged
merged 30 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
36504f4
feat: add ledger sync protocol
bhgomes May 3, 2022
296b2cc
wip: add RPC interfaces for ledger pull
bhgomes May 4, 2022
792f66e
wip: add rpc to node
bhgomes May 5, 2022
b11e24b
wip: add rpc feature gating
bhgomes May 5, 2022
a262e1f
fix: replace back sp-runtime dependency
bhgomes May 5, 2022
408f11f
wip: split up runtime-api and rpc-api
bhgomes May 5, 2022
3c4ebdc
Merge branch 'manta' into feat/add-ledger-sync
bhgomes May 5, 2022
4deeb91
fix: use correct feature flags for runtime-api
bhgomes May 6, 2022
169a6ad
fix: use correct library name for manta-pay
bhgomes May 6, 2022
530c469
fix: import RPC-API trait
bhgomes May 6, 2022
dc8c9e5
feat: build RPC Builder abstraction for custom RPCs
bhgomes May 7, 2022
a82894c
feat: add custom Dolphin RPC
bhgomes May 7, 2022
13d6581
fix: use insertion-ordered void number StorageMap
bhgomes May 7, 2022
9f217c0
fix: use Pallet import
bhgomes May 7, 2022
3b8e2e0
chore: add CHANGELOG entry
bhgomes May 7, 2022
d16332f
chore: set default-run to the node binary
bhgomes May 7, 2022
67bbfbc
Merge branch 'manta' into feat/add-ledger-sync
bhgomes May 19, 2022
04bedc4
manual rpc test works (#566)
stechu May 26, 2022
eaa7bf1
Merge branch 'manta' into feat/add-ledger-sync
bhgomes May 27, 2022
dfbf11d
Merge branch 'manta' into feat/add-ledger-sync
bhgomes Jun 2, 2022
31804b7
Merge branch 'manta' into feat/add-ledger-sync
stechu Jun 6, 2022
59d1bc4
fix compilation
stechu Jun 7, 2022
6bd5669
refactor type names
stechu Jun 7, 2022
83ca560
update manta-rs and sdk
stechu Jun 7, 2022
983ff79
fix tests using patched manta-rs
stechu Jun 7, 2022
d747226
Merge branch 'manta' into feat/add-ledger-sync
stechu Jun 8, 2022
4ce08cc
update mannual test
stechu Jun 8, 2022
31fc4f2
address review comments
stechu Jun 8, 2022
480aabc
remove comment
stechu Jun 8, 2022
afa765b
pull -> pull_ledger_diff
stechu Jun 8, 2022
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
### Breaking changes

### Features
- [\#529](https://github.com/Manta-Network/Manta/pull/529) Add RPC for MantaPay to synchronize with latest ledger state

### Improvements
[\#481](https://github.com/Manta-Network/Manta/pull/481) Update upstream dependencies to v0.9.18.
Expand Down
147 changes: 123 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

[workspace]
resolver = "2"
members = [
Expand Down
4 changes: 3 additions & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ license = 'GPL-3.0'
name = 'manta'
repository = 'https://github.com/Manta-Network/Manta/'
version = '3.1.5'
default-run = "manta"

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
Expand Down Expand Up @@ -89,9 +90,10 @@ xcm = { git = "https://github.com/paritytech/polkadot.git", branch = "release-v0

# Self dependencies
calamari-runtime = { path = '../runtime/calamari' }
manta-runtime = { path = '../runtime/manta' }
dolphin-runtime = { path = '../runtime/dolphin' }
manta-primitives = { path = '../primitives' }
manta-runtime = { path = '../runtime/manta' }
pallet-manta-pay = { path = '../pallets/manta-pay', features = ["rpc", "runtime"] }

[build-dependencies]
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" }
Expand Down
3 changes: 1 addition & 2 deletions node/src/chain_specs/calamari.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

use super::*;
use crate::command::CALAMARI_PARACHAIN_ID;

use calamari_runtime::{CouncilConfig, DemocracyConfig, GenesisConfig, TechnicalCommitteeConfig};
use calamari_runtime::{CouncilConfig, DemocracyConfig, TechnicalCommitteeConfig};
use manta_primitives::helpers::{get_account_id_from_seed, get_collator_keys_from_seed};

/// Specialized `ChainSpec` for the normal parachain runtime.
Expand Down
5 changes: 1 addition & 4 deletions node/src/chain_specs/dolphin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

use super::*;
use crate::command::DOLPHIN_PARACHAIN_ID;

use dolphin_runtime::{
AssetManagerConfig, CouncilConfig, DemocracyConfig, GenesisConfig, TechnicalCommitteeConfig,
};
use dolphin_runtime::{CouncilConfig, DemocracyConfig, TechnicalCommitteeConfig};
stechu marked this conversation as resolved.
Show resolved Hide resolved
use manta_primitives::helpers::{get_account_id_from_seed, get_collator_keys_from_seed};

/// Specialized `ChainSpec` for the normal parachain runtime.
Expand Down
6 changes: 2 additions & 4 deletions node/src/chain_specs/manta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

use super::*;
use crate::command::MANTA_PARACHAIN_ID;

pub type MantaChainSpec = sc_service::GenericChainSpec<manta_runtime::GenesisConfig, Extensions>;
use manta_primitives::helpers::{get_account_id_from_seed, get_collator_keys_from_seed};

const MANTA_PROTOCOL_ID: &str = "manta"; // for p2p network configuration
Expand All @@ -29,6 +27,8 @@ const POLKADOT_RELAYCHAIN_MAIN_NET: &str = "polkadot";
/// The default XCM version to set in genesis config.
const SAFE_XCM_VERSION: u32 = 2;

pub type MantaChainSpec = sc_service::GenericChainSpec<manta_runtime::GenesisConfig, Extensions>;

/// Generate the manta session keys from individual elements.
///
/// The input must be a tuple of individual keys (a single arg for now since we have just one key).
Expand All @@ -48,7 +48,6 @@ pub fn manta_properties() -> Properties {
// manta chain spec
pub fn manta_development_config() -> MantaChainSpec {
let properties = manta_properties();

MantaChainSpec::from_genesis(
// Name
"Manta Parachain Development",
Expand Down Expand Up @@ -85,7 +84,6 @@ pub fn manta_development_config() -> MantaChainSpec {

pub fn manta_local_config() -> MantaChainSpec {
let properties = manta_properties();

MantaChainSpec::from_genesis(
// Name
"Manta Parachain Local",
Expand Down
Loading