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

Updates to SSL #31

Merged
merged 33 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3fdf7ea
Updates to SSL
Dec 18, 2023
711a098
Version update to 2.0.1
Dec 18, 2023
5b56f3f
SSL and Server Updates
Dec 18, 2023
8772b2c
RPC Update
Dec 18, 2023
338539e
Added SSL Cert from Header
Dec 19, 2023
9d29584
Fullnode Updates
Dec 21, 2023
ca14d89
Fullnode Ext Updates
Dec 21, 2023
1972ff4
Fullnode Ext Updates
Dec 22, 2023
7e06f2a
Fullnode Ext Updates
Dec 22, 2023
e3278bd
Fullnode API updates
Dec 22, 2023
3d72b2b
Fullnode API updates
Dec 22, 2023
80507d8
Fullnode API updates
Dec 23, 2023
73225b4
Typo Fix
Dec 23, 2023
5c9865b
Updated Mempool Items to conform with Chia
Dec 23, 2023
b8f46f8
Trimmed Invalid Body Responses
Dec 23, 2023
2949ec1
Changed Vec<u8> to unsizedbytes
Dec 23, 2023
de4ce2b
More Mempool Item fields
Dec 23, 2023
1789d82
Serde Update
Dec 23, 2023
192c3e1
Removed Additions and removals for test
Dec 23, 2023
80c3c6d
Changed Some strings to Bytes32
Dec 23, 2023
3a429dd
Added empty additions and removals
Dec 23, 2023
fea7b67
Dont clear handlers so they cna be reused
Dec 26, 2023
9dd9054
Removed some logging
Dec 26, 2023
8872759
SSL Updates, Protocol Updates, Support for Chip22 and Extended Protoc…
Jan 19, 2024
911b1d5
Clippy and format
Jan 19, 2024
f0a9c51
Updated to how mnemonics are loaded and small ssl change
Jan 19, 2024
cf51ff0
Mempool Updated, Websocket Updates, SSL Updates and added more tests
Jan 19, 2024
bab604b
Mempool Updated, Websocket Updates, SSL Updates and added more tests
Jan 19, 2024
c9723df
Merged with remote
Jan 20, 2024
086f8cc
Updated from winapi to windows-rs
Jan 20, 2024
fdb02e6
Readme updates, and more commands
Jan 23, 2024
be6b200
Readme updates, and more commands
Jan 23, 2024
be715b0
Updated Cargo.toml files
Jan 23, 2024
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
2 changes: 1 addition & 1 deletion bls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ authors = ["James Hoerr"]
description = "IN DEVELOPMENT - BLS12-381 Rust Implementation for dg_xch_utils"
license = "Apache-2.0"
homepage = "https://github.com/GalactechsLLC/dg_xch_utils"
repository = "https://github.com/GalactechsLLC/dg_xch_utils/bls"
repository = "https://github.com/GalactechsLLC/dg_xch_utils"
32 changes: 16 additions & 16 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "dg_xch_cli"
version = "2.0.0"
version = "2.0.1"
edition = "2021"
authors = ["James Hoerr"]
description = "CLI Utilities for the Chia Blockchain"
license = "Apache-2.0"
homepage = "https://github.com/GalactechsLLC/dg_xch_utils"
repository = "https://github.com/GalactechsLLC/dg_xch_utils/cli"
repository = "https://github.com/GalactechsLLC/dg_xch_utils"

[lib]
name = "dg_xch_cli"
Expand All @@ -17,24 +17,24 @@ name = "dg_xch_cli"
path = "src/main.rs"

