diff --git a/clean_ckb_node.sh b/clean_ckb_node.sh new file mode 100644 index 0000000..5409f42 --- /dev/null +++ b/clean_ckb_node.sh @@ -0,0 +1,9 @@ +cd docker +docker compose down +rm -rf layer1/ckb/data/ancient +rm -rf layer1/ckb/data/db +rm -rf layer1/ckb/data/indexer +rm -rf layer1/ckb/data/logs +rm -rf layer1/ckb/data/tmp +rm -rf layer1/ckb/data/tx_pool + diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..7de59a9 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,54 @@ +version: '3' + +services: + ckb: + image: nervos/ckb:v0.202.0 + user: root + ports: + - 8114:8114 # rpc + - 8115:8115 # p2p network + volumes: + - ./layer1/ckb:/var/lib/ckb + command: [ "run", "-C", "/var/lib/ckb" ] + networks: + custom_bridge: + ipv4_address: 192.168.1.2 + + ckb-miner: + image: nervos/ckb:v0.202.0 + user: root + volumes: + - ./layer1/ckb:/var/lib/ckb + command: [ "miner" ,"-C", "/var/lib/ckb" ] + networks: + custom_bridge: + ipv4_address: 192.168.1.3 + + ckb-light-client: + image: jiangxianliang/ckb-light-client + user: root + ports: + - 9000:9000 # light client rpc + entrypoint: /bin/ckb-light-client + volumes: + - ./light-client:/tmp + command: ["run", "--config-file", "/tmp/testnet.toml"] + networks: + custom_bridge: + ipv4_address: 192.168.1.4 +# image: jiangxianliang/ckb-light-client:latest +# entrypoint: /bin/ckb-light-client +# command: [ "--help" ] +# ports: +# - 9000:9000 # light client rpc +# volumes: +# - ./light-client:/bin/ +# environment: +# RUST_LOG: info +# ckb_light_client: trace +networks: + custom_bridge: + driver: bridge + ipam: + config: + - subnet: 192.168.1.0/24 \ No newline at end of file diff --git a/docker/layer1/ckb/ckb-miner.toml b/docker/layer1/ckb/ckb-miner.toml new file mode 100644 index 0000000..dd4adb8 --- /dev/null +++ b/docker/layer1/ckb/ckb-miner.toml @@ -0,0 +1,35 @@ +# Config generated by `ckb init --chain dev` + +data_dir = "data" + +[chain] + +spec = { file = "dev.toml" } + + +[logger] +filter = "info" +color = true +log_to_file = true +log_to_stdout = true + +[sentry] +# set to blank to disable sentry error collection +dsn = "" +# if you are willing to help us to improve, +# please leave a way to contact you when we have troubles to reproduce the errors. +# org_contact = "" + +[miner.client] +rpc_url = "http://192.168.1.2:8114" +block_on_submit = true + +# block template polling interval in milliseconds +poll_interval = 1000 + +# +[[miner.workers]] +worker_type = "Dummy" +delay_type = "Constant" +value = 1000 +# \ No newline at end of file diff --git a/docker/layer1/ckb/ckb.toml b/docker/layer1/ckb/ckb.toml new file mode 100644 index 0000000..1c38f59 --- /dev/null +++ b/docker/layer1/ckb/ckb.toml @@ -0,0 +1,187 @@ +# Config generated by `ckb init --chain dev` + +data_dir = "data" + + +[chain] +# Choose the kind of chains to run, possible values: +# - { file = "specs/dev.toml" } +# - { bundled = "specs/testnet.toml" } +# - { bundled = "specs/mainnet.toml" } +spec = { file = "dev.toml" } + + +[logger] +filter = "info" +color = true +log_to_file = true +log_to_stdout = true + + +[sentry] +# set to blank to disable sentry error collection +dsn = "" +# if you are willing to help us to improve, +# please leave a way to contact you when we have troubles to reproduce the errors. +org_contact = "" + + +# # **Experimental** Monitor memory changes. +# [memory_tracker] +# # Seconds between checking the process, 0 is disable, default is 0. +# interval = 600 + +[db] +# The capacity of RocksDB cache, which caches uncompressed data blocks, indexes and filters, default is 128MB. +# Rocksdb will automatically create and use an 8MB internal cache if you set this value to 0. +# To turning off cache, you need to set this value to 0 and set `no_block_cache = true` in the options_file, +# however, we strongly discourage this setting, it may lead to severe performance degradation. +cache_size = 134217728 + +# Provide an options file to tune RocksDB for your workload and your system configuration. +# More details can be found in [the official tuning guide](https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide). +options_file = "default.db-options" + +[network] +listen_addresses = ["/ip4/0.0.0.0/tcp/8115"] +### Specify the public and routable network addresses +public_addresses = [] + +# Node connects to nodes listed here to discovery other peers when there's no local stored peers. +# When chain.spec is changed, this usually should also be changed to the bootnodes in the new chain. +bootnodes = [] + +### Whitelist-only mode +whitelist_only = false +### Whitelist peers connecting from the given IP addresses +whitelist_peers = [] +### Enable `SO_REUSEPORT` feature to reuse port on Linux, not supported on other OS yet +# reuse_port_on_linux = true + +max_peers = 125 +max_outbound_peers = 8 +# 2 minutes +ping_interval_secs = 120 +# 20 minutes +ping_timeout_secs = 1200 +connect_outbound_interval_secs = 15 +# If set to true, try to register upnp +upnp = false +# If set to true, network service will add discovered local address to peer store, it's helpful for private net development +discovery_local_address = true +# If set to true, random cleanup when there are too many inbound nodes +# Ensure that itself can continue to serve as a bootnode node +bootnode_mode = false + +# Supported protocols list, only "Sync" and "Identify" are mandatory, others are optional +support_protocols = ["Ping", "Discovery", "Identify", "Feeler", "DisconnectMessage", "Sync", "Relay", "Time", "Alert", "LightClient", "Filter"] + +# [network.sync.header_map] +# memory_limit = "600MB" + +[rpc] +# By default RPC only binds to localhost, thus it only allows accessing from the same machine. +# +# Allowing arbitrary machines to access the JSON-RPC port is dangerous and strongly discouraged. +# Please strictly limit the access to only trusted machines. +listen_address = "0.0.0.0:8114" + +# Default is 10MiB = 10 * 1024 * 1024 +max_request_body_size = 10485760 + +# List of API modules: ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment", "Debug", "Indexer"] +#modules = ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment", "Debug"] +modules = ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment", "Debug", "Indexer"] + +# By default RPC only binds to HTTP service, you can bind it to TCP and WebSocket. +# +tcp_listen_address = "127.0.0.1:18114" +# + +# +ws_listen_address = "127.0.0.1:18124" +# + +reject_ill_transactions = true + +# By default deprecated rpc methods are disabled. +enable_deprecated_rpc = false + + +[tx_pool] +max_tx_pool_size = 180_000_000 +min_fee_rate = 1_000 +max_tx_verify_cycles = 70_000_000 +max_ancestors_count = 25 +min_rbf_rate = 1_500 + + +[store] +header_cache_size = 4096 +cell_data_cache_size = 128 +block_proposals_cache_size = 30 +block_tx_hashes_cache_size = 30 +block_uncles_cache_size = 30 + +# [notifier] +# # Execute command when the new tip block changes, first arg is block hash. +# new_block_notify_script = "your_new_block_notify_script.sh" +# # Execute command when node received an network alert, first arg is alert message string. +# network_alert_notify_script = "your_network_alert_notify_script.sh" + +# Set the lock script to protect mined CKB. +# +# CKB uses CS architecture for miner. Miner process (ckb miner) gets block +# template from the Node process (ckb run) via RPC. Thus the lock script is +# configured in ckb.toml instead of ckb-miner.toml, and the config takes effect +# after restarting Node process. +# +# The `code_hash` identifies different cryptography algorithm. Read the manual +# of the lock script provider about how to generate this config. +# +# CKB provides an secp256k1 implementation, it requires a hash on the +# compressed public key. The hash algorithm is blake2b, with personal +# "ckb-default-hash". The first 160 bits (20 bytes) are used as the only arg. +# +# You can use any tool you trust to generate a Bitcoin private key and public +# key pair, which can be used in CKB as well. CKB CLI provides the function for +# you to convert the public key into block assembler configuration parameters. +# +# Here is an example using ckb-cli to generate an account, this command will +# print the block assembler args(lock_arg) to screen: +# +# ckb-cli account new +# +# If you already have a raw secp256k1 private key, you can get the lock_arg by: +# +# ckb-cli util key-info --privkey-path +# +# The command `ckb init` also accepts options to generate the block assembler +# directly. See `ckb init --help` for details. +# +# ckb init +# +# secp256k1_blake160_sighash_all example: +# [block_assembler] +# code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" +# args = "ckb-cli util blake2b --prefix-160 " +# hash_type = "type" +# message = "A 0x-prefixed hex string" +# # +# # CKB will prepend the binary version to message, to identify the block miner client. (default true, false to disable it) +# use_binary_version_as_message_prefix = true +# # +# # Block assembler will notify new block template through http post to specified endpoints when update +# notify = ["http://127.0.0.1:8888"] +# # Or you may want use more flexible scripts, block template as arg. +# notify_scripts = ["{cmd} {blocktemplate}"] +# +# [indexer_v2] +# # Indexing the pending txs in the ckb tx-pool +# index_tx_pool = false + +[block_assembler] +code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" +args = "0x8883a512ee2383c01574a328f60eeccbb4d78240" +hash_type = "type" +message = "0x" \ No newline at end of file diff --git a/docker/layer1/ckb/data/network/peer_store/addr_manager.db b/docker/layer1/ckb/data/network/peer_store/addr_manager.db new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docker/layer1/ckb/data/network/peer_store/addr_manager.db @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docker/layer1/ckb/data/network/peer_store/ban_list.db b/docker/layer1/ckb/data/network/peer_store/ban_list.db new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docker/layer1/ckb/data/network/peer_store/ban_list.db @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docker/layer1/ckb/data/network/secret_key b/docker/layer1/ckb/data/network/secret_key new file mode 100644 index 0000000..f5ce538 --- /dev/null +++ b/docker/layer1/ckb/data/network/secret_key @@ -0,0 +1 @@ +\❦"D~%qouRxoϘ?l|T \ No newline at end of file diff --git a/docker/layer1/ckb/default.db-options b/docker/layer1/ckb/default.db-options new file mode 100644 index 0000000..5ba523b --- /dev/null +++ b/docker/layer1/ckb/default.db-options @@ -0,0 +1,18 @@ +# This is a RocksDB option file. +# +# For detailed file format spec, please refer to the official documents +# in https://rocksdb.org/docs/ +# + +[DBOptions] +bytes_per_sync=1048576 +max_background_jobs=6 +max_total_wal_size=134217728 +keep_log_file_num=32 + +[CFOptions "default"] +level_compaction_dynamic_level_bytes=true +write_buffer_size=8388608 +min_write_buffer_number_to_merge=1 +max_write_buffer_number=2 +max_write_buffer_size_to_maintain=-1 diff --git a/docker/layer1/ckb/dev.toml b/docker/layer1/ckb/dev.toml new file mode 100644 index 0000000..d4741f7 --- /dev/null +++ b/docker/layer1/ckb/dev.toml @@ -0,0 +1,100 @@ +name = "ckb_dev" + +[genesis] +version = 0 +parent_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +timestamp = 0 +compact_target = 0x20010000 +uncles_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +nonce = "0x0" + +[genesis.genesis_cell] +message = "1688032132025" + +[genesis.genesis_cell.lock] +code_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +args = "0x" +hash_type = "data" + +# An array list paths to system cell files, which is absolute or relative to +# the directory containing this config file. +[[genesis.system_cells]] +file = { bundled = "specs/cells/secp256k1_blake160_sighash_all" } +create_type_id = true +capacity = 100_000_0000_0000 +[[genesis.system_cells]] +file = { bundled = "specs/cells/dao" } +create_type_id = true +capacity = 16_000_0000_0000 +[[genesis.system_cells]] +file = { bundled = "specs/cells/secp256k1_data" } +create_type_id = false +capacity = 1_048_617_0000_0000 +[[genesis.system_cells]] +file = { bundled = "specs/cells/secp256k1_blake160_multisig_all" } +create_type_id = true +capacity = 100_000_0000_0000 + +[genesis.system_cells_lock] +code_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +args = "0x" +hash_type = "data" + +# Dep group cells +[[genesis.dep_groups]] +name = "secp256k1_blake160_sighash_all" +files = [ + { bundled = "specs/cells/secp256k1_data" }, + { bundled = "specs/cells/secp256k1_blake160_sighash_all" }, +] +[[genesis.dep_groups]] +name = "secp256k1_blake160_multisig_all" +files = [ + { bundled = "specs/cells/secp256k1_data" }, + { bundled = "specs/cells/secp256k1_blake160_multisig_all" }, +] + +# For first 11 block +[genesis.bootstrap_lock] +code_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +args = "0x" +hash_type = "type" + +# Burn +[[genesis.issued_cells]] +capacity = 8_400_000_000_00000000 +lock.code_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +lock.args = "0x62e907b15cbf27d5425399ebf6f0fb50ebb88f18" +lock.hash_type = "data" + +# issue for random generated private key: d00c06bfd800d27397002dca6fb0993d5ba6399b4238b2f29ee9deb97593d2bc +[[genesis.issued_cells]] +capacity = 20_000_000_000_00000000 +lock.code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" +lock.args = "0xc8328aabcd9b9e8e64fbc566c4385c3bdeb219d7" +lock.hash_type = "type" + +# issue for random generated private key: 63d86723e08f0f813a36ce6aa123bb2289d90680ae1e99d4de8cdb334553f24d +[[genesis.issued_cells]] +capacity = 5_198_735_037_00000000 +lock.code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" +lock.args = "0x470dcdc5e44064909650113a274b3b36aecb6dc7" +lock.hash_type = "type" + +[params] +initial_primary_epoch_reward = 1_917_808_21917808 +secondary_epoch_reward = 613_698_63013698 +max_block_cycles = 10_000_000_000 +cellbase_maturity = 0 +primary_epoch_reward_halving_interval = 8760 +epoch_duration_target = 14400 +genesis_epoch_length = 1000 +# For development and testing purposes only. +# Keep difficulty be permanent if the pow is Dummy. (default: false) +permanent_difficulty_in_dummy = true + +[params.hardfork] +ckb2023 = 1 + +[pow] +func = "Dummy" diff --git a/docker/light-client/ckb-light-client b/docker/light-client/ckb-light-client new file mode 100755 index 0000000..1a43e9a Binary files /dev/null and b/docker/light-client/ckb-light-client differ diff --git a/docker/light-client/dev.toml b/docker/light-client/dev.toml new file mode 100644 index 0000000..d4741f7 --- /dev/null +++ b/docker/light-client/dev.toml @@ -0,0 +1,100 @@ +name = "ckb_dev" + +[genesis] +version = 0 +parent_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +timestamp = 0 +compact_target = 0x20010000 +uncles_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +nonce = "0x0" + +[genesis.genesis_cell] +message = "1688032132025" + +[genesis.genesis_cell.lock] +code_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +args = "0x" +hash_type = "data" + +# An array list paths to system cell files, which is absolute or relative to +# the directory containing this config file. +[[genesis.system_cells]] +file = { bundled = "specs/cells/secp256k1_blake160_sighash_all" } +create_type_id = true +capacity = 100_000_0000_0000 +[[genesis.system_cells]] +file = { bundled = "specs/cells/dao" } +create_type_id = true +capacity = 16_000_0000_0000 +[[genesis.system_cells]] +file = { bundled = "specs/cells/secp256k1_data" } +create_type_id = false +capacity = 1_048_617_0000_0000 +[[genesis.system_cells]] +file = { bundled = "specs/cells/secp256k1_blake160_multisig_all" } +create_type_id = true +capacity = 100_000_0000_0000 + +[genesis.system_cells_lock] +code_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +args = "0x" +hash_type = "data" + +# Dep group cells +[[genesis.dep_groups]] +name = "secp256k1_blake160_sighash_all" +files = [ + { bundled = "specs/cells/secp256k1_data" }, + { bundled = "specs/cells/secp256k1_blake160_sighash_all" }, +] +[[genesis.dep_groups]] +name = "secp256k1_blake160_multisig_all" +files = [ + { bundled = "specs/cells/secp256k1_data" }, + { bundled = "specs/cells/secp256k1_blake160_multisig_all" }, +] + +# For first 11 block +[genesis.bootstrap_lock] +code_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +args = "0x" +hash_type = "type" + +# Burn +[[genesis.issued_cells]] +capacity = 8_400_000_000_00000000 +lock.code_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +lock.args = "0x62e907b15cbf27d5425399ebf6f0fb50ebb88f18" +lock.hash_type = "data" + +# issue for random generated private key: d00c06bfd800d27397002dca6fb0993d5ba6399b4238b2f29ee9deb97593d2bc +[[genesis.issued_cells]] +capacity = 20_000_000_000_00000000 +lock.code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" +lock.args = "0xc8328aabcd9b9e8e64fbc566c4385c3bdeb219d7" +lock.hash_type = "type" + +# issue for random generated private key: 63d86723e08f0f813a36ce6aa123bb2289d90680ae1e99d4de8cdb334553f24d +[[genesis.issued_cells]] +capacity = 5_198_735_037_00000000 +lock.code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" +lock.args = "0x470dcdc5e44064909650113a274b3b36aecb6dc7" +lock.hash_type = "type" + +[params] +initial_primary_epoch_reward = 1_917_808_21917808 +secondary_epoch_reward = 613_698_63013698 +max_block_cycles = 10_000_000_000 +cellbase_maturity = 0 +primary_epoch_reward_halving_interval = 8760 +epoch_duration_target = 14400 +genesis_epoch_length = 1000 +# For development and testing purposes only. +# Keep difficulty be permanent if the pow is Dummy. (default: false) +permanent_difficulty_in_dummy = true + +[params.hardfork] +ckb2023 = 1 + +[pow] +func = "Dummy" diff --git a/docker/light-client/testnet.toml b/docker/light-client/testnet.toml new file mode 100644 index 0000000..1cac111 --- /dev/null +++ b/docker/light-client/testnet.toml @@ -0,0 +1,47 @@ +# chain = "mainnet" +# chain = "testnet" +# chain = "your_path_to/dev.toml" +chain = "/tmp/dev.toml" + +[store] +path = "data/store" + +[network] +path = "data/network" + +listen_addresses = ["/ip4/0.0.0.0/tcp/18201"] +### Specify the public and routable network addresses +# public_addresses = [] + +# Node connects to nodes listed here to discovery other peers when there's no local stored peers. +# When chain.spec is changed, this usually should also be changed to the bootnodes in the new chain. +bootnodes = ["/ip4/192.168.1.2/tcp/8115/p2p/QmVMM7zvdzAmVLZ7VDZiCW3bJS8oqEdfpU5JGBozo1HsxU"] + +### Whitelist-only mode +# whitelist_only = false +### Whitelist peers connecting from the given IP addresses +# whitelist_peers = [] + +### Enable `SO_REUSEPORT` feature to reuse port on Linux, not supported on other OS yet +# reuse_port_on_linux = true + +max_peers = 125 +max_outbound_peers = 2 +# 2 minutes +ping_interval_secs = 120 +# 20 minutes +ping_timeout_secs = 1200 +connect_outbound_interval_secs = 15 +# If set to true, try to register upnp +upnp = false +# If set to true, network service will add discovered local address to peer store, it's helpful for private net development +discovery_local_address = false +# If set to true, random cleanup when there are too many inbound nodes +# Ensure that itself can continue to serve as a bootnode node +bootnode_mode = false + +[rpc] +# Light client rpc is designed for self hosting, exposing to public network is not recommended and may cause security issues. +# By default RPC only binds to localhost, thus it only allows accessing from the same machine. +listen_address = "0.0.0.0:9000" +# RUST_LOG=info,ckb_light_client=trace ./ckb-light-client run --config-file testnet.toml \ No newline at end of file diff --git a/feature/tests/dev/config.rs b/feature/tests/dev/config.rs new file mode 100644 index 0000000..cae4833 --- /dev/null +++ b/feature/tests/dev/config.rs @@ -0,0 +1,12 @@ + + + +pub const CKB_DEV_URL : &str = "http://localhost:8114"; + +pub const CKB_LIGHT_CLIENT_URL: &str = "http://localhost:9000"; + +pub const PRIVATE_KEY1: &str = "d00c06bfd800d27397002dca6fb0993d5ba6399b4238b2f29ee9deb97593d2bc"; + +pub const PRIVATE_KEY2 : &str = "63d86723e08f0f813a36ce6aa123bb2289d90680ae1e99d4de8cdb334553f24d"; + +pub const PRIVATE_KEY_MINER: &str = ""; \ No newline at end of file diff --git a/feature/tests/dev/demo_test.rs b/feature/tests/dev/demo_test.rs new file mode 100644 index 0000000..a5c8d06 --- /dev/null +++ b/feature/tests/dev/demo_test.rs @@ -0,0 +1,23 @@ +use crate::dev::config; +use ckb_sdk::rpc::LightClientRpcClient; +use ckb_sdk::CkbRpcClient; + +#[test] +fn test_get_tip_block_number() { + let tip_number = + CkbRpcClient::get_tip_block_number(&mut CkbRpcClient::new(config::CKB_DEV_URL)).unwrap(); + assert!( + tip_number.value() > 0, + "Tip block number should be greater than 0" + ); +} + +#[test] +fn test_light_client_get_tip_block_number() { + let client = LightClientRpcClient::new(config::CKB_LIGHT_CLIENT_URL); + let header = client.get_tip_header().unwrap(); + assert!( + header.inner.number.value() > 0, + "Tip block number should be greater than 0" + ); +} diff --git a/feature/tests/dev/mod.rs b/feature/tests/dev/mod.rs new file mode 100644 index 0000000..ccb3df7 --- /dev/null +++ b/feature/tests/dev/mod.rs @@ -0,0 +1,3 @@ + +pub mod demo_test; +pub mod config; diff --git a/feature/tests/lib.rs b/feature/tests/lib.rs index 60418e8..7839dd3 100644 --- a/feature/tests/lib.rs +++ b/feature/tests/lib.rs @@ -1,3 +1,4 @@ pub mod common; pub mod mockrpc; -pub mod mock_light_rpc; \ No newline at end of file +pub mod mock_light_rpc; +pub mod dev; \ No newline at end of file diff --git a/feature/tests/traits/default_impls_test.rs b/feature/tests/traits/default_impls_test.rs new file mode 100644 index 0000000..e69de29 diff --git a/feature/tests/traits/mod.rs b/feature/tests/traits/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/prepare.sh b/prepare.sh index a08395c..508d058 100644 --- a/prepare.sh +++ b/prepare.sh @@ -8,4 +8,7 @@ git clone https://github.com/gpBlockchain/ckb-light-client-rpc-mock-data.git cd ckb-light-client-rpc-mock-data git checkout 03526cf054f7e56b88b073ddfe4be9bdc7c8e8c0 pip install -r requirements.txt -python api/index.py > index.log 2>&1 & \ No newline at end of file +python api/index.py > index.log 2>&1 & +cd ../ +cd docker +docker compose up -d \ No newline at end of file diff --git a/start_ckb_node.sh b/start_ckb_node.sh new file mode 100644 index 0000000..ee69b3e --- /dev/null +++ b/start_ckb_node.sh @@ -0,0 +1,2 @@ +cd docker +docker compose up -d diff --git a/stop_ckb_node.sh b/stop_ckb_node.sh new file mode 100644 index 0000000..c4de951 --- /dev/null +++ b/stop_ckb_node.sh @@ -0,0 +1,2 @@ +cd docker +docker compose down \ No newline at end of file