Skip to content

Commit

Permalink
name change from Hedgeware, hedgeware, HEDG, HDG with Kabocha, kaboch…
Browse files Browse the repository at this point in the history
…a, KAB
  • Loading branch information
ramseykes committed Jul 7, 2021
1 parent a2fca8d commit 9acd4c7
Show file tree
Hide file tree
Showing 40 changed files with 183 additions and 183 deletions.
22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "hedgeware-collator"
name = "kabocha-collator"
version = "0.1.0"
authors = ["Parity Technologies <[email protected]>"]
build = "build.rs"
edition = "2018"

[[bin]]
name = "hedgeware-collator"
name = "kabocha-collator"
path = "src/main.rs"

[dependencies]
Expand All @@ -24,8 +24,8 @@ hex-literal = "0.2.1"
tokio = { version = "0.2.13", features = ["macros", "sync"] }

# Parachain dependencies
hedgeware-parachain-runtime = { package = "parachain-runtime", path = "runtime" }
hedgeware-parachain-primitives = { path = "primitives" }
kabocha-parachain-runtime = { package = "parachain-runtime", path = "runtime" }
kabocha-parachain-primitives = { path = "primitives" }

# Substrate dependencies
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.7" }
Expand Down Expand Up @@ -84,13 +84,13 @@ polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "r
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.7" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.7" }

# Hedgeware
cli_opt = { package = "hedgeware-cli-opt", path = "./cli-opt" }
hedgeware-rpc-txpool = { path = "./client/rpc/txpool" }
hedgeware-rpc-primitives-txpool = { path = "./rpc-primitives/txpool" }
hedgeware-rpc-debug = { path = "./client/rpc/debug" }
hedgeware-rpc-primitives-debug = { path = "./rpc-primitives/debug" }
hedgeware-rpc-trace = { path = "./client/rpc/trace" }
# Kabocha
cli_opt = { package = "kabocha-cli-opt", path = "./cli-opt" }
kabocha-rpc-txpool = { path = "./client/rpc/txpool" }
kabocha-rpc-primitives-txpool = { path = "./rpc-primitives/txpool" }
kabocha-rpc-debug = { path = "./client/rpc/debug" }
kabocha-rpc-primitives-debug = { path = "./rpc-primitives/debug" }
kabocha-rpc-trace = { path = "./client/rpc/trace" }

