Merge pull request #2998 from KPrasch/testnets

Retires Ibex and Oryx Testnets
pull/3001/head
KPrasch 2022-11-02 18:00:32 +01:00 committed by GitHub
commit 63197eab0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 41 additions and 73 deletions

View File

@ -72,7 +72,7 @@ the role of a ``Teacher``\ , or "seednode":
- mainnet: ``https://mainnet.nucypher.network:9151``
- lynx: ``https://lynx.nucypher.network:9151``
- ibex: ``https://ibex.nucypher.network:9151``
- tapir: ``https://tapir.nucypher.network:9151``
.. code::
@ -163,7 +163,7 @@ After generating a keystore, any future usage can decrypt the keys from the disk
from nucypher.characters.lawful import Alice, Ursula
# Instantiate a default peer (optional)
ursula = Ursula.from_seed_and_stake_info(seed_uri='https://lynx.nucypher.network:9151')
ursula = Ursula.from_seed_and_stake_info(seed_uri='https://tapir.nucypher.network:9151')
# Instantiate Alice
alice = Alice(
@ -171,7 +171,7 @@ After generating a keystore, any future usage can decrypt the keys from the disk
known_nodes=[ursula], # Peers (Optional)
signer=signer, # Alice Wallet
eth_provider_uri=<RPC ENDPOINT>, # Ethereum RPC endpoint
domain='lynx' # PRE Application network (mainnet, lynx, ibex)
domain='tapir' # PRE Application network (mainnet, lynx, tapir)
)
# Alice is identified by her ethereum address
@ -252,7 +252,7 @@ software wallet and an existing keystore:
# Make Alice
alice = Alice(
domain='lynx', # testnet
domain='tapir', # testnet
eth_provider_uri='GOERLI RPC ENDPOINT',
keystore=keystore,
signer=wallet,
@ -325,7 +325,7 @@ Bob's setup is similar to Alice's above.
# alice_verifying_key = <Side Channel>
# Everyone!
ursula = Ursula.from_seed_and_stake_info(seed_uri='https://lynx.nucypher.network:9151')
ursula = Ursula.from_seed_and_stake_info(seed_uri='https://tapir.nucypher.network:9151')
alice = Alice.from_public_keys(verifying_key=alice_verifying_key)
enrico = Enrico(policy_encrypting_key=policy_encrypting_key)
@ -337,7 +337,7 @@ Bob's setup is similar to Alice's above.
bob = Bob(
keystore=keystore,
known_nodes=[ursula],
domain='lynx'
domain='tapir'
)

View File

@ -98,7 +98,7 @@ via Docker
Replace the following values with your own:
* ``<ETH KEYSTORE URI>`` - The local ethereum keystore (e.g. ``keystore:///root/.ethereum/keystore`` for mainnet)
* ``<NETWORK NAME>`` - The name of the PRE network (mainnet, ibex, or lynx)
* ``<NETWORK NAME>`` - The name of the PRE network (mainnet, tapir, or lynx)
* ``<L1 PROVIDER URI>`` - The URI of a local or hosted ethereum node (infura/geth, e.g. ``https://infura.io/…``)
* ``<STAKING PROVIDER ADDRESS>`` - the ethereum address of the staking provider
* ``<OPERATOR ADDRESS>`` - the address of the operator to bond
@ -126,7 +126,7 @@ via Local Installation
Replace the following values with your own:
* ``<ETH KEYSTORE URI>`` - The local ethereum keystore (e.g. ``keystore:///home/<user>/.ethereum/keystore`` for mainnet)
* ``<NETWORK NAME>`` - The name of the PRE network (mainnet, ibex, or lynx)
* ``<NETWORK NAME>`` - The name of the PRE network (mainnet, tapir, or lynx)
* ``<L1 PROVIDER URI>`` - The URI of a local or hosted ethereum node (infura/geth, e.g. ``https://infura.io/…``)
* ``<STAKING PROVIDER ADDRESS>`` - the ethereum address of the staking provider
* ``<OPERATOR ADDRESS>`` - the address of the operator to bond
@ -204,7 +204,7 @@ Replace the following values with your own:
* ``<ETH KEYSTORE URI>`` - The local ethereum keystore (e.g. ``keystore:///root/.ethereum/keystore`` for mainnet)
* ``<L1 PROVIDER URI>`` - The URI of a local or hosted ethereum node (infura/geth, e.g. ``https://infura.io/…``)
* ``<L1 NETWORK NAME>`` - The name of the PRE network (mainnet, ibex, or lynx)
* ``<L1 NETWORK NAME>`` - The name of the PRE network (mainnet, tapir, or lynx)
* ``<L2 PROVIDER URI>`` - The URI of a local or hosted level-two node (infura/bor)
* ``<L2 NETWORK NAME>`` - The name of a payment network (polygon or mumbai)
@ -293,7 +293,7 @@ Replace the following values with your own:
* ``<ETH KEYSTORE URI>`` - The local ethereum keystore (e.g. ``keystore:///home/<user>/.ethereum/keystore`` for mainnet)
* ``<L1 PROVIDER URI>`` - The URI of a local or hosted ethereum node (infura/geth, e.g. ``https://infura.io/…``)
* ``<L1 NETWORK NAME>`` - The name of the PRE network (mainnet, ibex, or lynx)
* ``<L1 NETWORK NAME>`` - The name of the PRE network (mainnet, tapir, or lynx)
* ``<L2 PROVIDER URI>`` - The URI of a local or hosted level-two node (infura/bor)
* ``<L2 NETWORK NAME>`` - The name of a payment network (polygon or mumbai)
@ -409,7 +409,7 @@ Replace the following values with your own:
* ``<ETH KEYSTORE URI>`` - The local ethereum keystore (e.g. ``keystore:///home/<user>/.ethereum/keystore`` for mainnet)
* ``<L1 PROVIDER URI>`` - The URI of a local or hosted ethereum node (infura/geth, e.g. ``https://infura.io/…``)
* ``<L1 NETWORK NAME>`` - The name of the PRE network (mainnet, ibex, or lynx)
* ``<L1 NETWORK NAME>`` - The name of the PRE network (mainnet, tapir, or lynx)
* ``<L2 PROVIDER URI>`` - The URI of a local or hosted level-two node (infura/bor)
* ``<L2 NETWORK NAME>`` - The name of a payment network (polygon or mumbai)
@ -547,7 +547,7 @@ Once the node is running, you can view its public status page at ``https://<node
- *Staking Provider Nickname* - A nickname/codename for the node derived from the Staking Provider address
- *Staking Provider Address* - The Staking Provider address this node is bonded to
- *Client Version* - The version of nucypher this node is running
- *Network Name* - The network this node is running on (mainnet, lynx, or ibex).
- *Network Name* - The network this node is running on (mainnet, lynx, or tapir).
- *Peer Count* - The total number of peers this node has discovered.
- *Fleet State Checksum* - A checksum representing all currently known peers
- *Fleet State Icon* - A visual representation of the fleet state's checksum word and color

View File

@ -1,37 +0,0 @@
.. _ibex-testnet:
=============
Ibex Testnet
=============
NuCypher provides a public testnet running on the Ethereum Rinkeby testnet meant for staking providers and node operators
to learn how to set up a PRE application node, as well as for internal development purposes.
The Threshold Token (T) contract address for the testnet is ``0xc3871E2C11Ff18d809Bce74d1e4229d561aa3F09``.
You can view it on `etherscan <https://rinkeby.etherscan.io/address/0xc3871e2c11ff18d809bce74d1e4229d561aa3f09>`_.
.. attention::
This testnet is currently being migrated to Threshold Network.
Stake and Bond
--------------
You need some Rinkeby testnet ETH and 40,000 T in a metamask wallet.
Ask in the discord if you need help with this.
Navigate to the `Testnet Staking Dashboard <https://dn3gsazzaajb.cloudfront.net/manage/stake>`_ and connect your metamask wallet.
Go to the **stake** tab and click "Stake liquid T on mainnet"
.. image:: ../.static/img/testnet_stake_dashboard.png
:target: ../.static/img/testnet_stake_dashboard.png
Allow the 40,000 T spend, and then stake it.
Both transactions will require authorization via metamask.
You can ignore the **Configure Addresses** option - they should all default to the currently connected account.
Once those transactions are confirmed, switch to the **bond** tab.
Here you will paste the Operator address that is being printed by the docker logs:
.. image:: ../.static/img/testnet_bond_dashboard.png
:target: ../.static/img/testnet_bond_dashboard.png

View File

@ -25,7 +25,7 @@ and adding your provider and wallet details. To set the variables in your curre
Optionally, you can change the network the demo is running on by changing the value of `L1_NETWORK` and `L2_NETWORK`.
If you change these values be sure to also change `L1_PROVIDER_URI` and `L2_PROVIDER_URI` accordingly.
Available options for `L1_NETWORK` are `ibex` or `mainnet`.
Available options for `L1_NETWORK` are `tapir` or `mainnet`.
Available options for `L2_NETWORK` are `mumbai` or `mainnet`
Ensure Alice's account has a bit of MATIC on polygon to pay for the policy.

View File

@ -63,7 +63,7 @@ print("\n************** Setup **************\n")
# NuCypher Network #
####################
L1_NETWORK = 'mainnet' # or 'ibex'
L1_NETWORK = 'mainnet' # or 'tapir'
L2_NETWORK = 'polygon' # or 'mumbai'
#####################

View File

@ -58,7 +58,7 @@ try:
except KeyError:
raise RuntimeError('Missing environment variables to run demo.')
L1_NETWORK = 'mainnet' # 'ibex'
L1_NETWORK = 'mainnet' # 'tapir'
L2_NETWORK = 'polygon' # 'mumbai'

View File

@ -38,7 +38,7 @@ from nucypher.utilities.logging import GlobalLoggerSettings
GlobalLoggerSettings.start_console_logging()
L1_NETWORK = 'mainnet' # 'ibex'
L1_NETWORK = 'mainnet' # 'tapir'
# To create a Bob, we need the doctor's private keys previously generated.
from doctor_keys import get_doctor_privkeys

View File

@ -47,7 +47,7 @@ and adding your provider and wallet details. To set the variables in your curre
Optionally, you can change the network the demo is running on by changing the value of `L1_NETWORK` and `L2_NETWORK`.
If you change these values be sure to also change `L1_PROVIDER_URI` and `L2_PROVIDER_URI` accordingly.
Available options for `L1_NETOWRK` are `ibex` or `mainnet`.
Available options for `L1_NETOWRK` are `tapir` or `mainnet`.
Available options for `L2_NETWORK` are `mumbai` or `polygon`
Ensure Alice's account has a bit of MATIC on polygon to pay for the policy.

View File

@ -0,0 +1,2 @@
Retires the Ibex and Oryx testnets

View File

@ -4,20 +4,27 @@ This directory contains an authoritative source of contract registries for sever
These registries comprise the official addresses and ABIs for the networks' smart contracts.
## Current networks
## Current deployments
* `mainnet`: The main NuCypher Network, offering cryptographic runtimes for secrets management and dynamic access control 🚀
* Running on Ethereum Mainnet
* Main contract addresses:
* [**NuCypherToken**](https://etherscan.io/address/0x4fE83213D56308330EC302a8BD641f1d0113A4Cc): `0x4fE83213D56308330EC302a8BD641f1d0113A4Cc`
* [**StakingEscrow (Dispatcher)**](https://etherscan.io/address/0xbbD3C0C794F40c4f993B03F65343aCC6fcfCb2e2): `0xbbD3C0C794F40c4f993B03F65343aCC6fcfCb2e2`
* [**PolicyManager (Dispatcher)**](https://etherscan.io/address/0x67E4A942c067Ff25cE7705B69C318cA2Dfa54D64): `0x67E4A942c067Ff25cE7705B69C318cA2Dfa54D64`
* [**Adjudicator (Dispatcher)**](https://etherscan.io/address/0x359924Be0640659F34198e518BF3d40Fb56160BE): `0x359924Be0640659F34198e518BF3d40Fb56160BE`
* [**WorkLock**](https://etherscan.io/address/0xe9778e69a961e64d3cdbb34cf6778281d34667c2): `0xe9778e69a961e64d3cdbb34cf6778281d34667c2`
* `lynx`: Public Long-Term Support testnet, intended as a stable playground for network users (e.g., Alices wishing to create sharing policies). Running on Ethereum Goerli testnet.
* `ibex`: Public testnet, intended as a playground for stakers & node operators (e.g., learning how to create and manage stakes, setting up a node), as well as for internal development purposes. Running on Ethereun Rinkeby testnet.
* [**NuCypherToken**](https://etherscan.io/address/0x4fE83213D56308330EC302a8BD641f1d0113A4Cc): `0x4fE83213D56308330EC302a8BD641f1d0113A4Cc`
* [**StakingEscrow (Dispatcher)**](https://etherscan.io/address/0xbbD3C0C794F40c4f993B03F65343aCC6fcfCb2e2): `0xbbD3C0C794F40c4f993B03F65343aCC6fcfCb2e2`
* [**PolicyManager (Dispatcher)**](https://etherscan.io/address/0x67E4A942c067Ff25cE7705B69C318cA2Dfa54D64): `0x67E4A942c067Ff25cE7705B69C318cA2Dfa54D64`
* [**Adjudicator (Dispatcher)**](https://etherscan.io/address/0x359924Be0640659F34198e518BF3d40Fb56160BE): `0x359924Be0640659F34198e518BF3d40Fb56160BE`
* [**WorkLock**](https://etherscan.io/address/0xe9778e69a961e64d3cdbb34cf6778281d34667c2): `0xe9778e69a961e64d3cdbb34cf6778281d34667c2`
* [**SimplePREApplication**](https://etherscan.io/address/0x7E01c9c03FD3737294dbD7630a34845B0F70E5Dd): `0x7E01c9c03FD3737294dbD7630a34845B0F70E5Dd`
* `polygon-mainnet`: Used for cost-effective PRE subscription payments
* [**SubscriptionManager**](https://polygonscan.com/address/0xB0194073421192F6Cf38d72c791Be8729721A0b3): `0xB0194073421192F6Cf38d72c791Be8729721A0b3`
* `polygon-mumbai`:
* [**SubscriptionManager**](https://mumbai.polygonscan.com/address/0xb9015d7B35Ce7c81ddE38eF7136Baa3B1044f313): `0xb9015d7B35Ce7c81ddE38eF7136Baa3B1044f313`
* `tapir`: Public Long-Term Support testnet, intended as a stable playground for network users (Goerli) testnet.
* [**TestnetThresholdStaking**](https://goerli.etherscan.io/address/0x09B5065d2924De33C85F76474A89A27189402064): `0x09B5065d2924De33C85F76474A89A27189402064`
* [**SimplePREApplication**](https://goerli.etherscan.io/address/0xaF96aa6000ec2B6CF0Fe6B505B6C33fa246967Ca): `0xaF96aa6000ec2B6CF0Fe6B505B6C33fa246967Ca`
* `lynx`: Internal development testnet, chaotic, used for experimental code and staging. (Goerli).
* [**TestnetThresholdStaking**](https://goerli.etherscan.io/address/0x81eEefb7B1b3313C89976910096F8f1487301Bb1): `0x81eEefb7B1b3313C89976910096F8f1487301Bb1`
* [**SimplePREApplication**](https://goerli.etherscan.io/address/0x685b8Fd02aB87d8FfFff7346cB101A5cE4185bf3): `0x685b8Fd02aB87d8FfFff7346cB101A5cE4185bf3`
## Historical networks
## Historical deployments
The following is a list of networks that we used at some point in the past and that are currently deprecated:
@ -25,3 +32,5 @@ The following is a list of networks that we used at some point in the past and t
* `frances`: Our second testnet. Only for development purposes.
* `cassandra`: Incentivized Testnet, supporting our 'Come and Stake It' initiative.
* `gemini`: New version of Incentivized Testnet, supporting Phase 4 of 'Come and Stake It'.
* `ibex`: Public testnet, intended as a playground for stakers & node operators (e.g., learning how to create and manage stakes, setting up a node), as well as for internal development purposes. Running on Ethereun Rinkeby testnet.
* `oryx`: Staking testnet on Ropsten for initial threshold network integration

View File

@ -19,9 +19,7 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
class NetworksInventory: # TODO: See #1564
MAINNET = "mainnet"
IBEX = "ibex"
LYNX = "lynx"
ORYX = "oryx"
ETH = "ethereum"
TAPIR = "tapir"
@ -34,8 +32,6 @@ class NetworksInventory: # TODO: See #1564
__to_chain_id_eth = {
MAINNET: 1, # Ethereum Mainnet
ORYX: 3, # Ropsten
IBEX: 4, # Rinkeby
LYNX: 5, # Goerli
TAPIR: 5, # Goerli
}

View File

@ -68,8 +68,6 @@ TEACHER_NODES = {
),
NetworksInventory.LYNX: ("https://lynx.nucypher.network:9151",),
NetworksInventory.TAPIR: ("https://tapir.nucypher.network:9151",),
NetworksInventory.IBEX: ("https://ibex.nucypher.network:9151",),
NetworksInventory.ORYX: ("https://oryx.nucypher.network:9151",),
}

View File

@ -51,7 +51,7 @@ except IndexError:
try:
network = sys.argv[1]
except IndexError:
network = "ibex"
network = "tapir"
BlockchainInterfaceFactory.initialize_interface(eth_provider_uri=eth_provider_uri, light=False, emitter=emitter)
blockchain = BlockchainInterfaceFactory.get_interface(eth_provider_uri=eth_provider_uri)

View File

@ -69,7 +69,7 @@ except KeyError:
raise RuntimeError(message)
# Alice Configuration
DOMAIN: str = 'mainnet' # ibex
DOMAIN: str = 'mainnet' # tapir
DEFAULT_SEEDNODE_URIS: List[str] = [
*TEACHER_NODES[DOMAIN],
]