diff --git a/.github/workflows/manual-deploy-testnet-validator.yml b/.github/workflows/manual-deploy-testnet-validator.yml index 03fd4a3995..0e1490f6f1 100644 --- a/.github/workflows/manual-deploy-testnet-validator.yml +++ b/.github/workflows/manual-deploy-testnet-validator.yml @@ -6,7 +6,7 @@ # # # # README # # # # # # 1 - Fetch the Management, Msg Bus Contract addresses and L1 Start Hash from: -# curl -X POST erpc.dev-testnet.obscu.ro:80 -H 'Content-Type: application/json' \ +# curl -X POST erpc.dev-testnet.ten.xyz:80 -H 'Content-Type: application/json' \ # -d '{"jsonrpc":"2.0","method":"obscuro_config","params":[],"id":1}' # # 2 - Update the secrets in Github diff --git a/.github/workflows/runner-scripts/wait-node-healthy.sh b/.github/workflows/runner-scripts/wait-node-healthy.sh index 93eb53897c..2af0673d6f 100755 --- a/.github/workflows/runner-scripts/wait-node-healthy.sh +++ b/.github/workflows/runner-scripts/wait-node-healthy.sh @@ -9,7 +9,7 @@ help_and_exit() { echo "" echo "Usage: " echo " ex: " - echo " - $(basename "${0}") --host=erpc.uat-testnet.obscu.ro --port=80" + echo " - $(basename "${0}") --host=erpc.uat-testnet.ten.xyz --port=80" echo "" echo " node *Required* Set the host address" echo "" diff --git a/README.md b/README.md index 53dda54b4f..8025017ef9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Go Ten -This repository contains the reference implementation of the [Ten Protocol](https://whitepaper.obscu.ro/). +This repository contains the reference implementation of the [Ten Protocol](https://whitepaper.ten.xyz/). *Note that this is still very much a work in progress, so there are many rough edges and unfinished components.* @@ -62,7 +62,7 @@ extracts useful information from them, such as published rollups, deposits to th at this level to rollback the Ten state accordingly. To avoid the risk of the Enclave being fed invalid blocks which an attacker can use to probe for information, or to shorten the -[revelation period](https://whitepaper.obscu.ro/ten-whitepaper/detailed-design.html#revelation-mechanism), the blocks have to be checked for validity, which includes checking that enough "work" went into them. +[revelation period](https://whitepaper.ten.xyz/ten-whitepaper/detailed-design.html#revelation-mechanism), the blocks have to be checked for validity, which includes checking that enough "work" went into them. To achieve this we depend on the [Blockchain](https://github.com/ethereum/go-ethereum/blob/e6fa102eb08c2b83ab75e85ca7860eea3a10dab0/core/blockchain.go) logic. @@ -183,7 +183,7 @@ The missing link to achieving fully private transactions while allowing end-user wallets (like MetaMask). This is a very thin component that is responsible for encrypting and decrypting traffic between the Ten node and its clients. -See the [docs](https://docs.obscu.ro/wallet-extension/wallet-extension/) for more information. +See the [docs](https://docs.ten.xyz/wallet-extension/wallet-extension/) for more information. ## Repository Structure @@ -388,7 +388,7 @@ Remix (see[docs/testnet/deploying-a-smart-contract.md](docs/testnet/deploying-a- e.g. using web3.py(see [docs/testnet/deploying-a-smart-contract-programmatically.md](docs/testnet/deploying-a-smart-contract-programmatically.md)). Note that in order to interact with the main cloud hosted testnet, all that needs to be changed is to start the wallet -extension using the default parameters, where the `nodeHost` will default to the testnet host URL `erpc.sepolia-testnet.obscu.ro` i.e. +extension using the default parameters, where the `nodeHost` will default to the testnet host URL `erpc.sepolia-testnet.ten.xyz` i.e. ``` cd ./tools/walletextension/main/ diff --git a/design/README.md b/design/README.md index 4ac7ca164e..c0cf65e9d5 100644 --- a/design/README.md +++ b/design/README.md @@ -1,6 +1,6 @@ # Ten design documents -Ten started based on a (whitepaper)[https://whitepaper.obscu.ro/] published in Nov. 2021. +Ten started based on a (whitepaper)[https://whitepaper.ten.xyz/] published in Nov. 2021. As we started development, we started thinking more deeply about some aspects and also getting feedback from the community and the users. diff --git a/design/architecture/overall_design.md b/design/architecture/overall_design.md index adf98da79e..54c11442f7 100644 --- a/design/architecture/overall_design.md +++ b/design/architecture/overall_design.md @@ -3,7 +3,7 @@ ## Scope The purpose of this document is to describe aspects of Ten's technical design that are not addressed in the -[Ten whitepaper](https://whitepaper.obscu.ro/). +[Ten whitepaper](https://whitepaper.ten.xyz/). ## Overview @@ -17,7 +17,7 @@ The following additional components must be developed: * **The enclave:** The trusted part of the Ten node that runs inside a trusted execution environment (TEE) * **The host:** The remainder of the Ten node that runs outside the TEE * **The Ten management contract:** The Ethereum mainnet contracts required by the Ten protocol, described - [here](https://whitepaper.obscu.ro/ten-whitepaper/l1-contracts) + [here](https://whitepaper.ten.xyz/ten-whitepaper/l1-contracts) * **Client apps:** Applications that interact with the Ten node (e.g. Ten wallets) ## Host/enclave split diff --git a/docs/README.md b/docs/README.md index 1aaa40ff31..02abab4575 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # Ten Doc Site -This is the Ten Doc Site and it looks like [this](https://docs.obscu.ro/). +This is the Ten Doc Site and it looks like [this](https://docs.ten.xyz/). ## Adding New Doc Site Pages @@ -14,7 +14,7 @@ This is the Ten Doc Site and it looks like [this](https://docs.obscu.ro/). 4. Push your changes to tennet/go-ten 5. GitHub Pages will trigger a GitHub Action to use a Jekyll build job to create the static content and then publish the pages at the custom URL. -6. Browse to https://docs.obscu.ro/ and check your content. Remember your browser will cache some of the pages so hit +6. Browse to https://docs.ten.xyz/ and check your content. Remember your browser will cache some of the pages so hit refresh a few times if it looks like the content is missing or the navigation menu is incorrect. ## Updating Existing Doc Site Pages diff --git a/docs/_config.yml b/docs/_config.yml index 95648d1fe9..66821585a7 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -6,7 +6,7 @@ minimal_mistakes_skin: "default" locale: "en-UK" title: "Obscuro" description: "Obscuro is an Ethereum-compatible confidential smart contract L2 network." -url: "https://obscu.ro" +url: "https://ten.xyz" name: "Obscuro" repository: "obscuronet/obscuro.github.io" diff --git a/docs/_data/navigation.yml b/docs/_data/navigation.yml index 9b425affa1..d79ae35c87 100644 --- a/docs/_data/navigation.yml +++ b/docs/_data/navigation.yml @@ -1,10 +1,10 @@ main: - title: "Whitepaper" - url: https://whitepaper.obscu.ro + url: https://whitepaper.ten.xyz - title: "Tokenomics" url: https://github.com/obscuronet/foundation/blob/main/token-utility-whitepaper.md - title: "Community Contributions" - url: https://docs.obscu.ro/community/contributions + url: https://docs.ten.xyz/community/contributions - title: "Get Help" url: https://discord.gg/yQfmKeNzNd diff --git a/docs/_docs/api/sensitive-apis.md b/docs/_docs/api/sensitive-apis.md index b8188a990e..45f5c18af6 100644 --- a/docs/_docs/api/sensitive-apis.md +++ b/docs/_docs/api/sensitive-apis.md @@ -7,7 +7,7 @@ Ten supports a subset of Ethereum's [JSON-RPC API](https://ethereum.org/en/devel Some of these methods deal with sensitive information. For example, the response to an `eth_getBalance` request will contain the balance of an account. An attacker could intercept this response to discover a user's balance. To avoid this, the requests and responses for methods deemed sensitive are encrypted and decrypted by the -[wallet extension](https://docs.obscu.ro/wallet-extension/wallet-extension). To ensure a good user experience, this process is +[wallet extension](https://docs.ten.xyz/wallet-extension/wallet-extension). To ensure a good user experience, this process is invisible to the end user. This page details which JSON-RPC API methods are deemed sensitive, and the rules governing who is able to decrypt the diff --git a/docs/_docs/community/contributions.md b/docs/_docs/community/contributions.md index 38a49831f0..f57fc0ad16 100644 --- a/docs/_docs/community/contributions.md +++ b/docs/_docs/community/contributions.md @@ -4,7 +4,7 @@ Ten will evolve to be *the* solution for privacy on Ethereum through the strength and dedication of the Ten community. Together we'll make Ten the most community-driven project in crypto. -As detailed in the [whitepaper](https://whitepaper.obscu.ro), Ten is powered by TEN, a native utility token that provides security to the Ten network while allowing holders to pay transaction fees. +As detailed in the [whitepaper](https://whitepaper.ten.xyz), Ten is powered by TEN, a native utility token that provides security to the Ten network while allowing holders to pay transaction fees. 2% of tokens are set aside for early contributors. Each contributor's allocation is a percentage of their total contributions against the entire community contribution. diff --git a/docs/_docs/testnet/Introduction.md b/docs/_docs/testnet/Introduction.md index efc0bba8e0..35f452edf3 100644 --- a/docs/_docs/testnet/Introduction.md +++ b/docs/_docs/testnet/Introduction.md @@ -5,11 +5,11 @@ This section contains detailed on how to connect, build and deploy on Evan's Cat Evan's Cat can also be used by end users to help test Ten and test developer dApps. Evan's Cat does not focus on node operators. Support for node operators will arrive in the next version of testnet. -Developers can expect frequent updates which will be communicated [here](https://docs.obscu.ro/testnet/changelog). The trade-off is that in the early days Testnet will have some sharp edges and unexpected surprises. More specifically, whilst Testnet is in its infancy: +Developers can expect frequent updates which will be communicated [here](https://docs.ten.xyz/testnet/changelog). The trade-off is that in the early days Testnet will have some sharp edges and unexpected surprises. More specifically, whilst Testnet is in its infancy: * Ten Testnet will crash from time to time, and will frequently be updated with new features. * When Ten Testnet restarts expect to lose everything. * Ten Testnet code has not been optimised or audited yet. (Mainnet code will be audited prior to launch.) -* The [Wallet extension](https://docs.obscu.ro/wallet-extension/wallet-extension) is still being improved. +* The [Ten Gateway](https://docs.ten.xyz/docs/tools-infrastructure/hosted-gateway) is still being improved. * The decryption key is known by all allowing you to decrypt and view everything. This also allows the wider community to support you in development. All Ten code is under an open source licence. If you see something you think could be improved or reworked feel free to submit a PR in the [go-ten repo](https://github.com/ten-protocol/go-ten), or to let us know about your suggestion on [Discord](https://discord.com/channels/916052669955727371/945360340613484684). diff --git a/docs/_docs/testnet/changelog.md b/docs/_docs/testnet/changelog.md index 2301203481..dc714fcadb 100644 --- a/docs/_docs/testnet/changelog.md +++ b/docs/_docs/testnet/changelog.md @@ -787,22 +787,22 @@ * The list of sensitive RPC API methods, where the request and response is encrypted in transit, now covers `eth_call`, `eth_estimateGas`, `eth_getBalance`, `eth_getLogs`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt` and `eth_sendRawTransaction`. See the Obscuro - [documentation](https://docs.obscu.ro/api/sensitive-apis/) for more details. + [documentation](https://docs.ten.xyz/api/sensitive-apis/) for more details. * Calls to wait for a transaction receipt are now blocking, whereas previously they would return an error meaning the client side code needed to perform a specific wait and poll loop. The example on how to [programmatically deploy - a contract](https://docs.obscu.ro/testnet/deploying-a-smart-contract-programmatically/) has been updated accordingly. + a contract](https://docs.ten.xyz/testnet/deploying-a-smart-contract-programmatically/) has been updated accordingly. * The ability to start a faucet server against a local testnet deployment is now supported via a docker container. For more information see the Obscuro [readme](https://github.com/ten-protocol/go-ten#building-and-running-a-local-faucet). * Updates to the [Events](https://github.com/ten-protocol/go-ten/blob/main/design/ux/Events_design.md) design inclusion of the [Fast Finality](https://github.com/ten-protocol/go-ten/blob/main/design/finality_protocol/fast_finality.md) design. -* The [Obscuro docs site](https://docs.obscu.ro/) is now searchable. +* The [Obscuro docs site](https://docs.ten.xyz/) is now searchable. * Testnet is now officially termed `Evan's Cat`. * ObscuroScan: * ObscuroScan supports a single API at [/rollup/](http://testnet.obscuroscan.io/rollup/) which allows web clients to access a JSON representation of rollups and encrypted transactions. Further details - [here](https://docs.obscu.ro/testnet/obscuroscan) + [here](https://docs.ten.xyz/testnet/obscuroscan) ## October 2022-10-21 (v0.5) * Event Subscriptions: @@ -814,7 +814,7 @@ * Wallet extension: * The wallet extension now supports separate ports for HTTP and WebSocket connections. Use the `--port` and `--portWS` command line options respectively for each. For more information see the - [Wallet extension](https://docs.obscu.ro/wallet-extension/wallet-extension) documentation. + [Wallet extension](https://docs.ten.xyz/wallet-extension/wallet-extension) documentation. * Event subscription: * An early preview of event subscriptions is available in this release, though note that this is still undergoing testing and feature enhancements and therefore is liable to issues and instability. For more information on the diff --git a/docs/_docs/testnet/deploying-a-smart-contract-programmatically.md b/docs/_docs/testnet/deploying-a-smart-contract-programmatically.md index 36c9a00d69..cdf54eb92a 100644 --- a/docs/_docs/testnet/deploying-a-smart-contract-programmatically.md +++ b/docs/_docs/testnet/deploying-a-smart-contract-programmatically.md @@ -13,7 +13,7 @@ the local host with default values `WHOST=127.0.0.1` and `WPORT=3000`. A walk through and explanation of the steps performed is given below; ## Connect to the network and create a local private key -The [wallet extension](https://docs.obscu.ro/wallet-extension/wallet-extension/) acts as an HTTP server to mediate RPC requests. In the +The [wallet extension](https://docs.ten.xyz/wallet-extension/wallet-extension/) acts as an HTTP server to mediate RPC requests. In the below a connection is made on the wallet extension host and port, a private key is locally created and the associated account stored for later usage. diff --git a/docs/_docs/testnet/deploying-a-smart-contract.md b/docs/_docs/testnet/deploying-a-smart-contract.md index d549a6aa58..ab69a1778e 100644 --- a/docs/_docs/testnet/deploying-a-smart-contract.md +++ b/docs/_docs/testnet/deploying-a-smart-contract.md @@ -5,12 +5,12 @@ Using the steps below you will add an extension to your MetaMask wallet so it ca ## Prerequisites * [MetaMask](https://metamask.io/) wallet installed in your browser. -* A local copy of the [Ten MetaMask wallet extension](https://docs.obscu.ro/wallet-extension/wallet-extension/) +* A local copy of the [Ten MetaMask wallet extension](https://docs.ten.xyz/wallet-extension/wallet-extension/) ## Prepare Your MetaMask Wallet for Ten Testnet An essential part of how Ten provides full privacy is the encryption of communication between an Ten application and Ten nodes on the network. -Follow the steps [here](https://docs.obscu.ro/wallet-extension/wallet-extension/) to configure and start the wallet extension and +Follow the steps [here](https://docs.ten.xyz/wallet-extension/wallet-extension/) to configure and start the wallet extension and generate a viewing key. @@ -32,7 +32,7 @@ You can now go ahead and deploy your smart contract to the Ten Testnet. 1. Compile your smart contract using the Remix Solidity Compiler. -1. Log in to MetaMask and confirm you are connected to Ten Testnet network. The parameters for the Ten Testnet can be found [here](https://docs.obscu.ro/testnet/essentials/). +1. Log in to MetaMask and confirm you are connected to Ten Testnet network. The parameters for the Ten Testnet can be found [here](https://docs.ten.xyz/testnet/essentials/). 1. In the _Deploy & Run Transactions_ section of Remix change the Environment to _Injected Web3_. This tells Remix to use the network settings currently configured in your MetaMask wallet, which in this case is the Ten Testnet. If the connection to Ten Testnet is successful you will see the text _Custom (443) network_ displayed under _Injected Web3_. @@ -48,4 +48,4 @@ Congratulations, your smart contract is now deployed to Ten Testnet! Because Ten provides full privacy, the details of your transaction are encrypted and only visible to you, as the holder of your wallet's private key. -Now head over to the [TenScan page](https://docs.obscu.ro/testnet/tenscan/) to see how you can view the transaction details. +Now head over to the [TenScan page](https://docs.ten.xyz/testnet/tenscan/) to see how you can view the transaction details. diff --git a/docs/_docs/testnet/essentials.md b/docs/_docs/testnet/essentials.md index 20b2f2d18e..cb2ec55e3f 100644 --- a/docs/_docs/testnet/essentials.md +++ b/docs/_docs/testnet/essentials.md @@ -14,8 +14,8 @@ These are the key limitations to be aware of when developing for the Evan's Cat 1. The "Wallet Extension" is not fully polished yet. You can expect a better UX as Ten develops ## Connection to an Ten Node -- **RPC http address:** `erpc.sepolia-testnet.obscu.ro:80` -- **RPC websocket address:** `erpc.sepolia-testnet.obscu.ro:81` +- **RPC http address:** `erpc.sepolia-testnet.ten.xyz:80` +- **RPC websocket address:** `erpc.sepolia-testnet.ten.xyz:81` ## Rollup Encryption/Decryption Key The symmetric key used to encrypt and decrypt transaction blobs in rollups on the Ten Testnet: diff --git a/docs/_docs/testnet/example-dapps.md b/docs/_docs/testnet/example-dapps.md index ea375db34c..821e52ce8a 100644 --- a/docs/_docs/testnet/example-dapps.md +++ b/docs/_docs/testnet/example-dapps.md @@ -11,7 +11,7 @@ Consider for a moment how a secret number could be created without divulging it. Building the guessing game in Ten addresses both scenarios described above. The guessing game smart contract generates a random secret number when it is deployed. This number is never revealed to a player or node operator, or indeed anybody because it is generated within a Trusted Execution Environment. And when players make their guesses the transactions carrying the guesses are encrypted and therefore obscured in a block explorer. ### How to Play -1. Start up the wallet extension. Follow instructions [here](https://docs.obscu.ro/wallet-extension/wallet-extension). +1. Start up the wallet extension. Follow instructions [here](https://docs.ten.xyz/wallet-extension/wallet-extension). 1. For the moment, the Guessing Game includes an ERC20 token (called OGG, short for Ten Guessing Game). This is partly because OGG is modified to have a built-in faucet: It allocates tokens to addresses as they make a request to allow other addresses to take tokens from their account. 1. If you want to see this balance in your wallet, you have to import a new Token with the address: ``0x5FbDB2315678afecb367f032d93F642f64180aa3`` 1. Browse to [the number guessing game](http://tennet.github.io/sample-applications/number-guessing-game). Check you see `Network ID: 443` at the top of the game window to confirm you are connected to Ten Testnet. @@ -24,7 +24,7 @@ Building the guessing game in Ten addresses both scenarios described above. The 1. The game should show you two messages, one confirming the success of the Approval transaction, and the second confirming the result of the guess attempt (whether correct, wrong, warmer or colder than the last guess). Once the guess transaction is completed you can check the guess transaction on TenScan: -1. In MetaMask click on the transaction to open it then click `Copy Transaction ID`. Open [TenScan](http://testnet.tenscan.io/). +1. In MetaMask click on the transaction to open it then click `Copy Transaction ID`. Open [TenScan](https://testnet.tenscan.io/). 1. Paste your copied transaction ID into the search box to find your individual guess transaction. Note how the transaction data visible to everyone is encrypted in the field `EncryptedTxBlob` and how (for now) the transaction is decrypted to allow developers to confirm correct behaviour of the network. 1. You can see your guess as the number at the right hand end of the `input` value in a hexadecimal format, e.g. a guess of 99 is shown as 63. @@ -36,4 +36,4 @@ Once the guess transaction is completed you can check the guess transaction on T ### Next Steps Now you have enjoyed playing the guessing game you are invited to make it even better! Go ahead and fork the guessing game code in this [GitHub repository](https://github.com/ten-protocol/number-guessing-game) and bring your own contributions to Ten Testnet. -Of course, you are free to [deploy any smart contract](https://docs.obscu.ro/testnet/deploying-a-smart-contract) to the testnet. +Of course, you are free to [deploy any smart contract](https://docs.ten.xyz/testnet/deploying-a-smart-contract) to the testnet. diff --git a/docs/_docs/testnet/faucet.md b/docs/_docs/testnet/faucet.md index 53777a402c..c3952b1c60 100644 --- a/docs/_docs/testnet/faucet.md +++ b/docs/_docs/testnet/faucet.md @@ -6,7 +6,7 @@ Using the steps below you will request testnet ETH from the faucet available on ## Prerequisites * Access to the [Ten Discord server](https://discord.gg/yQfmKeNzNd). * (Optional) [MetaMask](https://metamask.io/) wallet installed in your browser. -* (Optional) A local copy of the [Ten MetaMask wallet extension](https://docs.obscu.ro/wallet-extension/wallet-extension/). +* (Optional) A local copy of the [Ten MetaMask wallet extension](https://docs.ten.xyz/wallet-extension/wallet-extension/). ## Requesting Testnet ETH 1. Make a note of your wallet address or copy it to your clipboard. @@ -21,7 +21,7 @@ Using the steps below you will request testnet ETH from the faucet available on ## Viewing Your Wallet Balance To view the balance of your wallet you will need to establish a connection from your wallet to the Ten Testnet. An essential part of how Ten provides full privacy is the encryption of communication between an Ten application and Ten nodes on the network. As a result, you will need to use the wallet extension to allow your wallet to communication with the Ten Testnet. -Use the steps [here](https://docs.obscu.ro/testnet/deploying-a-smart-contract/#prepare-your-metamask-wallet-for-ten-testnet) to prepare your MetaMask wallet for Ten Testnet. +Use the steps [here](https://docs.ten.xyz/testnet/deploying-a-smart-contract/#prepare-your-metamask-wallet-for-ten-testnet) to prepare your MetaMask wallet for Ten Testnet. ## Requesting Testnet ETH directly In the event that you do not have access to Discord, or the faucet bot is not working, you can request ETH directly from diff --git a/docs/_docs/testnet/obscuroscan.md b/docs/_docs/testnet/obscuroscan.md index d65ab5b026..6ae93e3502 100644 --- a/docs/_docs/testnet/obscuroscan.md +++ b/docs/_docs/testnet/obscuroscan.md @@ -7,7 +7,7 @@ as well as search for historical rollups and transactions. Its functionality wil ## Usage -1. Go to the [TenScan landing page](http://testnet.tenscan.io/) +1. Go to the [TenScan landing page](https://testnet.tenscan.io) 2. Observe the feed of latest rollups and transactions. Click on any rollup number or transaction hash to see the details of the corresponding rollup and the L1 block where it was published 3. From the search bar in the top right, search for any rollup (using its number, e.g. `2453`) or transaction (using diff --git a/docs/_docs/testnet/tutorial.md b/docs/_docs/testnet/tutorial.md index 02a354bc0e..9e73ae7454 100644 --- a/docs/_docs/testnet/tutorial.md +++ b/docs/_docs/testnet/tutorial.md @@ -27,8 +27,8 @@ The dApp has many of the features that you'd expect to find, including: # Set up your environment - You'll need to install MetaMask following the instructions [here](https://metamask.io/) -- Then download and run the Ten Wallet extension following the instructions [here](https://docs.obscu.ro/wallet-extension/wallet-extension) -- Now connect MetaMask to the Ten testnet following the instructions [here](https://docs.obscu.ro/wallet-extension/configure-metamask) +- Then download and run the Ten Wallet extension following the instructions [here](https://docs.ten.xyz/wallet-extension/wallet-extension) +- Now connect MetaMask to the Ten testnet following the instructions [here](https://docs.ten.xyz/wallet-extension/configure-metamask) - Finally, check you can open the Remix IDE by visiting the following URL in your browser https://remix.ethereum.org That's it. You're all set to start building your first dApp on Ten. @@ -156,7 +156,7 @@ Our function to return the prize pool is: And that's it! Congratulations on writing your first Ten smart contract! -You can now go ahead and deploy the contract following the instructions [here](https://docs.obscu.ro/testnet/deploying-a-smart-contract) +You can now go ahead and deploy the contract following the instructions [here](https://docs.ten.xyz/testnet/deploying-a-smart-contract) With that done, why not have a go at extending the contract to include warmer/colder functionality. Then, when a returning player plays again for the same again, if their new guess is closer to the previous guess, they're told they're *warmer*, and if it's further, they're *colder*. diff --git a/docs/_docs/wallet-extension/wallet-extension.md b/docs/_docs/wallet-extension/wallet-extension.md index 1af5ce0ae9..97829ea09f 100644 --- a/docs/_docs/wallet-extension/wallet-extension.md +++ b/docs/_docs/wallet-extension/wallet-extension.md @@ -11,7 +11,7 @@ between MetaMask and an Ten host without ever knowing your wallet's private keys The wallet extension performs two functions: * Encrypting outgoing RPC requests using the public key of the Ten enclave. -* Decrypting incoming RPC responses for [privacy-sensitive requests](https://docs.obscu.ro/api/sensitive-apis/) (e.g. `eth_getBalance`, +* Decrypting incoming RPC responses for [privacy-sensitive requests](https://docs.ten.xyz/api/sensitive-apis/) (e.g. `eth_getBalance`, `eth_call` and `eth_getTransactionReceipt`) using an address-specific _viewing key_. _Viewing keys_ are ephemeral public keys generated by the wallet extension. They are sent to the enclave, accompanied @@ -54,7 +54,7 @@ tools. * `port` (default: `3000`): The local port on which to serve the wallet extension. * `portWS` (default: `3001`): The local port on which to handle websocket requests. - * `nodeHost` (default: `erpc.sepolia-testnet.obscu.ro`): The Ten node for the RPC connection. + * `nodeHost` (default: `erpc.sepolia-testnet.ten.xyz`): The Ten node for the RPC connection. * `nodePortHTTP` (default: `80`): The Ten node's HTTP RPC port. * `nodePortWS` (default: `81`): The Ten node's websockets RPC port. * `logPath` (default: `wallet_extension_logs.txt`): The path for the wallet extension's logs. @@ -64,7 +64,7 @@ tools. The wallet extension is now listening on the specified host and port. For the remainder of this document, we'll assume that the default ports of `3000` and `3001` were selected. -3. Sign in to MetaMask and add the Ten Testnet network following the instructions [here](https://docs.obscu.ro/wallet-extension/configure-metamask). +3. Sign in to MetaMask and add the Ten Testnet network following the instructions [here](https://docs.ten.xyz/wallet-extension/configure-metamask). 4. At this stage, no viewing key has been set up. The enclave will refuse to respond to sensitive RPC requests such as `eth_getBalance`, `eth_call` and `eth_getTransactionReceipt`. As a result, your balance in MetaMask will not be @@ -73,7 +73,7 @@ tools. 5. Visit `http://localhost:3000/viewingkeys/` to generate a new viewing key, and sign the viewing key when prompted by MetaMask. Responses to sensitive RPC requests will now be encrypted with the viewing key and decrypted automatically by the wallet extension. Your balance in MetaMask will be set to 0 at the beginning. - You can get testnet ETH from [faucet](https://docs.obscu.ro/testnet/faucet/) (you may need to switch to another network and back again to force MetaMask to refresh balance). + You can get testnet ETH from [faucet](https://docs.ten.xyz/testnet/faucet/) (you may need to switch to another network and back again to force MetaMask to refresh balance). Once a viewing key is generated it will be persisted across restarts of the wallet extension, saved in the user home space under `~/.obscuro/wallet_extension_persistence`. diff --git a/docs/_docs/what-is-obscuro/encrypted-ethereum.md b/docs/_docs/what-is-obscuro/encrypted-ethereum.md index 34397ad0c5..59dc92066e 100644 --- a/docs/_docs/what-is-obscuro/encrypted-ethereum.md +++ b/docs/_docs/what-is-obscuro/encrypted-ethereum.md @@ -1,7 +1,7 @@ --- --- # Encrypted Ethereum -_The full Litepaper is available to view [here](https://obscu.ro/litepaper)._ +_The full Litepaper is available to view [here](https://ten.xyz/litepaper)._ Ten brings to Ethereum what HTTPS brought to Web 2 leading to an explosion in applications and usage. Ten achieves this goal by building an encrypted Ethereum Layer 2, leveraging the consensus and security of Ethereum. diff --git a/docs/_docs/what-is-obscuro/privacy-matters.md b/docs/_docs/what-is-obscuro/privacy-matters.md index 30dfcba61b..8cb7d00d58 100644 --- a/docs/_docs/what-is-obscuro/privacy-matters.md +++ b/docs/_docs/what-is-obscuro/privacy-matters.md @@ -1,7 +1,7 @@ --- --- # Privacy -_The full Litepaper is available to view [here](https://obscu.ro/litepaper)._ +_The full Litepaper is available to view [here](https://ten.xyz/litepaper)._ The privacy Ten provides can be split into transactional and computational privacy. diff --git a/docs/index.md b/docs/index.md index d39421ad95..0de9aa65e6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,9 +8,9 @@ Ten hyper-scales and encrypts Ethereum. 100% EVM, 100% Solidity. On this docsite you will find useful guidance on Ten, how to participate in the Testnet and, if you want to go deeper, read the whitepaper using the menu above. -The Litepaper is available to view [here](https://obscu.ro/litepaper). +The Litepaper is available to view [here](https://ten.xyz/litepaper). -A PDF version of the whitepaper is available [here](https://whitepaper.obscu.ro/assets/images/obscuro-whitepaper-0-10-0.pdf). +A PDF version of the whitepaper is available [here](https://whitepaper.ten.xyz/assets/images/obscuro-whitepaper-0-10-0.pdf). ## Useful Resources diff --git a/integration/faucet/faucet_test.go b/integration/faucet/faucet_test.go index b9a093a1a4..03302d1ac5 100644 --- a/integration/faucet/faucet_test.go +++ b/integration/faucet/faucet_test.go @@ -49,7 +49,6 @@ func TestFaucet(t *testing.T) { time.Sleep(2 * time.Second) faucetConfig := &faucet.Config{ - Port: startPort, Host: "localhost", HTTPPort: startPort + integration.DefaultHostRPCHTTPOffset, PK: "0x" + contractDeployerPrivateKeyHex, diff --git a/integration/manualtests/client_test.go b/integration/manualtests/client_test.go index 7360af1c91..5643cd8e90 100644 --- a/integration/manualtests/client_test.go +++ b/integration/manualtests/client_test.go @@ -16,7 +16,7 @@ func TestClientGetRollup(t *testing.T) { if os.Getenv(_IDEFlag) == "" { t.Skipf("set flag %s to run this test in the IDE", _IDEFlag) } - hostRPCAddress := "http://erpc.sepolia-testnet.obscu.ro:80" + hostRPCAddress := "http://erpc.sepolia-testnet.ten.xyz:80" client, err := rpc.NewNetworkClient(hostRPCAddress) assert.Nil(t, err) diff --git a/integration/manualtests/connection_test.go b/integration/manualtests/connection_test.go index 9935df547d..01f64bb8fc 100644 --- a/integration/manualtests/connection_test.go +++ b/integration/manualtests/connection_test.go @@ -18,8 +18,8 @@ func TestSubscribeToOG(t *testing.T) { t.Skip("skip manual tests") // Using http - ogHTTPAddress := "https://dev-testnet.obscu.ro:443" - ogWSAddress := "wss://dev-testnet.obscu.ro:81" + ogHTTPAddress := "https://dev-testnet.ten.xyz:443" + ogWSAddress := "wss://dev-testnet.ten.xyz:81" // ogWSAddress := "ws://51.132.131.47:81" ogClient := lib.NewTenGatewayLibrary(ogHTTPAddress, ogWSAddress) diff --git a/integration/manualtests/tx_test.go b/integration/manualtests/tx_test.go index d79336487d..7dfd7a4477 100644 --- a/integration/manualtests/tx_test.go +++ b/integration/manualtests/tx_test.go @@ -34,7 +34,7 @@ const ( // Testnet values used for quick debugging: // l1 host: testnet-eth2network.uksouth.cloudapp.azure.com // l1 port: 9000 -// l2 host: erpc.testnet.obscu.ro +// l2 host: erpc.testnet.ten.xyz // l2 port: 81 // l2wallet: 8dfb8083da6275ae3e4f41e3e8a8c19d028d32c9247e24530933782f2a05035b -> 0xA58C60cc047592DE97BF1E8d2f225Fc5D959De77 @@ -50,7 +50,7 @@ var ( "4bfe14725e685901c062ccd4e220c61cf9c189897b6c78bd18d7f51291b2b8f8", 777, gethlog.New()) - l2Host = "erpc.uat-testnet.obscu.ro" + l2Host = "erpc.uat-testnet.ten.xyz" l2Port = 81 ) diff --git a/integration/networktest/env/network_setup.go b/integration/networktest/env/network_setup.go index ad36a02c69..464fc829ff 100644 --- a/integration/networktest/env/network_setup.go +++ b/integration/networktest/env/network_setup.go @@ -7,28 +7,28 @@ import ( func SepoliaTestnet() networktest.Environment { connector := NewTestnetConnector( - "http://erpc.sepolia-testnet.obscu.ro:80", // this is actually a validator... - []string{"http://erpc.sepolia-testnet.obscu.ro:80"}, + "http://erpc.sepolia-testnet.ten.xyz:80", // this is actually a validator... + []string{"http://erpc.sepolia-testnet.ten.xyz:80"}, "http://sepolia-testnet-faucet.uksouth.azurecontainer.io/fund/eth", "https://rpc.sepolia.org/", ) return &testnetEnv{connector} } -func Testnet() networktest.Environment { +func UATTestnet() networktest.Environment { connector := NewTestnetConnector( - "http://erpc.uat-testnet.obscu.ro:80", // this is actually a validator... - []string{"http://erpc.uat-testnet.obscu.ro:80"}, - "http://testnet-faucet.uksouth.azurecontainer.io/fund/eth", - "ws://testnet-eth2network.uksouth.cloudapp.azure.com:9000", + "http://erpc.uat-testnet.ten.xyz:80", // this is actually a validator... + []string{"http://erpc.uat-testnet.ten.xyz:80"}, + "http://uat-testnet-faucet.uksouth.azurecontainer.io/fund/eth", + "ws://uat-testnet-eth2network.uksouth.cloudapp.azure.com:9000", ) return &testnetEnv{connector} } func DevTestnet() networktest.Environment { connector := NewTestnetConnector( - "http://erpc.dev-testnet.obscu.ro:80", // this is actually a validator... - []string{"http://erpc.dev-testnet.obscu.ro:80"}, + "http://erpc.dev-testnet.ten.xyz:80", // this is actually a validator... + []string{"http://erpc.dev-testnet.ten.xyz:80"}, "http://dev-testnet-faucet.uksouth.azurecontainer.io/fund/eth", "ws://dev-testnet-eth2network.uksouth.cloudapp.azure.com:9000", ) diff --git a/planning/testnet-kpis.md b/planning/testnet-kpis.md index 82dee84433..5bdabc7a97 100644 --- a/planning/testnet-kpis.md +++ b/planning/testnet-kpis.md @@ -19,7 +19,7 @@ Key performance indicators (KPIs) will be used to determine the amount of Testne ### Selected KPIs for Developers | KPI NAME | RATIONALE | SOURCE | METRIC | TARGET | |--|--|--|--|--| -| Testnet documentation page views (https://docs.obscu.ro/testnet/) | Gauges interest from developers in building on testnet. A good early indicator. Straightforward to capture | Google Analytics | Number of unique page views in the last 4 weeks |50| +| Testnet documentation page views (https://docs.ten.xyz/testnet/) | Gauges interest from developers in building on testnet. A good early indicator. Straightforward to capture | Google Analytics | Number of unique page views in the last 4 weeks |50| |DApps in development| This is difficult to measure as it’s not something we can look to the network to accurately measure. We can use our business development CRM data as an indicator. | Airtable "Partnerships" tab| Number of partners with status changed to "Soft Commitment" in the last 4 weeks|40| | New dApps deployed on Testnet| Indicates how much new activity and commitment of effort from dApp builders| TenScan?| Number of new dApp addresses deployed in the last 4 weeks|20| diff --git a/testnet/launcher/docker.go b/testnet/launcher/docker.go index 2f254307e1..10443d5cb7 100644 --- a/testnet/launcher/docker.go +++ b/testnet/launcher/docker.go @@ -10,6 +10,8 @@ import ( "github.com/ten-protocol/go-ten/go/obsclient" "github.com/ten-protocol/go-ten/go/rpc" "github.com/ten-protocol/go-ten/testnet/launcher/eth2network" + "github.com/ten-protocol/go-ten/testnet/launcher/faucet" + "github.com/ten-protocol/go-ten/testnet/launcher/gateway" l1cd "github.com/ten-protocol/go-ten/testnet/launcher/l1contractdeployer" l2cd "github.com/ten-protocol/go-ten/testnet/launcher/l2contractdeployer" @@ -149,6 +151,57 @@ func (t *Testnet) Start() error { } fmt.Println("L2 Contracts were successfully deployed...") + faucetPort := 99 + faucetInst, err := faucet.NewDockerFaucet( + faucet.NewFaucetConfig( + faucet.WithFaucetPort(faucetPort), + faucet.WithTenNodePort(13010), + faucet.WithTenNodeHost("validator-host"), + faucet.WithFaucetPrivKey("0x8dfb8083da6275ae3e4f41e3e8a8c19d028d32c9247e24530933782f2a05035b"), + faucet.WithDockerImage("testnetobscuronet.azurecr.io/obscuronet/faucet:latest"), + ), + ) + if err != nil { + return fmt.Errorf("unable to instantiate faucet - %w", err) + } + + if err = faucetInst.Start(); err != nil { + return fmt.Errorf("unable to start faucet - %w", err) + } + + if err = faucetInst.IsReady(); err != nil { + return fmt.Errorf("unable to wait for faucet to be ready - %w", err) + } + + fmt.Printf("Faucet ready to be accessed at http://127.0.0.1:%d/ ...\n", faucetPort) + fmt.Printf("Fund your account with `curl --request POST 'http://127.0.0.1:%d/fund/eth' --header 'Content-Type: application/json' --data-raw '{ \"address\":\"0x0....\" } `\n", faucetPort) + + gatewayPort := 3000 + gatewayInst, err := gateway.NewDockerGateway( + gateway.NewGatewayConfig( + gateway.WithGatewayHTTPPort(gatewayPort), + gateway.WithGatewayWSPort(3001), + gateway.WithTenNodeHTTPPort(13010), + gateway.WithTenNodeWSPort(13011), + gateway.WithTenNodeHost("validator-host"), + gateway.WithDockerImage("testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway:latest"), + ), + ) + if err != nil { + return fmt.Errorf("unable to instantiate gateway - %w", err) + } + + if err = gatewayInst.Start(); err != nil { + return fmt.Errorf("unable to start gateway - %w", err) + } + + if err = gatewayInst.IsReady(); err != nil { + return fmt.Errorf("unable to wait for gateway to be ready - %w", err) + } + + fmt.Printf("Gateway ready to be accessed at http://127.0.0.1:%d ...\n", gatewayPort) + + fmt.Println("Network successfully launched !") return nil } diff --git a/testnet/launcher/faucet/config.go b/testnet/launcher/faucet/config.go new file mode 100644 index 0000000000..8279890eea --- /dev/null +++ b/testnet/launcher/faucet/config.go @@ -0,0 +1,53 @@ +package faucet + +// Option is a function that applies configs to a Config Object +type Option = func(c *Config) + +// Config holds the properties that configure the package +type Config struct { + tenNodeHost string + tenNodePort int + faucetPort int + faucetPrivKey string + dockerImage string +} + +func NewFaucetConfig(opts ...Option) *Config { + defaultConfig := &Config{} + + for _, opt := range opts { + opt(defaultConfig) + } + + return defaultConfig +} + +func WithTenNodeHost(s string) Option { + return func(c *Config) { + c.tenNodeHost = s + } +} + +func WithFaucetPrivKey(s string) Option { + return func(c *Config) { + c.faucetPrivKey = s + } +} + +func WithDockerImage(s string) Option { + return func(c *Config) { + c.dockerImage = s + } +} + +func WithTenNodePort(i int) Option { + return func(c *Config) { + c.tenNodePort = i + } +} + +func WithFaucetPort(i int) Option { + return func(c *Config) { + c.faucetPort = i + } +} diff --git a/testnet/launcher/faucet/docker.go b/testnet/launcher/faucet/docker.go new file mode 100644 index 0000000000..c6d9fd734a --- /dev/null +++ b/testnet/launcher/faucet/docker.go @@ -0,0 +1,55 @@ +package faucet + +import ( + "fmt" + "time" + + "github.com/sanity-io/litter" + "github.com/ten-protocol/go-ten/go/common/docker" + "github.com/ten-protocol/go-ten/go/common/retry" + "github.com/valyala/fasthttp" +) + +type DockerFaucet struct { + cfg *Config +} + +func NewDockerFaucet(cfg *Config) (*DockerFaucet, error) { + return &DockerFaucet{ + cfg: cfg, + }, nil // todo (@pedro) - add validation +} + +func (n *DockerFaucet) Start() error { + fmt.Printf("Starting faucet with config: \n%s\n\n", litter.Sdump(*n.cfg)) + + cmds := []string{ + "/home/obscuro/go-obscuro/tools/faucet/cmd/faucet", + "--nodeHost", n.cfg.tenNodeHost, + "--nodePort", fmt.Sprintf("%d", n.cfg.tenNodePort), + "--pk", n.cfg.faucetPrivKey, + "--jwtSecret", "someKey", + "--serverPort", fmt.Sprintf("%d", n.cfg.faucetPort), + } + + _, err := docker.StartNewContainer("faucet", n.cfg.dockerImage, cmds, []int{n.cfg.faucetPort}, nil, nil, nil) + return err +} + +func (n *DockerFaucet) IsReady() error { + timeout := time.Minute + interval := time.Second + + return retry.Do(func() error { + statusCode, _, err := fasthttp.Get(nil, fmt.Sprintf("http://127.0.0.1:%d/health/", n.cfg.faucetPort)) + if err != nil { + return err + } + + if statusCode != fasthttp.StatusOK { + return fmt.Errorf("status not ok - status received: %s", fasthttp.StatusMessage(statusCode)) + } + + return nil + }, retry.NewTimeoutStrategy(timeout, interval)) +} diff --git a/testnet/launcher/gateway/config.go b/testnet/launcher/gateway/config.go new file mode 100644 index 0000000000..507d5e6a19 --- /dev/null +++ b/testnet/launcher/gateway/config.go @@ -0,0 +1,60 @@ +package gateway + +// Option is a function that applies configs to a Config Object +type Option = func(c *Config) + +// Config holds the properties that configure the package +type Config struct { + tenNodeHost string + tenNodeHTTPPort int + tenNodeWSPort int + gatewayHTTPPort int + gatewayWSPort int + dockerImage string +} + +func NewGatewayConfig(opts ...Option) *Config { + defaultConfig := &Config{} + + for _, opt := range opts { + opt(defaultConfig) + } + + return defaultConfig +} + +func WithTenNodeHost(s string) Option { + return func(c *Config) { + c.tenNodeHost = s + } +} + +func WithDockerImage(s string) Option { + return func(c *Config) { + c.dockerImage = s + } +} + +func WithTenNodeHTTPPort(i int) Option { + return func(c *Config) { + c.tenNodeHTTPPort = i + } +} + +func WithTenNodeWSPort(i int) Option { + return func(c *Config) { + c.tenNodeWSPort = i + } +} + +func WithGatewayHTTPPort(i int) Option { + return func(c *Config) { + c.gatewayHTTPPort = i + } +} + +func WithGatewayWSPort(i int) Option { + return func(c *Config) { + c.gatewayWSPort = i + } +} diff --git a/testnet/launcher/gateway/docker.go b/testnet/launcher/gateway/docker.go new file mode 100644 index 0000000000..1827516cf9 --- /dev/null +++ b/testnet/launcher/gateway/docker.go @@ -0,0 +1,57 @@ +package gateway + +import ( + "fmt" + "time" + + "github.com/sanity-io/litter" + "github.com/ten-protocol/go-ten/go/common/docker" + "github.com/ten-protocol/go-ten/go/common/retry" + "github.com/valyala/fasthttp" +) + +type DockerGateway struct { + cfg *Config +} + +func NewDockerGateway(cfg *Config) (*DockerGateway, error) { + return &DockerGateway{ + cfg: cfg, + }, nil // todo (@pedro) - add validation +} + +func (n *DockerGateway) Start() error { + fmt.Printf("Starting gateway with config: \n%s\n\n", litter.Sdump(*n.cfg)) + + cmds := []string{ + "/home/obscuro/go-obscuro/tools/walletextension/bin/wallet_extension_linux", + "--host", "0.0.0.0", + "--port", fmt.Sprintf("%d", n.cfg.gatewayHTTPPort), + "--portWS", fmt.Sprintf("%d", n.cfg.gatewayWSPort), + "--nodePortHTTP", fmt.Sprintf("%d", n.cfg.tenNodeHTTPPort), + "--nodePortWS", fmt.Sprintf("%d", n.cfg.tenNodeWSPort), + "--nodeHost", n.cfg.tenNodeHost, + "--dbType", "sqlite", + } + + _, err := docker.StartNewContainer("gateway", n.cfg.dockerImage, cmds, []int{n.cfg.gatewayHTTPPort, n.cfg.gatewayWSPort}, nil, nil, nil) + return err +} + +func (n *DockerGateway) IsReady() error { + timeout := time.Minute + interval := time.Second + + return retry.Do(func() error { + statusCode, _, err := fasthttp.Get(nil, fmt.Sprintf("http://127.0.0.1:%d/health/", n.cfg.gatewayHTTPPort)) + if err != nil { + return err + } + + if statusCode != fasthttp.StatusOK { + return fmt.Errorf("status not ok - status received: %s", fasthttp.StatusMessage(statusCode)) + } + + return nil + }, retry.NewTimeoutStrategy(timeout, interval)) +} diff --git a/tools/faucet/README.md b/tools/faucet/README.md index e2bf4994d6..718a9aca5e 100644 --- a/tools/faucet/README.md +++ b/tools/faucet/README.md @@ -1,7 +1,7 @@ # Ten Faucet This tools contains a Faucet to allow allocation of ETH tokens within an Ten network. For more information -on Ten see the [Ten repo](https://github.com/ten-protocol/go-ten) and [documentation](https://docs.obscu.ro/). +on Ten see the [Ten repo](https://github.com/ten-protocol/go-ten) and [documentation](https://docs.ten.xyz/). ## Repository Structure The top level structure of the tool is as below; diff --git a/tools/faucet/cmd/cli.go b/tools/faucet/cmd/cli.go index 5f8832b29c..0b3c045998 100644 --- a/tools/faucet/cmd/cli.go +++ b/tools/faucet/cmd/cli.go @@ -11,13 +11,9 @@ import ( const ( // Flag names, defaults and usages. - faucetPortName = "port" - faucetPortDefault = 80 - faucetPortUsage = "The port on which to serve the faucet endpoint. Default: 80." - nodeHostName = "nodeHost" - nodeHostDefault = "erpc.sepolia-testnet.obscu.ro" - nodeHostUsage = "The host on which to connect to the Obscuro node. Default: `erpc.sepolia-testnet.obscu.ro`." + nodeHostDefault = "erpc.sepolia-testnet.ten.xyz" + nodeHostUsage = "The host on which to connect to the Obscuro node. Default: `erpc.sepolia-testnet.ten.xyz`." nodeHTTPPortName = "nodePort" nodeHTTPPortDefault = 80 @@ -41,7 +37,6 @@ const ( ) func parseCLIArgs() *faucet.Config { - faucetPort := flag.Int(faucetPortName, faucetPortDefault, faucetPortUsage) nodeHost := flag.String(nodeHostName, nodeHostDefault, nodeHostUsage) nodeHTTPPort := flag.Int(nodeHTTPPortName, nodeHTTPPortDefault, nodeHTTPPortUsage) faucetPK := flag.String(faucetPKName, faucetPKDefault, faucetPKUsage) @@ -51,7 +46,6 @@ func parseCLIArgs() *faucet.Config { flag.Parse() return &faucet.Config{ - Port: *faucetPort, Host: *nodeHost, HTTPPort: *nodeHTTPPort, PK: *faucetPK, diff --git a/tools/faucet/faucet/faucet_config.go b/tools/faucet/faucet/faucet_config.go index 81ccb1db41..ff3a0d1030 100644 --- a/tools/faucet/faucet/faucet_config.go +++ b/tools/faucet/faucet/faucet_config.go @@ -3,7 +3,6 @@ package faucet import "math/big" type Config struct { - Port int Host string HTTPPort int PK string diff --git a/tools/faucet/webserver/web_server.go b/tools/faucet/webserver/web_server.go index 542024b68a..e2fce87f43 100644 --- a/tools/faucet/webserver/web_server.go +++ b/tools/faucet/webserver/web_server.go @@ -37,6 +37,8 @@ func NewWebServer(faucetServer *faucet.Faucet, bindAddress string, jwtSecret []b r.GET("/balance", balanceReqHandler(faucetServer)) + r.GET("/health", healthReqHandler()) + return &WebServer{ engine: r, faucet: faucetServer, @@ -170,3 +172,10 @@ func balanceReqHandler(faucetServer *faucet.Faucet) gin.HandlerFunc { c.JSON(http.StatusOK, gin.H{"balance": balance.String()}) } } + +// returns the remaining native balance of the faucet +func healthReqHandler() gin.HandlerFunc { + return func(c *gin.Context) { + c.JSON(http.StatusOK, gin.H{"healthy": true}) + } +} diff --git a/tools/tenscan/backend/cmd/cli.go b/tools/tenscan/backend/cmd/cli.go index fe51f124c8..b6cb7ba274 100644 --- a/tools/tenscan/backend/cmd/cli.go +++ b/tools/tenscan/backend/cmd/cli.go @@ -8,7 +8,7 @@ import ( func parseCLIArgs() *config.Config { defaultConfig := &config.Config{ - NodeHostAddress: "http://erpc.dev-testnet.obscu.ro:80", + NodeHostAddress: "http://erpc.dev-testnet.ten.xyz:80", ServerAddress: "0.0.0.0:80", LogPath: "tenscan_logs.txt", } diff --git a/tools/tenscan/frontend/public/docs/privacy.json b/tools/tenscan/frontend/public/docs/privacy.json index 03dfcf9203..bcdd41c9f1 100644 --- a/tools/tenscan/frontend/public/docs/privacy.json +++ b/tools/tenscan/frontend/public/docs/privacy.json @@ -5,7 +5,7 @@ { "heading": "1. LEGAL INFORMATION", "content": [ - "This Privacy Policy informs how Obscuro Limited (hereinafter also – ”Controller”, “Owner”,” we”, “us” or “our”) processes information and personal data on the website https://www.obscu.ro/ as well as any other media form, media channel, mobile website or mobile application related, linked, or otherwise connected thereto (hereinafter – Platform).", + "This Privacy Policy informs how Obscuro Limited (hereinafter also – ”Controller”, “Owner”,” we”, “us” or “our”) processes information and personal data on the website https://www.ten.xyz/ as well as any other media form, media channel, mobile website or mobile application related, linked, or otherwise connected thereto (hereinafter – Platform).", "We strive to protect all personal information that we receive or generate. This Privacy Policy (“Privacy Policy” or “Policy”) explains our data protection practices for our visitors. This Privacy Policy also explains the nature of the personal information we collect, the means by which we collect it, the purposes for which we collect it, and how we use, process, protect, and share it.", "Please read this entire Privacy Policy before submitting information to this Platform. By accessing or using this Platform for any purpose and by submitting any of your personal information to us, you are consenting to the terms and conditions of this Policy and to our Terms of Service posted on this Platform. If you disagree with any part of this Privacy Policy or the Terms of Service, please do not use this Platform or any of our other services and do not share any personal information with us.", "Data Controller: Obscuro Limited, company incorporated and registered in England and Wales under company number 13873741 with a registered office at Ground Floor, Cromwell House, 15 Andover Road, Winchester, SO23 7BT, UK.", diff --git a/tools/tenscan/frontend/src/lib/siteMetadata.ts b/tools/tenscan/frontend/src/lib/siteMetadata.ts index f6c47dae6a..de13a1ea29 100644 --- a/tools/tenscan/frontend/src/lib/siteMetadata.ts +++ b/tools/tenscan/frontend/src/lib/siteMetadata.ts @@ -6,7 +6,7 @@ export const siteMetadata = { "Ten, a decentralized Layer 2 Rollup protocol designed to hyper-scale and encrypt the Ethereum blockchain.", description: "Tenscan allows you to explore and search activities taking place on the Ten Layer 2 blockchain", - siteUrl: "https://obscu.ro", + siteUrl: "https://ten.xyz", siteLogo: ``, siteLogoSquare: ``, email: "team@obscu.ro", diff --git a/tools/walletextension/Dockerfile b/tools/walletextension/Dockerfile index bbc53fcbc1..ffa9722f3f 100644 --- a/tools/walletextension/Dockerfile +++ b/tools/walletextension/Dockerfile @@ -35,11 +35,11 @@ COPY . /home/obscuro/go-obscuro # Create .env file for frontend WORKDIR /home/obscuro/go-obscuro/tools/walletextension/frontend RUN if [ "$TESTNET_TYPE" = "dev-testnet" ]; then \ - echo "NEXT_PUBLIC_API_GATEWAY_URL=https://dev-testnet.obscu.ro" > .env; \ + echo "NEXT_PUBLIC_API_GATEWAY_URL=https://dev-testnet.ten.xyz" > .env; \ elif [ "$TESTNET_TYPE" = "uat-testnet" ]; then \ - echo "NEXT_PUBLIC_API_GATEWAY_URL=https://uat-testnet.obscu.ro" > .env; \ + echo "NEXT_PUBLIC_API_GATEWAY_URL=https://uat-testnet.ten.xyz" > .env; \ elif [ "$TESTNET_TYPE" = "sepolia-testnet" ]; then \ - echo "NEXT_PUBLIC_API_GATEWAY_URL=https://testnet.obscu.ro" > .env; \ + echo "NEXT_PUBLIC_API_GATEWAY_URL=https://testnet.ten.xyz" > .env; \ else \ echo "NEXT_PUBLIC_API_GATEWAY_URL=http://127.0.0.1:3000" > .env; \ fi diff --git a/tools/walletextension/README.md b/tools/walletextension/README.md index d11b4da5cc..b1e568f86b 100644 --- a/tools/walletextension/README.md +++ b/tools/walletextension/README.md @@ -1,6 +1,6 @@ # The Ten gateway -See the documentation [here](https://docs.obscu.ro/wallet-extension/wallet-extension/). +See the documentation [here](https://docs.ten.xyz/wallet-extension/wallet-extension/). ## Developer notes diff --git a/tools/walletextension/container_run.sh b/tools/walletextension/container_run.sh index 58c053c218..8329fce4d1 100755 --- a/tools/walletextension/container_run.sh +++ b/tools/walletextension/container_run.sh @@ -11,7 +11,7 @@ set -euo pipefail port=3000 portWS=3001 host="0.0.0.0" -nodeHost="erpc.sepolia-testnet.obscu.ro" +nodeHost="erpc.sepolia-testnet.ten.xyz" nodePortHTTP=80 nodePortWS=81 logPath="wallet_extension_logs.txt" diff --git a/tools/walletextension/frontend/README.md b/tools/walletextension/frontend/README.md index 8c477a6554..7ec178be52 100644 --- a/tools/walletextension/frontend/README.md +++ b/tools/walletextension/frontend/README.md @@ -40,9 +40,9 @@ Create a `.env.local` file in the root directory of the project and add the foll ``` Possible values for `NEXT_PUBLIC_API_GATEWAY_URL` are: - - `https://https://uat-testnet.obscu.ro` - - `https://https://sepolia-testnet.obscu.ro` - - `https://https://dev-testnet.obscu.ro` + - `https://https://uat-testnet.ten.xyz` + - `https://https://sepolia-testnet.ten.xyz` + - `https://https://dev-testnet.ten.xyz` 4. **Run the Development Server:** ```bash diff --git a/tools/walletextension/frontend/public/docs/privacy.json b/tools/walletextension/frontend/public/docs/privacy.json index 03dfcf9203..bcdd41c9f1 100644 --- a/tools/walletextension/frontend/public/docs/privacy.json +++ b/tools/walletextension/frontend/public/docs/privacy.json @@ -5,7 +5,7 @@ { "heading": "1. LEGAL INFORMATION", "content": [ - "This Privacy Policy informs how Obscuro Limited (hereinafter also – ”Controller”, “Owner”,” we”, “us” or “our”) processes information and personal data on the website https://www.obscu.ro/ as well as any other media form, media channel, mobile website or mobile application related, linked, or otherwise connected thereto (hereinafter – Platform).", + "This Privacy Policy informs how Obscuro Limited (hereinafter also – ”Controller”, “Owner”,” we”, “us” or “our”) processes information and personal data on the website https://www.ten.xyz/ as well as any other media form, media channel, mobile website or mobile application related, linked, or otherwise connected thereto (hereinafter – Platform).", "We strive to protect all personal information that we receive or generate. This Privacy Policy (“Privacy Policy” or “Policy”) explains our data protection practices for our visitors. This Privacy Policy also explains the nature of the personal information we collect, the means by which we collect it, the purposes for which we collect it, and how we use, process, protect, and share it.", "Please read this entire Privacy Policy before submitting information to this Platform. By accessing or using this Platform for any purpose and by submitting any of your personal information to us, you are consenting to the terms and conditions of this Policy and to our Terms of Service posted on this Platform. If you disagree with any part of this Privacy Policy or the Terms of Service, please do not use this Platform or any of our other services and do not share any personal information with us.", "Data Controller: Obscuro Limited, company incorporated and registered in England and Wales under company number 13873741 with a registered office at Ground Floor, Cromwell House, 15 Andover Road, Winchester, SO23 7BT, UK.", diff --git a/tools/walletextension/frontend/src/lib/constants.ts b/tools/walletextension/frontend/src/lib/constants.ts index c53be91c08..d034e59722 100644 --- a/tools/walletextension/frontend/src/lib/constants.ts +++ b/tools/walletextension/frontend/src/lib/constants.ts @@ -15,18 +15,18 @@ export const GOOGLE_ANALYTICS_ID = process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID; export const testnetUrls = { sepolia: { name: "Obscuro Testnet", - url: "https://sepolia-testnet.obscu.ro", - rpc: "https://rpc.sepolia-testnet.obscu.ro", + url: "https://sepolia-testnet.ten.xyz", + rpc: "https://rpc.sepolia-testnet.ten.xyz", }, uat: { name: "Ten UAT-Testnet", - url: "https://uat-testnet.obscu.ro", - rpc: "https://rpc.uat-testnet.obscu.ro", + url: "https://uat-testnet.ten.xyz", + rpc: "https://rpc.uat-testnet.ten.xyz", }, dev: { name: "Ten Dev-Testnet", - url: "https://dev-testnet.obscu.ro", - rpc: "https://rpc.dev-testnet.obscu.ro", + url: "https://dev-testnet.ten.xyz", + rpc: "https://rpc.dev-testnet.ten.xyz", }, default: { name: "Obscuro Testnet", diff --git a/tools/walletextension/frontend/src/lib/siteMetadata.ts b/tools/walletextension/frontend/src/lib/siteMetadata.ts index 70544f59b9..00f812a90b 100644 --- a/tools/walletextension/frontend/src/lib/siteMetadata.ts +++ b/tools/walletextension/frontend/src/lib/siteMetadata.ts @@ -6,7 +6,7 @@ export const siteMetadata = { "Ten, a decentralized Layer 2 Rollup protocol designed to hyper-scale and encrypt the Ethereum blockchain.", description: "Ten, a decentralized Ethereum Layer 2 Rollup protocol designed to hyper-scale, encrypt and prevent negative MEV on Ethereum.", - siteUrl: "https://obscu.ro", + siteUrl: "https://ten.xyz", siteLogo: ``, siteLogoSquare: ``, email: "team@obscu.ro", diff --git a/tools/walletextension/main/cli.go b/tools/walletextension/main/cli.go index 119a4b9289..e69ae73708 100644 --- a/tools/walletextension/main/cli.go +++ b/tools/walletextension/main/cli.go @@ -21,8 +21,8 @@ const ( walletExtensionPortWSUsage = "The port on which to serve websocket JSON RPC requests. Default: 3001." nodeHostName = "nodeHost" - nodeHostDefault = "erpc.sepolia-testnet.obscu.ro" - nodeHostUsage = "The host on which to connect to the Obscuro node. Default: `erpc.sepolia-testnet.obscu.ro`." + nodeHostDefault = "erpc.sepolia-testnet.ten.xyz" + nodeHostUsage = "The host on which to connect to the Obscuro node. Default: `erpc.sepolia-testnet.ten.xyz`." nodeHTTPPortName = "nodePortHTTP" nodeHTTPPortDefault = 80 diff --git a/tools/walletextension/useraccountmanager/user_account_manager.go b/tools/walletextension/useraccountmanager/user_account_manager.go index 0c787a8b07..8da88e9bea 100644 --- a/tools/walletextension/useraccountmanager/user_account_manager.go +++ b/tools/walletextension/useraccountmanager/user_account_manager.go @@ -3,6 +3,7 @@ package useraccountmanager import ( "encoding/hex" "fmt" + "sync" "github.com/ethereum/go-ethereum/common" gethlog "github.com/ethereum/go-ethereum/log" @@ -18,6 +19,7 @@ type UserAccountManager struct { storage storage.Storage hostRPCBinAddr string logger gethlog.Logger + mu sync.RWMutex } func NewUserAccountManager(unauthenticatedClient rpc.Client, logger gethlog.Logger, storage storage.Storage, hostRPCBindAddr string) UserAccountManager { @@ -32,6 +34,8 @@ func NewUserAccountManager(unauthenticatedClient rpc.Client, logger gethlog.Logg // AddAndReturnAccountManager adds new UserAccountManager if it doesn't exist and returns it, if UserAccountManager already exists for that user just return it func (m *UserAccountManager) AddAndReturnAccountManager(userID string) *accountmanager.AccountManager { + m.mu.RLock() + defer m.mu.RUnlock() existingUserAccountManager, exists := m.userAccountManager[userID] if exists { return existingUserAccountManager @@ -47,6 +51,8 @@ func (m *UserAccountManager) AddAndReturnAccountManager(userID string) *accountm // (we are not loading all of them at startup to limit the number of established connections) // If a UserAccountManager does not exist for the userID, it returns nil and an error. func (m *UserAccountManager) GetUserAccountManager(userID string) (*accountmanager.AccountManager, error) { + m.mu.Lock() + defer m.mu.Unlock() userAccManager, exists := m.userAccountManager[userID] if !exists { return nil, fmt.Errorf("UserAccountManager doesn't exist for user: %s", userID) @@ -103,6 +109,8 @@ func (m *UserAccountManager) GetUserAccountManager(userID string) (*accountmanag // DeleteUserAccountManager removes the UserAccountManager associated with the given userID. // It returns an error if no UserAccountManager exists for that userID. func (m *UserAccountManager) DeleteUserAccountManager(userID string) error { + m.mu.Lock() + defer m.mu.Unlock() _, exists := m.userAccountManager[userID] if !exists { return fmt.Errorf("no UserAccountManager exists for userID %s", userID)