# Frontier
ethereum = { package = "pallet-ethereum", git = "https://github.com/edgeware-network/frontier", branch = "polkadot-v0.9.7" }
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ Frontier EVM and its relevant RPCs are still quite far behind in Substrate. They
1. Create a fork of Frontier or use [@edgeware-network/frontier](https://github.com/edgeware-network/frontier) as a starting point.
2. Update the references to the relevant `polkadot-v0.9.X` of Substrate (note here we only need to update Substrate branches).
3. Push the fork.
4. Update the Hedgeware Frontier dependencies to the right fork.
4. Update the Kabocha Frontier dependencies to the right fork.
5. Rebuild and fix errors as they arise.

# Build & generate the local parachain specs
Ensure you have all relevant dependencies for building the repo. The latest work so far is pegged to `polkadot-v0.9.7` and `release-v0.9.7` branches of Substrate, Cumulus, and Polkadot respectively.
```
cargo build --release
./target/release/hedgeware-collator build-spec --chain=hedgeware-config > hedgeware.json
./target/release/hedgeware-collator build-spec --chain=hedgeware.json --raw > hedgeware.chainspec.json
./target/release/hedgeware-collator export-genesis-wasm --chain=hedgeware.chainspec.json > genesis-wasm
./target/release/hedgeware-collator export-genesis-state --chain=hedgeware.chainspec.json --parachain-id 2000 > genesis-state
./target/release/kabocha-collator build-spec --chain=kabocha-config > kabocha.json
./target/release/kabocha-collator build-spec --chain=kabocha.json --raw > kabocha.chainspec.json
./target/release/kabocha-collator export-genesis-wasm --chain=kabocha.chainspec.json > genesis-wasm
./target/release/kabocha-collator export-genesis-state --chain=kabocha.chainspec.json --parachain-id 2000 > genesis-state
```
Optionally, for faster setup you can run:
```
Expand All @@ -43,16 +43,16 @@ cargo build --release
To run against your local chainspec:
```
# Run vanilla execution (requires having keys set through separate means)
./target/release/hedgeware-collator --collator --chain=hedgeware.chainspec.json
./target/release/kabocha-collator --collator --chain=kabocha.chainspec.json
# Execute as Alice (default aura collator)
./target/release/hedgeware-collator --alice --collator --chain=hedgeware.chainspec.json
./target/release/kabocha-collator --alice --collator --chain=kabocha.chainspec.json
# Execute as Bob (default aura collator)
./target/release/hedgeware-collator --bob --collator --chain=hedgeware.chainspec.json
./target/release/kabocha-collator --bob --collator --chain=kabocha.chainspec.json
# If running with 1 collator
./target/release/hedgeware-collator --alice --collator --chain=hedgeware.chainspec.json --force-authoring
./target/release/kabocha-collator --alice --collator --chain=kabocha.chainspec.json --force-authoring
```

# Using against a local relay chain
Expand All @@ -74,16 +74,16 @@ cargo build --release
./target/release/polkadot build-spec --chain=./roc-local.json --disable-default-bootnode --raw > roc-local-raw.json
# generate the collator chainspec
./target/release/hedgeware-collator build-spec --chain hedgeware-config --disable-default-bootnode > hedgeware-local.json
./target/release/kabocha-collator build-spec --chain kabocha-config --disable-default-bootnode > kabocha-local.json
# run the parachain with only `--node-key <key>` param and note the peer ID.
# "/ip4/127.0.0.1/tcp/30333/p2p/<peer ID>"
# modify the hedgeware-local.json file, bootnodes param with the appropriate IP and peer ID:
./target/release/hedgeware-collator build-spec --chain=./hedgeware-local.json --disable-default-bootnode --raw > hedgeware-local.chainspec.json
# modify the kabocha-local.json file, bootnodes param with the appropriate IP and peer ID:
./target/release/kabocha-collator build-spec --chain=./kabocha-local.json --disable-default-bootnode --raw > kabocha-local.chainspec.json
# generate the collator genesis configs
./target/release/hedgeware-collator export-genesis-state --chain=./hedgeware-local.chainspec.json --parachain-id 2000 > genesis-state-2000
./target/release/hedgeware-collator export-genesis-wasm --chain=./hedgeware-local.chainspec.json > genesis-code-2000
./target/release/kabocha-collator export-genesis-state --chain=./kabocha-local.chainspec.json --parachain-id 2000 > genesis-state-2000
./target/release/kabocha-collator export-genesis-wasm --chain=./kabocha-local.chainspec.json > genesis-code-2000
```

Expand All @@ -94,15 +94,15 @@ cargo build --release
# Before generating the spec, reserve the paraID on rococo and modify para ID params to the appropriate para ID.
# generate the spec
./target/release/hedgeware-collator build-spec --chain=hedgeware-config --disable-default-bootnode > hedgeware-rococo.json
./target/release/hedgeware-collator build-spec --chain=./res/hedgeware-rococo.json --disable-default-bootnode --raw > ./res/hedgeware-rococo.chainspec.json
./target/release/kabocha-collator build-spec --chain=kabocha-config --disable-default-bootnode > kabocha-rococo.json
./target/release/kabocha-collator build-spec --chain=./res/kabocha-rococo.json --disable-default-bootnode --raw > ./res/kabocha-rococo.chainspec.json
# generate the genesis
./target/release/hedgeware-collator export-genesis-state --chain=./res/hedgeware-rococo.chainspec.json --parachain-id <paraID> > rococo-state
./target/release/hedgeware-collator export-genesis-wasm --chain=./res/hedgeware-rococo.chainspec.json > rococo-code
./target/release/kabocha-collator export-genesis-state --chain=./res/kabocha-rococo.chainspec.json --parachain-id <paraID> > rococo-state
./target/release/kabocha-collator export-genesis-wasm --chain=./res/kabocha-rococo.chainspec.json > rococo-code
# Run the collator
./target/release/hedgeware-collator --collator -d /tmp/parachain --node-key <key> --force-authoring --ws-port 9944 --rpc-cors all --parachain-id <rococo-paraID> --port=30333 --chain=./res/hedgeware-rococo.chainspec.json --alice -- --execution wasm --chain rococo -d ~/perm/rococo --port=30334 --ws-port 9945
./target/release/kabocha-collator --collator -d /tmp/parachain --node-key <key> --force-authoring --ws-port 9944 --rpc-cors all --parachain-id <rococo-paraID> --port=30333 --chain=./res/kabocha-rococo.chainspec.json --alice -- --execution wasm --chain rococo -d ~/perm/rococo --port=30334 --ws-port 9945
```

# Register the parachain in the local setup
Expand Down
2 changes: 1 addition & 1 deletion cli-opt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = 'hedgeware-cli-opt'
name = 'kabocha-cli-opt'
homepage = 'https://moonbeam.network'
license = 'GPL-3.0-only'
version = '0.8.0-dev'
Expand Down
4 changes: 2 additions & 2 deletions client/rpc-core/debug/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "hedgeware-rpc-core-debug"
name = "kabocha-rpc-core-debug"
version = '0.1.0'
authors = ['PureStake']
edition = '2018'
Expand All @@ -18,4 +18,4 @@ jsonrpc-derive = "14.0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
hedgeware-rpc-primitives-debug = { path = "../../../rpc-primitives/debug" }
kabocha-rpc-primitives-debug = { path = "../../../rpc-primitives/debug" }
2 changes: 1 addition & 1 deletion client/rpc-core/debug/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use serde::Deserialize;

pub use rpc_impl_Debug::gen_server::Debug as DebugServer;
pub mod types {
pub use hedgeware_rpc_primitives_debug::single;
pub use kabocha_rpc_primitives_debug::single;
}

use crate::types::single;
Expand Down
4 changes: 2 additions & 2 deletions client/rpc-core/trace/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "hedgeware-rpc-core-trace"
name = "kabocha-rpc-core-trace"
version = '0.6.0'
authors = ['PureStake']
edition = '2018'
Expand All @@ -15,4 +15,4 @@ jsonrpc-derive = "14.0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
futures = { version = "0.3.1", features = ["compat"] }
hedgeware-rpc-primitives-debug = { path = "../../../rpc-primitives/debug" }
kabocha-rpc-primitives-debug = { path = "../../../rpc-primitives/debug" }
2 changes: 1 addition & 1 deletion client/rpc-core/trace/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use ethereum_types::H160;
use futures::{compat::Compat, future::BoxFuture};
use jsonrpc_derive::rpc;
pub use hedgeware_rpc_primitives_debug::block::TransactionTrace;
pub use kabocha_rpc_primitives_debug::block::TransactionTrace;
use serde::{de::Error, Deserialize, Deserializer};

pub use rpc_impl_Trace::gen_server::Trace as TraceServer;
Expand Down
2 changes: 1 addition & 1 deletion client/rpc-core/txpool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "hedgeware-rpc-core-txpool"
name = "kabocha-rpc-core-txpool"
version = '0.6.0'
authors = ['PureStake']
edition = '2018'
Expand Down
6 changes: 3 additions & 3 deletions client/rpc/debug/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "hedgeware-rpc-debug"
name = "kabocha-rpc-debug"
version = '0.1.0'
authors = ['PureStake']
edition = '2018'
Expand All @@ -23,8 +23,8 @@ sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sp-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }

hedgeware-rpc-core-debug = { path = "../../rpc-core/debug" }
hedgeware-rpc-primitives-debug = { path = "../../../rpc-primitives/debug" }
kabocha-rpc-core-debug = { path = "../../rpc-core/debug" }
kabocha-rpc-primitives-debug = { path = "../../../rpc-primitives/debug" }
fc-consensus = { git = "https://github.com/edgeware-network/frontier", branch = "polkadot-v0.9.7" }
fc-db = { git = "https://github.com/edgeware-network/frontier", branch = "polkadot-v0.9.7" }
fc-rpc = { git = "https://github.com/edgeware-network/frontier", branch = "polkadot-v0.9.7" }
Expand Down
4 changes: 2 additions & 2 deletions client/rpc/debug/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use futures::{
FutureExt, SinkExt, StreamExt,
};
use jsonrpc_core::Result as RpcResult;
pub use hedgeware_rpc_core_debug::{Debug as DebugT, DebugServer, TraceParams};
pub use kabocha_rpc_core_debug::{Debug as DebugT, DebugServer, TraceParams};

use tokio::{
self,
Expand All @@ -29,7 +29,7 @@ use tokio::{
use ethereum_types::{H128, H256};
use fc_rpc::{frontier_backend_client, internal_err};
use fp_rpc::EthereumRuntimeRPCApi;
use hedgeware_rpc_primitives_debug::{single, DebugRuntimeApi};
use kabocha_rpc_primitives_debug::{single, DebugRuntimeApi};
use sc_client_api::backend::Backend;
use sp_api::{BlockId, HeaderT, ProvideRuntimeApi};
use sp_block_builder::BlockBuilder;
Expand Down
6 changes: 3 additions & 3 deletions client/rpc/trace/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "hedgeware-rpc-trace"
name = "kabocha-rpc-trace"
version = '0.6.0'
authors = ['PureStake']
edition = '2018'
Expand Down Expand Up @@ -29,7 +29,7 @@ sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polk
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
fp-rpc = { git = "https://github.com/edgeware-network/frontier", branch = "polkadot-v0.9.7" }
hedgeware-rpc-primitives-debug = { path = "../../../rpc-primitives/debug" }
kabocha-rpc-primitives-debug = { path = "../../../rpc-primitives/debug" }

# Client and RPC
jsonrpc-core = "15.0.0"
Expand All @@ -39,4 +39,4 @@ sc-transaction-graph = {git = "https://github.com/paritytech/substrate", branch
fc-rpc = { git = "https://github.com/edgeware-network/frontier", branch = "polkadot-v0.9.7" }
fc-consensus = { git = "https://github.com/edgeware-network/frontier", branch = "polkadot-v0.9.7" }
fc-rpc-core = { git = "https://github.com/edgeware-network/frontier", branch = "polkadot-v0.9.7" }
hedgeware-rpc-core-trace = { path = "../../rpc-core/trace" }
kabocha-rpc-core-trace = { path = "../../rpc-core/trace" }
4 changes: 2 additions & 2 deletions client/rpc/trace/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ use ethereum_types::H256;
use fc_rpc::internal_err;
use fp_rpc::EthereumRuntimeRPCApi;

pub use hedgeware_rpc_core_trace::{
pub use kabocha_rpc_core_trace::{
FilterRequest, RequestBlockId, RequestBlockTag, Trace as TraceT, TraceServer, TransactionTrace,
};
use hedgeware_rpc_primitives_debug::{block, DebugRuntimeApi};
use kabocha_rpc_primitives_debug::{block, DebugRuntimeApi};

/// RPC handler. Will communicate with a `CacheTask` through a `CacheRequester`.
pub struct Trace<B, C> {
Expand Down
6 changes: 3 additions & 3 deletions client/rpc/txpool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "hedgeware-rpc-txpool"
name = "kabocha-rpc-txpool"
version = '0.6.0'
authors = ['PureStake']
edition = '2018'
Expand All @@ -12,7 +12,7 @@ sha3 = "0.8"
jsonrpc-core = "15.0.0"
ethereum-types = "0.11.0"
ethereum = { version = "0.7.1", default-features = false, features = ["with-codec"] }
hedgeware-rpc-core-txpool = { path = "../../rpc-core/txpool" }
kabocha-rpc-core-txpool = { path = "../../rpc-core/txpool" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
Expand All @@ -23,5 +23,5 @@ sc-transaction-graph = { git = "https://github.com/paritytech/substrate", branch
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
serde = { version = "1.0", features = ["derive"] }

hedgeware-rpc-primitives-txpool = { path = "../../../rpc-primitives/txpool" }
kabocha-rpc-primitives-txpool = { path = "../../../rpc-primitives/txpool" }
fc-rpc = { git = "https://github.com/edgeware-network/frontier", branch = "polkadot-v0.9.7" }
4 changes: 2 additions & 2 deletions client/rpc/txpool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use ethereum::TransactionMessage;
use ethereum_types::{H160, H256, U256};
use fc_rpc::{internal_err, public_key};
use jsonrpc_core::Result as RpcResult;
pub use hedgeware_rpc_core_txpool::{
pub use kabocha_rpc_core_txpool::{
GetT, Summary, Transaction, TransactionMap, TxPool as TxPoolT, TxPoolResult, TxPoolServer,
};
use sc_transaction_graph::{ChainApi, Pool};
Expand All @@ -31,7 +31,7 @@ use sp_transaction_pool::InPoolTransaction;
use std::collections::HashMap;
use std::{marker::PhantomData, sync::Arc};

use hedgeware_rpc_primitives_txpool::{TxPoolResponse, TxPoolRuntimeApi};
use kabocha_rpc_primitives_txpool::{TxPoolResponse, TxPoolRuntimeApi};

pub struct TxPool<B: BlockT, C, A: ChainApi> {
client: Arc<C>,
Expand Down
6 changes: 3 additions & 3 deletions evm_tracer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "hedgeware-evm-tracer"
name = "kabocha-evm-tracer"
version = '0.1.0'
authors = ['PureStake']
edition = '2018'
Expand All @@ -17,7 +17,7 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
hedgeware-rpc-primitives-debug = { path = "../rpc-primitives/debug", default-features = false }
kabocha-rpc-primitives-debug = { path = "../rpc-primitives/debug", default-features = false }
ethereum-types = { version = "0.11.0", default-features = false }

[features]
Expand All @@ -33,5 +33,5 @@ std = [
"sp-runtime/std",
"ethereum-types/std",
"fp-evm/std",
"hedgeware-rpc-primitives-debug/std",
"kabocha-rpc-primitives-debug/std",
]
2 changes: 1 addition & 1 deletion evm_tracer/src/call_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use crate::util::*;
use ethereum_types::{H160, U256};
use evm::{Capture, ExitError, ExitReason, ExitSucceed};
use hedgeware_rpc_primitives_debug::{
use kabocha_rpc_primitives_debug::{
single::{Call, CallInner, TransactionTrace},
CallResult, CallType, CreateResult,
};
Expand Down
2 changes: 1 addition & 1 deletion evm_tracer/src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::util::*;

use ethereum_types::{H160, H256};
use evm::{Capture, ExitReason};
use hedgeware_rpc_primitives_debug::single::{RawStepLog, TransactionTrace};
use kabocha_rpc_primitives_debug::single::{RawStepLog, TransactionTrace};
use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec};

/// Listen to EVM events to provide the intermediate machine state between opcode executions
Expand Down
2 changes: 1 addition & 1 deletion evm_tracer/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub use evm_gasometer::tracing::{
pub use evm_runtime::tracing::{
using as runtime_using, Event as RuntimeEvent, EventListener as RuntimeListener,
};
use hedgeware_rpc_primitives_debug::CallType;
use kabocha_rpc_primitives_debug::CallType;
pub use sp_std::{cell::RefCell, fmt::Debug, rc::Rc, vec, vec::Vec};
pub struct ListenerProxy<T>(pub Rc<RefCell<T>>);

Expand Down
2 changes: 1 addition & 1 deletion primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "hedgeware-parachain-primitives"
name = "kabocha-parachain-primitives"
version = "0.1.0"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
Expand Down
4 changes: 2 additions & 2 deletions quaddrop/Cargo.lock

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

4 changes: 2 additions & 2 deletions quaddrop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ hex = "0.3.2"
serde_json = "1.0"
serde = { version = "1.0.101", optional = true, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
hedgeware-parachain-primitives = { path = "../primitives", default-features = false }
kabocha-parachain-primitives = { path = "../primitives", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }

Expand All @@ -19,5 +19,5 @@ default = [ "std" ]
std = [
"serde",
"codec/std",
"hedgeware-parachain-primitives/std",
"kabocha-parachain-primitives/std",
]
Loading

0 comments on commit 9acd4c7

Please sign in to comment.