diff --git a/.gitignore b/.gitignore index f49fd9ba91..e752ec8fce 100755 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ release /packages/neuron-wallet/bin/mac /packages/neuron-wallet/bin/linux /packages/neuron-wallet/bin/win +/packages/neuron-wallet/light # misc .DS_Store diff --git a/packages/neuron-wallet/light/.gitkeep b/packages/neuron-wallet/light/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/neuron-wallet/light/ckb_light.toml b/packages/neuron-wallet/light/ckb_light.toml deleted file mode 100644 index ca5181bf33..0000000000 --- a/packages/neuron-wallet/light/ckb_light.toml +++ /dev/null @@ -1,55 +0,0 @@ -# chain = "mainnet" -# chain = "testnet" -# chain = "your_path_to/dev.toml" -chain = "testnet" - -[store] -path = "data/store" - -[network] -path = "data/network" - -listen_addresses = ["/ip4/0.0.0.0/tcp/8118"] -### 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 = [ - # Hangzhou, Asia - "/ip4/47.111.169.36/tcp/8111/p2p/QmNQ4jky6uVqLDrPU7snqxARuNGWNLgSrTnssbRuy3ij2W", - # Ohio, North America - "/ip4/18.217.146.65/tcp/8111/p2p/QmT6DFfm18wtbJz3y4aPNn3ac86N4d4p4xtfQRRPf73frC", - # Singapore, Asia - "/ip4/18.136.60.221/tcp/8111/p2p/QmTt6HeNakL8Fpmevrhdna7J4NzEMf9pLchf1CXtmtSrwb", - # London, Europe - "/ip4/35.176.207.239/tcp/8111/p2p/QmSJTsMsMGBjzv1oBNwQU36VhQRxc2WQpFoRu1ZifYKrjZ" -] - -### 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 = 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 = "127.0.0.1:9000" diff --git a/scripts/download-ckb.sh b/scripts/download-ckb.sh index 2ba22acdf7..daa9afb71d 100755 --- a/scripts/download-ckb.sh +++ b/scripts/download-ckb.sh @@ -23,6 +23,8 @@ function download_macos_light() { curl -O -L "https://github.com/nervosnetwork/ckb-light-client/releases/download/${CKB_LIGHT_VERSION}/${CKB_FILENAME}.tar.gz" tar -xzvf ${CKB_FILENAME}.tar.gz + cp ./config/testnet.toml ../../light/ckb_light.toml + rm -rf ./config rm ${CKB_FILENAME}.tar.gz } @@ -45,6 +47,8 @@ function download_linux_light() { curl -O -L "https://github.com/nervosnetwork/ckb-light-client/releases/download/${CKB_LIGHT_VERSION}/${CKB_FILENAME}.tar.gz" tar -xzvf ${CKB_FILENAME}.tar.gz + cp ./config/testnet.toml ../../light/ckb_light.toml + rm -rf ./config rm ${CKB_FILENAME}.tar.gz } @@ -67,13 +71,15 @@ function download_windows_light() { curl -O -L "https://github.com/nervosnetwork/ckb-light-client/releases/download/${CKB_LIGHT_VERSION}/${CKB_FILENAME}.tar.gz" tar -xzvf ${CKB_FILENAME}.tar.gz + cp ./config/testnet.toml ../../light/ckb_light.toml + rm -rf ./config rm ${CKB_FILENAME}.tar.gz } case $1 in - mac) download_macos ;; - linux) download_linux ;; - win) download_windows ;; + mac) download_macos; download_macos_light;; + linux) download_linux; download_linux_light;; + win) download_windows; download_windows_light;; *) if [[ "$OSTYPE" == "darwin"* ]]; then download_macos