How to start a MetaChain
server for debug?
#191
-
I have complete a temporary implement to update the
I has read the source code, I think it should be the format as follow: #[derive(Serialize, Deserialize)]
pub struct MinerConfig {
pub coinbase: ObjectId,
pub interval: u32,
pub bfc_spv_node: String,
pub chain_type: Option<String>,
pub bft_port: Option<u16>,
pub bft_node_list: Option<Vec<String>>,
pub miner_key_path: Option<String>,
pub stat: Option<StatConfig>,
} but, I don't known what does these fields mean, and how can I initialize them. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Compile the required binariesUse the following command to compile the binaries needed to run the meta chain
Generate Genesis blocks
{
"chain_type": "standalone",
"coinbase": "5aSixgLzAmyR5QbQibWFkrkNbBLagfawmK3pbdaYqyt6",
"interval": 10,
"bfc_spv_node": "http://127.0.0.1:11998",
"coins": [
{
"coin_id": 0,
"pre_balance": [["5aSixgLzAmyR5QbQibWFkrkNbBLagfawmK3pbdaYqyt6", 3000000000000]]
}
],
"price": {}
}
Run the chain node
{
"coinbase": "5aSixgLzAmyR5QbQibWFkrkNbBLagfawmK3pbdaYqyt6",
"interval": 10,
"bfc_spv_node": "http://127.0.0.1:11998",
"stat": {
"memory_stat": true,
"storage": {
"sqlite": {
"path": "stat.db"
}
}
}
} where coinbase, interval, bfc_spv_node fields have the same meaning as above
Put this file in the Genesis block file directory Interact with the protocol stack and toolsThe local configuration host: "127.0.0.1 nightly.meta.cyfs.com" will allow the nightly version of the stack and tools to interact with the local chain by default |
Beta Was this translation helpful? Give feedback.
Compile the required binaries
Use the following command to compile the binaries needed to run the meta chain
cargo build -p cyfs-meta-genesis
Compile the meta chain genesis block creation tool
cargo build -p cyfs-meta-miner
Compile meta chain nodes
cargo build -p cyfs-meta-spv
Optionally, compile the official spv node of the meta chain. cyfs-ts-sdk depends on this service for some interfaces of the MetaChian class. the CYFS stack does not depend on this service
Generate Genesis blocks