From 46fdb495b9f848361b681a536f58ff2eb3e299e4 Mon Sep 17 00:00:00 2001 From: Jean Regisser Date: Fri, 6 Dec 2019 14:13:21 +0100 Subject: [PATCH] Use forno urls everywhere (#2064) --- packages/blockchain-api/.env | 2 +- packages/blockchain-api/app.alfajores.yaml | 2 +- packages/blockchain-api/app.alfajoresstaging.yaml | 2 +- packages/blockchain-api/app.integration.yaml | 2 +- packages/blockchain-api/app.pilot.yaml | 2 +- packages/blockchain-api/app.pilotstaging.yaml | 2 +- packages/mobile/README.md | 2 +- packages/mobile/src/config.ts | 2 +- .../notification-service/config/config.alfajores.env | 2 +- .../config/config.alfajoresstaging.env | 2 +- .../notification-service/config/config.integration.env | 2 +- packages/notification-service/config/config.local.env | 2 +- packages/notification-service/config/config.pilot.env | 2 +- .../notification-service/config/config.pilotstaging.env | 9 +++++++++ packages/notification-service/config/config.test.env | 2 +- 15 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 packages/notification-service/config/config.pilotstaging.env diff --git a/packages/blockchain-api/.env b/packages/blockchain-api/.env index 1f7f1c5b999..04eedcecf08 100644 --- a/packages/blockchain-api/.env +++ b/packages/blockchain-api/.env @@ -3,4 +3,4 @@ EXCHANGE_RATES_API=https://apilayer.net/api BLOCKSCOUT_API=https://integration-blockscout.celo-testnet.org/api FAUCET_ADDRESS=0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 VERIFICATION_REWARDS_ADDRESS=0xb4fdaf5f3cd313654aa357299ada901b1d2dd3b5 -WEB3_PROVIDER_URL=https://integration-forno.celo-testnet.org/ \ No newline at end of file +WEB3_PROVIDER_URL=https://integration-forno.celo-testnet.org diff --git a/packages/blockchain-api/app.alfajores.yaml b/packages/blockchain-api/app.alfajores.yaml index b625af1dc5b..7e7bdce3a19 100644 --- a/packages/blockchain-api/app.alfajores.yaml +++ b/packages/blockchain-api/app.alfajores.yaml @@ -8,4 +8,4 @@ env_variables: # TODO Pull addresses from the build artifacts of the network in protocol/build FAUCET_ADDRESS: "0xCEa3eF8e187490A9d85A1849D98412E5D27D1Bb3" VERIFICATION_REWARDS_ADDRESS: "0xb4fdaf5f3cd313654aa357299ada901b1d2dd3b5" - WEB3_PROVIDER_URL: "https://alfajores-forno.celo-testnet.org/" + WEB3_PROVIDER_URL: "https://alfajores-forno.celo-testnet.org" diff --git a/packages/blockchain-api/app.alfajoresstaging.yaml b/packages/blockchain-api/app.alfajoresstaging.yaml index 6950fca9461..7379a4529c5 100644 --- a/packages/blockchain-api/app.alfajoresstaging.yaml +++ b/packages/blockchain-api/app.alfajoresstaging.yaml @@ -8,4 +8,4 @@ env_variables: # TODO Pull addresses from the build artifacts of the network in protocol/build FAUCET_ADDRESS: "0xF4314cb9046bECe6AA54bb9533155434d0c76909" VERIFICATION_REWARDS_ADDRESS: "0xb4fdaf5f3cd313654aa357299ada901b1d2dd3b5" - WEB3_PROVIDER_URL: "https://alfajoresstaging-forno.celo-testnet.org/" + WEB3_PROVIDER_URL: "https://alfajoresstaging-forno.celo-testnet.org" diff --git a/packages/blockchain-api/app.integration.yaml b/packages/blockchain-api/app.integration.yaml index a241b30ec5b..69d7dfe97a5 100644 --- a/packages/blockchain-api/app.integration.yaml +++ b/packages/blockchain-api/app.integration.yaml @@ -8,4 +8,4 @@ env_variables: # TODO Pull addresses from the build artifacts of the network in protocol/build FAUCET_ADDRESS: "0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95" VERIFICATION_REWARDS_ADDRESS: "0xb4fdaf5f3cd313654aa357299ada901b1d2dd3b5" - WEB3_PROVIDER_URL: "https://integration-forno.celo-testnet.org/" + WEB3_PROVIDER_URL: "https://integration-forno.celo-testnet.org" diff --git a/packages/blockchain-api/app.pilot.yaml b/packages/blockchain-api/app.pilot.yaml index 85dbde94331..de2234b639e 100644 --- a/packages/blockchain-api/app.pilot.yaml +++ b/packages/blockchain-api/app.pilot.yaml @@ -8,4 +8,4 @@ env_variables: # TODO Pull addresses from the build artifacts of the network in protocol/build FAUCET_ADDRESS: "0x387bCb16Bfcd37AccEcF5c9eB2938E30d3aB8BF2" VERIFICATION_REWARDS_ADDRESS: "0xb4fdaf5f3cd313654aa357299ada901b1d2dd3b5" - WEB3_PROVIDER_URL: "https://pilot-infura.celo-testnet.org/" + WEB3_PROVIDER_URL: "https://pilot-forno.celo-testnet.org" diff --git a/packages/blockchain-api/app.pilotstaging.yaml b/packages/blockchain-api/app.pilotstaging.yaml index e80775ddc21..6df02bcd67b 100644 --- a/packages/blockchain-api/app.pilotstaging.yaml +++ b/packages/blockchain-api/app.pilotstaging.yaml @@ -8,4 +8,4 @@ env_variables: # TODO Pull addresses from the build artifacts of the network in protocol/build FAUCET_ADDRESS: "0x545DEBe3030B570731EDab192640804AC8Cf65CA" VERIFICATION_REWARDS_ADDRESS: "0xb4fdaf5f3cd313654aa357299ada901b1d2dd3b5" - WEB3_PROVIDER_URL: "https://pilotstaging-forno.celo-testnet.org/" + WEB3_PROVIDER_URL: "https://pilotstaging-forno.celo-testnet.org" diff --git a/packages/mobile/README.md b/packages/mobile/README.md index f94f1b4a615..2c4a4038ce8 100644 --- a/packages/mobile/README.md +++ b/packages/mobile/README.md @@ -97,7 +97,7 @@ have a corresponding `/blockchain-api` and `/notification-service` set up. By default, the mobile wallet app runs geth in ultralight sync mode where all the epoch headers are fetched. The default sync mode is defined in [packages/mobile/.env](https://github.com/celo-org/celo-monorepo/blob/master/packages/mobile/.env#L4) file. -To run the wallet in zero sync mode, using a trusted node rather than the local geth node as a provider, turn it on from the Celo Lite page in settings or update the zero sync initially enabled parameter in the .env file linked above. When zero sync mode is turned back off, the wallet will switch to the default sync mode as specified in the .env file. By default, the trusted node is `https://{TESTNET}-forno.celo-testnet.org/`, however any trusted node can be used by updating `DEFAULT_FORNO_URL`. In zero sync mode, the wallet signs transactions locally in web3 then sends them to the trusted node. +To run the wallet in zero sync mode, using a trusted node rather than the local geth node as a provider, turn it on from the Celo Lite page in settings or update the zero sync initially enabled parameter in the .env file linked above. When zero sync mode is turned back off, the wallet will switch to the default sync mode as specified in the .env file. By default, the trusted node is `https://{TESTNET}-forno.celo-testnet.org`, however any trusted node can be used by updating `DEFAULT_FORNO_URL`. In zero sync mode, the wallet signs transactions locally in web3 then sends them to the trusted node. ## Testing diff --git a/packages/mobile/src/config.ts b/packages/mobile/src/config.ts index a8684eb8e38..2b4a1e642b3 100644 --- a/packages/mobile/src/config.ts +++ b/packages/mobile/src/config.ts @@ -51,7 +51,7 @@ export const FIREBASE_ENABLED = stringToBoolean(Config.FIREBASE_ENABLED || 'true // We need to fallback to `integration` for testing under jest where // react-native-config is undefined. export const DEFAULT_TESTNET = Config.DEFAULT_TESTNET || 'integration' -export const DEFAULT_FORNO_URL = `https://${DEFAULT_TESTNET}-infura.celo-testnet.org/` +export const DEFAULT_FORNO_URL = `https://${DEFAULT_TESTNET}-forno.celo-testnet.org` export const SEGMENT_API_KEY = keyOrUndefined(secretsFile, Config.SECRETS_KEY, 'SEGMENT_API_KEY') export const FIREBASE_WEB_KEY = keyOrUndefined(secretsFile, Config.SECRETS_KEY, 'FIREBASE_WEB_KEY') diff --git a/packages/notification-service/config/config.alfajores.env b/packages/notification-service/config/config.alfajores.env index 69df57b4b03..feccff04e06 100644 --- a/packages/notification-service/config/config.alfajores.env +++ b/packages/notification-service/config/config.alfajores.env @@ -7,4 +7,4 @@ DEFAULT_LOCALE=en NOTIFICATION_TTL_MS=604800000 POLLING_INTERVAL=1000 EXCHANGE_POLLING_INTERVAL=1800000 -WEB3_PROVIDER_URL=http://35.185.236.10:8545 \ No newline at end of file +WEB3_PROVIDER_URL=https://alfajores-forno.celo-testnet.org diff --git a/packages/notification-service/config/config.alfajoresstaging.env b/packages/notification-service/config/config.alfajoresstaging.env index 2e4b534ef48..45cea7016a1 100644 --- a/packages/notification-service/config/config.alfajoresstaging.env +++ b/packages/notification-service/config/config.alfajoresstaging.env @@ -6,4 +6,4 @@ NODE_TLS_REJECT_UNAUTHORIZED=0 DEFAULT_LOCALE=es NOTIFICATION_TTL_MS=604800000 POLLING_INTERVAL=1000 -WEB3_PROVIDER_URL=http://35.233.160.250:8545 \ No newline at end of file +WEB3_PROVIDER_URL=https://alfajoresstaging-forno.celo-testnet.org diff --git a/packages/notification-service/config/config.integration.env b/packages/notification-service/config/config.integration.env index 0ece74786f9..90ddb1d1f59 100644 --- a/packages/notification-service/config/config.integration.env +++ b/packages/notification-service/config/config.integration.env @@ -7,4 +7,4 @@ DEFAULT_LOCALE=en NOTIFICATION_TTL_MS=604800000 POLLING_INTERVAL=1000 EXCHANGE_POLLING_INTERVAL=1800000 -WEB3_PROVIDER_URL=https://integration-forno.celo-testnet.org/ \ No newline at end of file +WEB3_PROVIDER_URL=https://integration-forno.celo-testnet.org diff --git a/packages/notification-service/config/config.local.env b/packages/notification-service/config/config.local.env index b3fa2780e22..89bd2d05065 100644 --- a/packages/notification-service/config/config.local.env +++ b/packages/notification-service/config/config.local.env @@ -8,4 +8,4 @@ GOOGLE_APPLICATION_CREDENTIALS="./config/serviceAccountKey.json" NOTIFICATION_TTL_MS=604800000 POLLING_INTERVAL=5000 EXCHANGE_POLLING_INTERVAL=1800000 -WEB3_PROVIDER_URL=https://integration-forno.celo-testnet.org/ \ No newline at end of file +WEB3_PROVIDER_URL=https://integration-forno.celo-testnet.org diff --git a/packages/notification-service/config/config.pilot.env b/packages/notification-service/config/config.pilot.env index bd8c4c0fa3e..267ac80ba04 100644 --- a/packages/notification-service/config/config.pilot.env +++ b/packages/notification-service/config/config.pilot.env @@ -6,4 +6,4 @@ NODE_TLS_REJECT_UNAUTHORIZED=0 DEFAULT_LOCALE=en NOTIFICATION_TTL_MS=604800000 POLLING_INTERVAL=1000 -WEB3_PROVIDER_URL=http://35.203.185.89:8545 \ No newline at end of file +WEB3_PROVIDER_URL=https://pilot-forno.celo-testnet.org \ No newline at end of file diff --git a/packages/notification-service/config/config.pilotstaging.env b/packages/notification-service/config/config.pilotstaging.env new file mode 100644 index 00000000000..8ef42ad77b5 --- /dev/null +++ b/packages/notification-service/config/config.pilotstaging.env @@ -0,0 +1,9 @@ +ENVIRONMENT=pilotstaging +PORT=80 +FIREBASE_DB=https://celo-org-mobile-pilotstaging.firebaseio.com +BLOCKSCOUT_API=https://pilotstaging-blockscout.celo-testnet.org/api? +NODE_TLS_REJECT_UNAUTHORIZED=0 +DEFAULT_LOCALE=en +NOTIFICATION_TTL_MS=604800000 +POLLING_INTERVAL=1000 +WEB3_PROVIDER_URL=https://pilotstaging-forno.celo-testnet.org \ No newline at end of file diff --git a/packages/notification-service/config/config.test.env b/packages/notification-service/config/config.test.env index b3fa2780e22..89bd2d05065 100644 --- a/packages/notification-service/config/config.test.env +++ b/packages/notification-service/config/config.test.env @@ -8,4 +8,4 @@ GOOGLE_APPLICATION_CREDENTIALS="./config/serviceAccountKey.json" NOTIFICATION_TTL_MS=604800000 POLLING_INTERVAL=5000 EXCHANGE_POLLING_INTERVAL=1800000 -WEB3_PROVIDER_URL=https://integration-forno.celo-testnet.org/ \ No newline at end of file +WEB3_PROVIDER_URL=https://integration-forno.celo-testnet.org