forked from paritytech/substrate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/follow node (paritytech#155)
* refactor for multisig remove doublemap for multisig * Feature/linked node (paritytech#79) provide linked node data struct for runtime module storage this linked node support option data or no option data * provide linkednode struct in cxsupport * refactor linked node * add option for LinkedNode * refactor linkednode remove template mode, use associate type to replace it * Fix static net address (paritytech#80) * Feature/linked_node provide multinodexindex (paritytech#82) provide multinodexindex * fix bug for linked_node when add same index node, do nothing for this node * refactor financialrecords to support withdraw cache refactor financialrecords to support withdraw cache and remove deposit fee * btc bridge * rename num/hash relationship data (NumberForHash/HashsForNumber) * let HashsForNumber map to a vec to get all forked block * add blocknumber in BlockHeaderFor * tokenbalances refactor tokenbalances to support issue token in genesis * reject issue chainx token and provide u32, usize as for tokenbalance * Perfect deposit (paritytech#83) * Add deposit cache * Perfect deposit * Perfect withdraw (paritytech#84) * Perfect withdraw * add network check in btc bridge * when meet testnet, jump header bit check * check the bit change block in genesis * Fix test build * Feature/refactor match (paritytech#86) * matchorder and pendingorders * Fix op_return account id parse * tokenbalances: provide reserved type for reservedtoken * Fix merge error * update genesis_config * Update genesis_config * x-btc * provide codec for btreemap due to orphan for mod, use local struct named `CodecBTreeMap` * Update latest bitcoin-rust dependeces * Implement initial vote weight via coin age (paritytech#87) * Use struct instead of map as much as possible * Unchecked initial version * All intentions except these validators are candidates * Add harsh test * Put candidates into stats * Rename unstake to deactive * Revert StakeWeight * Remove useless code * Remove MAX_INTENTIONS * Refactor with btreemap (paritytech#88) * Refactor NominationRecordsOf to NominationRecords using BTreeMap * Remove candidate_count * Rename deactive to deactivate * optimization match (paritytech#89) * remove ensureaccountliquid in tokenbalances and support for ensureaccountliquied has changed in staking module * Hotfix/fix stakeweight type (paritytech#90) * Revert StakeWeight type * Change Balance to u64 * Fix total_minted and remove valid_cands_weight * Fix insert registration information failure (paritytech#91) * Change receive_address type * Update exterbn * update secp256k1 dependency (paritytech#94) * Fix receive_address bug * Support new substrate in cxrml * update rust-secp256k1 dependeces * Runtime build ok * Build ok * New runtime interface * Update all runtime module * Runtime build ok * All build ok * Add node runtime to support chainx runtime * Update new runtime
- Loading branch information
Showing
69 changed files
with
5,311 additions
and
5,879 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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,35 @@ | ||
[package] | ||
name = "chainx-cli" | ||
version = "0.1.0" | ||
description = "ChainX node implementation in Rust." | ||
|
||
[dependencies] | ||
log = "0.4" | ||
tokio = "0.1.7" | ||
exit-future = "0.1" | ||
substrate-cli = { git = "https://github.com/chainpool/substrate" } | ||
parity-codec = { version = "2.1" } | ||
base58 = "0.1" | ||
slog = "^2" | ||
sr-io = { git = "https://github.com/chainpool/substrate" } | ||
substrate-client = { git = "https://github.com/chainpool/substrate" } | ||
substrate-primitives = { git = "https://github.com/chainpool/substrate" } | ||
chainx-runtime = { path = "../runtime" } | ||
chainx-primitives = { path = "../primitives" } | ||
hex-literal = "0.1" | ||
substrate-service = { git = "https://github.com/chainpool/substrate" } | ||
substrate-transaction-pool = { git = "https://github.com/chainpool/substrate" } | ||
substrate-network = { git = "https://github.com/chainpool/substrate" } | ||
substrate-consensus-aura = { git = "https://github.com/chainpool/substrate" } | ||
substrate-finality-grandpa = { git = "https://github.com/chainpool/substrate" } | ||
substrate-keyring = { git = "https://github.com/chainpool/substrate" } | ||
#cxrml-tokenbalances = { path = "../cxrml/tokenbalances" } | ||
sr-primitives = { git = "https://github.com/chainpool/substrate" } | ||
chainx-executor = { path = "../executor" } | ||
primitives = { git = "https://github.com/chainx-org/bitcoin-rust" } | ||
chain = { git = "https://github.com/chainx-org/bitcoin-rust" } | ||
keys = { git = "https://github.com/chainx-org/bitcoin-rust" } | ||
structopt = "0.2.13" | ||
|
||
[dev-dependencies] | ||
substrate-service-test = { git = "https://github.com/chainpool/substrate" } |
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,47 @@ | ||
use chainx_runtime::GenesisConfig; | ||
use substrate_service; | ||
use genesis_config::{testnet_genesis, GenesisSpec}; | ||
|
||
const STAGING_TELEMETRY_URL: &str = "ws://stats.chainx.org/submit/"; | ||
|
||
/// Specialised `ChainSpec`. | ||
pub type ChainSpec = substrate_service::ChainSpec<GenesisConfig>; | ||
|
||
/// Staging testnet config. | ||
pub fn staging_testnet_config() -> ChainSpec { | ||
let boot_nodes = vec![ | ||
]; | ||
ChainSpec::from_genesis( | ||
"Staging Testnet", | ||
"staging_testnet", | ||
staging_testnet_config_genesis, | ||
boot_nodes, | ||
Some(STAGING_TELEMETRY_URL.into()), | ||
None, | ||
None, | ||
None, | ||
) | ||
} | ||
|
||
fn staging_testnet_config_genesis() -> GenesisConfig { | ||
testnet_genesis(GenesisSpec::Multi) | ||
} | ||
|
||
fn development_config_genesis() -> GenesisConfig { | ||
testnet_genesis(GenesisSpec::Dev) | ||
} | ||
|
||
/// Development config (single validator Alice) | ||
pub fn development_config() -> ChainSpec { | ||
ChainSpec::from_genesis("Development", "development", development_config_genesis, vec![], None, None, None, None) | ||
} | ||
|
||
fn local_testnet_genesis() -> GenesisConfig { | ||
testnet_genesis(GenesisSpec::Local) | ||
} | ||
|
||
/// Local testnet config (multivalidator Alice + Bob) | ||
pub fn local_testnet_config() -> ChainSpec { | ||
ChainSpec::from_genesis("Local Testnet", "local_testnet", local_testnet_genesis, vec![], None, None, None, None) | ||
} | ||
|
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,12 @@ | ||
name: substrate-node | ||
author: "Parity Team <[email protected]>" | ||
about: Substrate Node Rust Implementation | ||
args: | ||
- log: | ||
short: l | ||
value_name: LOG_PATTERN | ||
help: Sets a custom logging | ||
takes_value: true | ||
subcommands: | ||
- validator: | ||
about: Run validator node |
Oops, something went wrong.