From e0c8a1032bd5b901d34bdb102e3fdb6ffb73af2c Mon Sep 17 00:00:00 2001 From: Ivan Vandot Date: Mon, 17 May 2021 11:11:05 +0200 Subject: [PATCH 1/3] chore: switch swap endpoint to localhost --- .goreleaser.yml | 3 ++- cmd/bee/cmd/cmd.go | 2 +- packaging/bee.yaml | 4 ++-- packaging/deb/postinst | 3 ++- packaging/default | 2 +- packaging/docker/README.md | 4 ++-- packaging/docker/env | 4 ++-- packaging/homebrew/bee.yaml | 4 ++-- packaging/rpm/post | 3 ++- packaging/scoop/bee.yaml | 4 ++-- 10 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 8bbcc4acbfd..9f749548f3f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -195,7 +195,8 @@ brews: Logs: #{var}/log/swarm-bee/bee.log Config: #{etc}/swarm-bee/bee.yaml - Bee has SWAP enabled and by default is using slock.it goerli ethereum endpoint. + Bee has SWAP enabled and by default is using ws://localhost:8546 ethereum endpoint. + If needed obtain Infura account and set it. It is recommended to use external signer with bee. Check documentation for more info: - SWAP https://docs.ethswarm.org/docs/installation/manual#swap-bandwidth-incentives diff --git a/cmd/bee/cmd/cmd.go b/cmd/bee/cmd/cmd.go index cabcb1698f0..306103ade32 100644 --- a/cmd/bee/cmd/cmd.go +++ b/cmd/bee/cmd/cmd.go @@ -225,7 +225,7 @@ func (c *command) setAllFlags(cmd *cobra.Command) { cmd.Flags().Bool(optionNameClefSignerEnable, false, "enable clef signer") cmd.Flags().String(optionNameClefSignerEndpoint, "", "clef signer endpoint") cmd.Flags().String(optionNameClefSignerEthereumAddress, "", "ethereum address to use from clef signer") - cmd.Flags().String(optionNameSwapEndpoint, "http://localhost:8545", "swap ethereum blockchain endpoint") + cmd.Flags().String(optionNameSwapEndpoint, "ws://localhost:8546", "swap ethereum blockchain endpoint") cmd.Flags().String(optionNameSwapFactoryAddress, "", "swap factory address") cmd.Flags().String(optionNameSwapInitialDeposit, "100000000000000000", "initial deposit if deploying a new chequebook") cmd.Flags().Bool(optionNameSwapEnable, true, "enable swap") diff --git a/packaging/bee.yaml b/packaging/bee.yaml index 89351e78cb3..408ec1aee00 100644 --- a/packaging/bee.yaml +++ b/packaging/bee.yaml @@ -60,8 +60,8 @@ password-file: /var/lib/bee/password # standalone: false ## enable swap (default true) # swap-enable: true -## swap ethereum blockchain endpoint (default "http://localhost:8545") -swap-endpoint: https://rpc.slock.it/goerli +## swap ethereum blockchain endpoint (default "ws://localhost:8546") +# swap-endpoint: ws://localhost:8546 ## swap factory address # swap-factory-address: "" ## initial deposit if deploying a new chequebook (default 100000000000000000) diff --git a/packaging/deb/postinst b/packaging/deb/postinst index f9ff3505081..c16947139e5 100644 --- a/packaging/deb/postinst +++ b/packaging/deb/postinst @@ -11,7 +11,8 @@ if [ "$1" = "configure" ]; then Logs: journalctl -f -u bee.service Config: /etc/bee/bee.yaml -Bee has SWAP enabled and by default is using slock.it goerli ethereum endpoint. +Bee has SWAP enabled and by default is using ws://localhost:8546 ethereum endpoint. +If needed obtain Infura account and set it. It is recommended to use external signer with bee. Check documentation for more info: - SWAP https://docs.ethswarm.org/docs/installation/manual#swap-bandwidth-incentives diff --git a/packaging/default b/packaging/default index 729c14494cd..35a68461d89 100644 --- a/packaging/default +++ b/packaging/default @@ -1,4 +1,4 @@ # Configuration for bee daemon -#BEE_SWAP_ENDPOINT=http://localhost:8545 +#BEE_SWAP_ENDPOINT=ws://localhost:8546 #BEE_RESOLVER_OPTIONS= \ No newline at end of file diff --git a/packaging/docker/README.md b/packaging/docker/README.md index 68fa4dc6a67..c0a07c8f5a4 100644 --- a/packaging/docker/README.md +++ b/packaging/docker/README.md @@ -11,8 +11,8 @@ Set all configuration variables inside `.env` `clef` is configured with `CLEF_CHAINID=5` for goerli -To configure `bee` set: -- `BEE_SWAP_ENDPOINT=https://rpc.slock.it/goerli` +To configure `bee` set obtain free Infura account and set: +- `BEE_SWAP_ENDPOINT=wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` Set bee password by either setting `BEE_PASSWORD` or `BEE_PASSWORD_FILE` diff --git a/packaging/docker/env b/packaging/docker/env index b04aa0002d5..b40cabd892f 100644 --- a/packaging/docker/env +++ b/packaging/docker/env @@ -67,8 +67,8 @@ BEE_CLEF_SIGNER_ENABLE=true # BEE_STANDALONE=false ## enable swap (default true) # BEE_SWAP_ENABLE=true -## swap ethereum blockchain endpoint (default http://localhost:8545) -# BEE_SWAP_ENDPOINT=http://localhost:8545 +## swap ethereum blockchain endpoint (default ws://localhost:8546) +# BEE_SWAP_ENDPOINT=ws://localhost:8546 ## swap factory address # BEE_SWAP_FACTORY_ADDRESS= ## initial deposit if deploying a new chequebook (default 100000000) diff --git a/packaging/homebrew/bee.yaml b/packaging/homebrew/bee.yaml index c8282dc7155..9385cd5a039 100644 --- a/packaging/homebrew/bee.yaml +++ b/packaging/homebrew/bee.yaml @@ -60,8 +60,8 @@ password-file: /usr/local/var/lib/swarm-bee/password # standalone: false ## enable swap (default true) # swap-enable: true -## swap ethereum blockchain endpoint (default "http://localhost:8545") -swap-endpoint: https://rpc.slock.it/goerli +## swap ethereum blockchain endpoint (default "ws://localhost:8546") +# swap-endpoint: ws://localhost:8546 ## swap factory address # swap-factory-address: "" ## initial deposit if deploying a new chequebook (default 100000000000000000) diff --git a/packaging/rpm/post b/packaging/rpm/post index c3f2b915ce7..9c86bca8637 100644 --- a/packaging/rpm/post +++ b/packaging/rpm/post @@ -10,7 +10,8 @@ if [ $1 -eq 1 ] ; then Logs: journalctl -f -u bee.service Config: /etc/bee/bee.yaml -Bee has SWAP enabled and by default is using slock.it goerli ethereum endpoint. +Bee has SWAP enabled and by default is using ws://localhost:8546 ethereum endpoint. +If needed obtain Infura account and set it. It is recommended to use external signer with bee. Check documentation for more info: - SWAP https://docs.ethswarm.org/docs/installation/manual#swap-bandwidth-incentives diff --git a/packaging/scoop/bee.yaml b/packaging/scoop/bee.yaml index 26926e8807e..729dc58ec8a 100644 --- a/packaging/scoop/bee.yaml +++ b/packaging/scoop/bee.yaml @@ -50,8 +50,8 @@ password-file: ./password # standalone: false ## enable swap (default true) # swap-enable: true -## swap ethereum blockchain endpoint (default "http://localhost:8545") -swap-endpoint: https://rpc.slock.it/goerli +## swap ethereum blockchain endpoint (default "ws://localhost:8546") +# swap-endpoint: ws://localhost:8546 ## swap factory address # swap-factory-address: "" ## initial deposit if deploying a new chequebook (default 100000000) From 04beb7538a6ddbf615fb6bee319a9c9ce1028f63 Mon Sep 17 00:00:00 2001 From: Ivan Vandot Date: Tue, 18 May 2021 14:22:03 +0200 Subject: [PATCH 2/3] rephrase infura part during install --- .goreleaser.yml | 4 +++- packaging/deb/postinst | 3 ++- packaging/rpm/post | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 9f749548f3f..2f705a77a45 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -175,6 +175,7 @@ scoop: - "if(!(Test-Path $persist_dir\\password)){[System.Web.Security.Membership]::GeneratePassword(32,5) | Set-Content -Path $persist_dir\\password}" - "if(sc.exe query SwarmBeeSvc | Select-String FAILED){sc.exe create SwarmBeeSvc binPath= \"$dir\\bee.exe start --config=$persist_dir\\bee.yaml\" type= share start= auto displayName= \"Bee\"; sc.exe description SwarmBeeSvc \"Swarm client implemented in Go.\"}" - "if($global){$ETH_ADDRESS = (((C:\\ProgramData\\scoop\\shims\\bee.exe init --config=$persist_dir\\bee.yaml | Select-String ethereum) -split ' ‘)[-1]).Trim('\"')} else {$ETH_ADDRESS = (((bee.exe init --config=$persist_dir\\bee.yaml | Select-String ethereum) -split ' ‘)[-1]).Trim('\"')}; Write-Host \"Please make sure there is sufficient eth and bzz available on $ETH_ADDRESS address.\nYou can get both goerli eth and goerli bzz from https://bzz.ethswarm.org/?transaction=buy&amount=10&slippage=30&receiver=0x$ETH_ADDRESS\"" + - "Write-Host \"Obtain free Infura account and set: swap-endpoint: wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx inside $persist_dir\\bee.yaml\"" - "Write-Host \"After the initial fund deploy Bee chequebook with [sudo] $dir\\bee.exe deploy --config=$persist_dir\\bee.yaml\"" - "Write-Host 'Start Bee service with [sudo] sc.exe start SwarmBeeSvc'" @@ -196,7 +197,8 @@ brews: Config: #{etc}/swarm-bee/bee.yaml Bee has SWAP enabled and by default is using ws://localhost:8546 ethereum endpoint. - If needed obtain Infura account and set it. + If needed obtain free Infura account and set: + `swap-endpoint: wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` It is recommended to use external signer with bee. Check documentation for more info: - SWAP https://docs.ethswarm.org/docs/installation/manual#swap-bandwidth-incentives diff --git a/packaging/deb/postinst b/packaging/deb/postinst index c16947139e5..14067ff3fcd 100644 --- a/packaging/deb/postinst +++ b/packaging/deb/postinst @@ -12,7 +12,8 @@ Logs: journalctl -f -u bee.service Config: /etc/bee/bee.yaml Bee has SWAP enabled and by default is using ws://localhost:8546 ethereum endpoint. -If needed obtain Infura account and set it. +If needed obtain free Infura account and set: +`swap-endpoint: wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` It is recommended to use external signer with bee. Check documentation for more info: - SWAP https://docs.ethswarm.org/docs/installation/manual#swap-bandwidth-incentives diff --git a/packaging/rpm/post b/packaging/rpm/post index 9c86bca8637..65ec35e9605 100644 --- a/packaging/rpm/post +++ b/packaging/rpm/post @@ -11,7 +11,8 @@ Logs: journalctl -f -u bee.service Config: /etc/bee/bee.yaml Bee has SWAP enabled and by default is using ws://localhost:8546 ethereum endpoint. -If needed obtain Infura account and set it. +If needed obtain free Infura account and set: +`swap-endpoint: wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` It is recommended to use external signer with bee. Check documentation for more info: - SWAP https://docs.ethswarm.org/docs/installation/manual#swap-bandwidth-incentives From bcd0711ed56d78bc6cbfbf17e873965de9110aff Mon Sep 17 00:00:00 2001 From: Ivan Vandot Date: Tue, 18 May 2021 15:34:26 +0200 Subject: [PATCH 3/3] chore: replace SWAP with Ethereum --- .goreleaser.yml | 2 +- packaging/deb/postinst | 3 +-- packaging/docker/README.md | 2 +- packaging/rpm/post | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 3a5e5742aa5..d3ff86ffd56 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -196,7 +196,7 @@ brews: Logs: #{var}/log/swarm-bee/bee.log Config: #{etc}/swarm-bee/bee.yaml - Bee has SWAP enabled and by default is using ws://localhost:8546 ethereum endpoint. + Bee requires an Ethereum endpoint to function. By default is using ws://localhost:8546 ethereum endpoint. If needed obtain a free Infura account and set: `swap-endpoint: wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` It is recommended to use external signer with bee. diff --git a/packaging/deb/postinst b/packaging/deb/postinst index 20bfc380db3..8e6b8092f4d 100644 --- a/packaging/deb/postinst +++ b/packaging/deb/postinst @@ -11,12 +11,11 @@ if [ "$1" = "configure" ]; then Logs: journalctl -f -u bee.service Config: /etc/bee/bee.yaml -Bee has SWAP enabled and by default is using ws://localhost:8546 ethereum endpoint. +Bee requires an Ethereum endpoint to function. By default is using ws://localhost:8546 ethereum endpoint. If needed obtain a free Infura account and set: `swap-endpoint: wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` It is recommended to use external signer with bee. Check documentation for more info: -- SWAP https://docs.ethswarm.org/docs/installation/manual#swap-bandwidth-incentives - External signer https://docs.ethswarm.org/docs/installation/bee-clef After you finish configuration run 'sudo bee-get-addr'. diff --git a/packaging/docker/README.md b/packaging/docker/README.md index b706ac865cd..757d4a4bfff 100644 --- a/packaging/docker/README.md +++ b/packaging/docker/README.md @@ -11,7 +11,7 @@ Set all configuration variables inside `.env` `clef` is configured with `CLEF_CHAINID=5` for goerli -To configure `bee` set obtain a free Infura account and set: +Bee requires an Ethereum endpoint to function. Obtain a free Infura account and set: - `BEE_SWAP_ENDPOINT=wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` Set bee password by either setting `BEE_PASSWORD` or `BEE_PASSWORD_FILE` diff --git a/packaging/rpm/post b/packaging/rpm/post index 80db04bdcbd..5b9920e4415 100644 --- a/packaging/rpm/post +++ b/packaging/rpm/post @@ -10,7 +10,7 @@ if [ $1 -eq 1 ] ; then Logs: journalctl -f -u bee.service Config: /etc/bee/bee.yaml -Bee has SWAP enabled and by default is using ws://localhost:8546 ethereum endpoint. +Bee requires an Ethereum endpoint to function. By default is using ws://localhost:8546 ethereum endpoint. If needed obtain a free Infura account and set: `swap-endpoint: wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` It is recommended to use external signer with bee.