[dependencies]
async-trait = "0.1.74"
async-trait = "0.1.77"
bip39 = {version= "2.0.0", features=["rand"] }
blst = "0.3.11"
clap = { version = "4.4.8", features = ["derive"] }
blst = { version = "0.3.11", features = ["portable"] }
clap = { version = "4.4.18", features = ["derive"] }
dashmap = "5.5.3"
dg_xch_clients = {path = "../clients", version="2.0.0"}
dg_xch_core = {path = "../core", version = "2.0.0", features = ["paperclip"] }
dg_xch_keys = {path = "../keys", version="2.0.0"}
dg_xch_pos = {path = "../proof_of_space", version="2.0.0"}
dg_xch_puzzles = {path = "../puzzles", version="2.0.0"}
dg_xch_serialize= {path = "../serialize", version="2.0.0"}
dg_xch_clients = {path = "../clients", version="2.0.1"}
dg_xch_core = {path = "../core", version = "2.0.1", features = ["paperclip"] }
dg_xch_keys = {path = "../keys", version="2.0.1"}
dg_xch_pos = {path = "../proof_of_space", version="2.0.1"}
dg_xch_puzzles = {path = "../puzzles", version="2.0.1"}
dg_xch_serialize= {path = "../serialize", version="2.0.1"}
hex = "0.4.3"
lazy_static = "1.4.0"
log = "0.4.20"
num-traits = "0.2.17"
rand = "0.8.5"
rayon = "1.8.0"
serde = "1.0.193"
serde_json = "1.0.108"
simple_logger = "4.3.0"
tokio = {version = "1.34.0", features=["rt-multi-thread", "sync", "signal", "macros", "process", "time", "fs", "net"]}
rayon = "1.8.1"
serde = "1.0.195"
serde_json = "1.0.111"
simple_logger = "4.3.3"
tokio = {version = "1.35.1", features=["rt-multi-thread", "sync", "signal", "macros", "process", "time", "fs", "net"]}
273 changes: 249 additions & 24 deletions cli/src/cli/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
use clap::{Parser, Subcommand};
use dg_xch_core::blockchain::sized_bytes::Bytes32;

#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
pub struct Cli {
#[arg(short, long, value_name = "Path to the chia ssl folder")]
pub ssl_path: Option<String>,
#[arg(short, long, value_name = "Timeout When Connecting to Fullnode")]
pub timeout: Option<u64>,

#[arg(long, value_name = "Fullnode Hostname")]
pub fullnode_host: Option<String>,
Expand All @@ -22,48 +25,270 @@ pub struct Cli {

#[derive(Debug, Subcommand)]
pub enum RootCommands {
#[command(about = "Gets coin records for a given address or puzzlehash", long_about = None)]
GetCoinRecord {
#[arg(short, long)]
puzzlehash: Option<String>,
#[arg(short, long)]
address: Option<String>,
#[arg(short, long)]
//START OF FULLNODE API
#[command(about = "Get the current BlockchainState", long_about = None)]
GetBlockchainState,
#[command(about = "Loads a FullBlock by header_hash", long_about = None)]
GetBlock {
#[arg(long)]
header_hash: Bytes32,
},
#[command(about = "Loads current BlockStateMetrics", long_about = None)]
GetBlockCountMetrics,
#[command(about = "Loads FullBlocks between start and end", long_about = None)]
GetBlocks {
#[arg(long)]
start: u32,
#[arg(long)]
end: u32,
#[arg(long)]
exclude_header_hash: bool,
#[arg(long)]
exclude_reorged: bool,
},
#[command(about = "Loads all FullBlocks between start and end", long_about = None)]
GetAllBlocks {
#[arg(long)]
start: u32,
#[arg(long)]
end: u32,
},
#[command(about = "Loads a BlockRecord by header_hash", long_about = None)]
GetBlockRecord {
#[arg(long)]
header_hash: Bytes32,
},
#[command(about = "Loads a BlockRecord by height", long_about = None)]
GetBlockRecordByHeight {
#[arg(long)]
height: u32,
},
#[command(about = "Loads all BlockRecords between start and end", long_about = None)]
GetBlockRecords {
#[arg(long)]
start: u32,
#[arg(long)]
end: u32,
},
#[command(about = "Loads UnfinishedBlocks", long_about = None)]
GetUnfinishedBlocks,
#[command(about = "Get Est network Space between two header_hashes", long_about = None)]
GetNetworkSpace {
#[arg(long)]
older_block_header_hash: Bytes32,
#[arg(long)]
newer_block_header_hash: Bytes32,
},
#[command(about = "Get Est network Space between two heights", long_about = None)]
GetNetworkSpaceaByHeight {
#[arg(long)]
start: u32,
#[arg(long)]
end: u32,
},
#[command(about = "Get additions and removals by header_hash", long_about = None)]
GetAdditionsAndRemovals {
#[arg(long)]
header_hash: Bytes32,
},
#[command(about = "Loads InitialFreezePeriod", long_about = None)]
GetInitialFreezePeriod,
#[command(about = "Loads InitialFreezePeriod", long_about = None)]
GetNetworkInfo,
#[command(about = "Get SignagePoint or End Of Subslot, Only Provide one of sp_hash or challenge_hash", long_about = None)]
GetSignagePointOrEOS {
#[arg(long)]
sp_hash: Option<Bytes32>,
#[arg(long)]
challenge_hash: Option<Bytes32>,
},
#[command(about = "Get CoinRecords by puzzle_hashs", long_about = None)]
GetCoinRecords {
#[arg(long)]
puzzle_hashes: Vec<Bytes32>,
#[arg(long)]
include_spent_coins: Option<bool>,
#[arg(long)]
start_height: Option<u32>,
#[arg(long)]
end_height: Option<u32>,
},
#[command(about = "Get CoinRecord by name", long_about = None)]
GetCoinRecordByName {
#[arg(long)]
name: Bytes32,
},
#[command(about = "Get CoinRecords by names", long_about = None)]
GetCoinRecordsByNames {
#[arg(long)]
names: Vec<Bytes32>,
#[arg(long)]
include_spent_coins: bool,
#[arg(long)]
start_height: u32,
#[arg(long)]
end_height: u32,
},
#[command(about = "Get CoinRecords by parent ids", long_about = None)]
GetCoinRecordsByParentIds {
#[arg(long)]
parent_ids: Vec<Bytes32>,
#[arg(long)]
include_spent_coins: bool,
#[arg(long)]
start_height: u32,
#[arg(long)]
end_height: u32,
},
#[command(about = "Get CoinRecords by hint", long_about = None)]
GetCoinRecordsByhint {
#[arg(long)]
hint: Bytes32,
#[arg(long)]
include_spent_coins: bool,
#[arg(long)]
start_height: u32,
#[arg(long)]
end_height: u32,
},
#[command(about = "Get CoinSpend for coin_id at height", long_about = None)]
GetPuzzleAndSolution {
#[arg(long)]
coin_id: Bytes32,
#[arg(long)]
height: u32,
},
#[command(about = "Get CoinSpend for coin_id at height", long_about = None)]
GetCoinSpend {
#[arg(long)]
coin_id: Bytes32,
#[arg(long)]
height: u32,
},
#[command(about = "Loads All Mempool Transaction Ids", long_about = None)]
GetAllMempoolTxIds,
#[command(about = "Loads All Mempool Items", long_about = None)]
GetAllMempoolItems,
#[command(about = "Get MempoolItem with TxID", long_about = None)]
GetMempoolItemByTxID {
#[arg(long)]
tx_id: String,
},
#[command(about = "Get MempoolItem by name", long_about = None)]
GetMempoolItemByName {
#[arg(long)]
coin_name: Bytes32,
},
#[command(about = "Get MempoolItem by name", long_about = None)]
GetFeeEstimate {
#[arg(long)]
cost: Option<u64>,
#[arg(long)]
target_times: Vec<u64>,
},
//END FULLNODE API
//START EXTENDED FULLNODEAPI
#[command(about = "Get Singleton by LauncherID", long_about = None)]
GetSingletonByLauncherId {
#[arg(long)]
launcher_id: Bytes32,
},
#[command(about = "Get additions and removals with hints by header_hash", long_about = None)]
GetAdditionsAndRemovalsWithHints {
#[arg(long)]
header_hash: Bytes32,
},
#[command(about = "Get CoinRecords by hint", long_about = None)]
GetCoinRecordsByHints {
#[arg(long)]
hints: Vec<Bytes32>,
#[arg(long)]
include_spent_coins: bool,
#[arg(long)]
start_height: u32,
#[arg(long)]
end_height: u32,
},
#[command(about = "Get CoinRecords by hint", long_about = None)]
GetCoinRecordsByHintsPaginated {
#[arg(long)]
hints: Vec<Bytes32>,
#[arg(long)]
include_spent_coins: Option<bool>,
#[arg(long)]
start_height: Option<u32>,
#[arg(long)]
end_height: Option<u32>,
#[arg(long)]
page_size: u32,
#[arg(long)]
last_id: Option<Bytes32>,
},
#[command(about = "Get CoinRecords by hint", long_about = None)]
GetCoinRecordsByPuzzleHashesPaginated {
#[arg(long)]
puzzle_hashes: Vec<Bytes32>,
#[arg(long)]
include_spent_coins: Option<bool>,
#[arg(long)]
start_height: Option<u32>,
#[arg(long)]
end_height: Option<u32>,
#[arg(long)]
page_size: u32,
#[arg(long)]
last_id: Option<Bytes32>,
},
#[command(about = "Get Hints by CoinIds", long_about = None)]
GetHintsByCoinIds {
#[arg(long)]
coin_ids: Vec<Bytes32>,
},
#[command(about = "Get Hints by CoinIds", long_about = None)]
GetPuzzleAndSoultionsByNames {
#[arg(long)]
names: Vec<Bytes32>,
#[arg(long)]
include_spent_coins: Option<bool>,
#[arg(long)]
start_height: Option<u32>,
#[arg(long)]
end_height: Option<u32>,
},
//END EXTENDED FULLNODE API
#[command(about = "Migrates a PlotNFT using a mnemonic", long_about = None)]
MovePlotNFT {
#[arg(short, long)]
#[arg(long)]
target_pool: String,
#[arg(short, long)]
launcher_id: String,
#[arg(short, long)]
#[arg(long)]
launcher_id: Bytes32,
#[arg(long)]
mnemonic: String,
#[arg(short, long)]
#[arg(long)]
fee: Option<u64>,
},
#[command(about = "Migrates a PlotNFT using an owner_secrey_key", long_about = None)]
MovePlotNFTWithOwnerKey {
#[arg(short, long)]
#[arg(long)]
target_pool: String,
#[arg(short, long)]
launcher_id: String,
#[arg(short, long)]
#[arg(long)]
launcher_id: Bytes32,
#[arg(long)]
owner_key: String,
},
#[command(about = "Gets plotnft state for launcher_id", long_about = None)]
GetPlotnftState {
#[arg(short, long)]
launcher_id: String,
#[arg(long)]
launcher_id: Bytes32,
},
#[command(about = "Create Login link for Pool", long_about = None)]
CreatePoolLoginLink {
#[arg(short, long)]
#[arg(long)]
target_pool: String,
#[arg(short, long, num_args = 1.., value_delimiter = ',')]
launcher_ids: Vec<String>,
#[arg(short, long, num_args = 1.., value_delimiter = ',')]
auth_keys: Vec<String>,
#[arg(long, num_args = 1.., value_delimiter = ',')]
launcher_ids: Vec<Bytes32>,
#[arg(long, num_args = 1.., value_delimiter = ',')]
auth_keys: Vec<Bytes32>,
},
#[command(about = "Create a cold wallet or a PlotNFT wallet", long_about = None)]
CreateWallet {
Expand All @@ -76,7 +301,7 @@ pub enum RootCommands {
pub enum WalletAction {
#[command(about = "Creates a wallet with a plotnft", long_about = None)]
WithNFT {
#[arg(short, long)]
#[arg(long)]
pool_url: Option<String>,
faucet_request_url: Option<String>,
faucet_request_payload: Option<String>,
Expand Down
Loading