From 2e095046360f720b0685e3ae84f1b88853f57f38 Mon Sep 17 00:00:00 2001 From: Daniel Kronovet Date: Tue, 10 Dec 2024 13:45:15 -0500 Subject: [PATCH 1/3] Remove Goerli from codebase --- .circleci/config.yml | 5 ----- contracts/colonyNetwork/ColonyNetworkENS.sol | 2 -- contracts/common/MultiChain.sol | 5 ----- docs/guides/reputation-mining-client.md | 2 +- packages/reputation-miner/bin/index.js | 2 +- test/misc/chainid.js | 6 ------ 6 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6622e68db2..c73da43929 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -314,11 +314,6 @@ jobs: command: CHAIN_ID=1 pnpm run test:contracts:chainid:coverage environment: NODE_OPTIONS: --max-old-space-size=6144 - - run: - name: "Running chainid tests with coverage for goerli" - command: CHAIN_ID=5 pnpm run test:contracts:chainid:coverage - environment: - NODE_OPTIONS: --max-old-space-size=6144 - run: name: "Running chainid tests with coverage for xDai" command: CHAIN_ID=100 pnpm run test:contracts:chainid:coverage diff --git a/contracts/colonyNetwork/ColonyNetworkENS.sol b/contracts/colonyNetwork/ColonyNetworkENS.sol index 4edb71dd46..fc13f01a2a 100644 --- a/contracts/colonyNetwork/ColonyNetworkENS.sol +++ b/contracts/colonyNetwork/ColonyNetworkENS.sol @@ -140,8 +140,6 @@ contract ColonyNetworkENS is ColonyNetworkStorage { function getGlobalENSDomain() internal view returns (string memory) { if (isMainnet()) { return "joincolony.eth"; - } else if (isGoerli()) { - return "joincolony.test"; } else if (isXdai()) { return "joincolony.colonyxdai"; } diff --git a/contracts/common/MultiChain.sol b/contracts/common/MultiChain.sol index 93ede3447b..cc56efd111 100644 --- a/contracts/common/MultiChain.sol +++ b/contracts/common/MultiChain.sol @@ -31,9 +31,4 @@ contract MultiChain { uint256 chainId = block.chainid; return (chainId == 1 || chainId == 2656691); } - - function isGoerli() internal view returns (bool) { - uint256 chainId = block.chainid; - return (chainId == 5 || chainId == 2656695); - } } diff --git a/docs/guides/reputation-mining-client.md b/docs/guides/reputation-mining-client.md index 91017f3cd6..f247f01d2d 100644 --- a/docs/guides/reputation-mining-client.md +++ b/docs/guides/reputation-mining-client.md @@ -28,7 +28,7 @@ Mandatory arguments: Optional arguments: ``` -[--network <(goerli|mainnet)>] +[--network <(goerli|mainnet)>] [--localPort ] [--dbPath <$PATH>] [--auto <(true|false)>] diff --git a/packages/reputation-miner/bin/index.js b/packages/reputation-miner/bin/index.js index 151736bb63..acb428fe34 100644 --- a/packages/reputation-miner/bin/index.js +++ b/packages/reputation-miner/bin/index.js @@ -11,7 +11,7 @@ const {RetryProvider} = require("../../package-utils"); const { ConsoleAdapter, SlackAdapter, DiscordAdapter, TruffleLoader } = require("../../package-utils"); -const supportedInfuraNetworks = ["goerli", "rinkeby", "ropsten", "kovan", "mainnet"]; +const supportedInfuraNetworks = ["rinkeby", "ropsten", "kovan", "mainnet"]; const { minerAddress, privateKey, diff --git a/test/misc/chainid.js b/test/misc/chainid.js index d539e707ee..50d42954fe 100644 --- a/test/misc/chainid.js +++ b/test/misc/chainid.js @@ -34,9 +34,6 @@ const Token = artifacts.require("Token"); chai.use(bnChai(web3.utils.BN)); -const GOERLI = 5; -const FORKED_GOERLI = 2656695; - contract("Contract Storage", (accounts) => { const MINER1 = accounts[5]; const MINER2 = accounts[6]; @@ -74,9 +71,6 @@ contract("Contract Storage", (accounts) => { if (await isMainnet()) { const name = await colonyNetwork.lookupRegisteredENSDomain(metaColony.address); expect(name).to.equal("meta.colony.joincolony.eth"); - } else if (chainId === GOERLI || chainId === FORKED_GOERLI) { - const name = await colonyNetwork.lookupRegisteredENSDomain(metaColony.address); - expect(name).to.equal("meta.colony.joincolony.test"); } else if (await isXdai()) { const name = await colonyNetwork.lookupRegisteredENSDomain(metaColony.address); expect(name).to.equal("meta.colony.joincolony.colonyxdai"); From 3d120d6ba71f52d05822645137486dae80775b7b Mon Sep 17 00:00:00 2001 From: Daniel Kronovet Date: Thu, 12 Dec 2024 16:50:31 -0500 Subject: [PATCH 2/3] Update reputation miner docs to exclude goerli --- docs/guides/reputation-mining-client.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/guides/reputation-mining-client.md b/docs/guides/reputation-mining-client.md index f247f01d2d..22572f933a 100644 --- a/docs/guides/reputation-mining-client.md +++ b/docs/guides/reputation-mining-client.md @@ -7,7 +7,7 @@ sidebar_position: 3 ## Running the Mining Client -The reputation mining client can be run locally to sync with a local ganache instance, the `goerli` testnet, or with glider on `mainnet`. +The reputation mining client can be run locally to sync with a local hardhat instance, the `rinkeby`, `ropsten`, or `kovan` testnets, or with `mainnet`. To participate in the reputation mining process you need to have staked at least the [minimum amount of CLNY Tokens](../interfaces/ireputationminingcycle#getminstake-uint256-minstake), for at least [one full mining cycle duration](../interfaces/ireputationminingcycle#getminingwindowduration-uint256-miningwindowduration) before you can submit a new reputation root hash. @@ -22,13 +22,13 @@ Mandatory arguments: ``` (--minerAddress
) | (--privateKey ) (--colonyNetworkAddress
) -(--syncFrom ) // [goerli:'548534', mainnet:'7913100'] +(--syncFrom ) // [mainnet:'7913100'] ``` Optional arguments: ``` -[--network <(goerli|mainnet)>] +[--network <(rinkeby|ropsten|kovan|mainnet)>] [--localPort ] [--dbPath <$PATH>] [--auto <(true|false)>] @@ -43,7 +43,7 @@ Private key of the miner account which the client will sign reputation mining co #### `--colonyNetworkAddress` -The address of the Colony Network's `EtherRouter`. See [Upgrades to the Colony Network](../concepts/upgrades) for more information about the EtherRouter design pattern. This address is static on `goerli` and `mainnet` `goerli` `0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B` `mainnet` `0x5346d0f80e2816fad329f2c140c870ffc3c3e2ef` +The address of the Colony Network's `EtherRouter`. See [Upgrades to the Colony Network](../concepts/upgrades) for more information about the EtherRouter design pattern. This address is static on all networks, with the `mainnet` address of `0x5346d0f80e2816fad329f2c140c870ffc3c3e2ef` #### `--dbPath` @@ -51,7 +51,7 @@ Path for the sqlite database storing reputation state. Default is `./reputationS #### `--network` -Used for connecting to a supported Infura node (instead of a local client). Valid options are `goerli` and `mainnet`. +Used for connecting to a supported Infura node (instead of a local client). Valid options are `rinkeby` `ropsten` `kovan` and `mainnet`. #### `--localPort` @@ -59,9 +59,8 @@ Used to connect to a local client running on the specified port. Default is `854 #### `--syncFrom` -Block number to start reputation state sync from. This is the block at which the reputation mining process was initialised. This number is static on `goerli` and `mainnet` +Block number to start reputation state sync from. This is the block at which the reputation mining process was initialised. This number is static on all networks -* `goerli: 548534` * `mainnet: 7913100` Note that beginning the sync with a too-early block will result in an error. If you get this exception, try syncing from a more recent block. Note that the sync process can take long. Latest tests syncing a client from scratch to 28 reputation cycles took \~2 hours. @@ -108,7 +107,7 @@ The reputation mining client will answer queries for reputation scores locally o http://127.0.0.1:3000/{reputationState}/{colonyAddress}/{skillId}/{userAddress} ``` -An instance of the oracle is available for reputation queries against `goerli` or `mainnet` networks: +An instance of the oracle is available for reputation queries against all networks: ``` https://xdai.colony.io/reputation/{network}/{reputationState}/{colonyAddress}/{skillId}/{userAddress} From d4e8bd615f7a70f089cf0d90ee61dce403519ba8 Mon Sep 17 00:00:00 2001 From: Daniel Kronovet Date: Mon, 16 Dec 2024 14:43:00 -0500 Subject: [PATCH 3/3] Update networks in miner docs --- docs/guides/reputation-mining-client.md | 15 ++++++++------- packages/reputation-miner/bin/index.js | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/guides/reputation-mining-client.md b/docs/guides/reputation-mining-client.md index 22572f933a..f4ee8524b7 100644 --- a/docs/guides/reputation-mining-client.md +++ b/docs/guides/reputation-mining-client.md @@ -7,7 +7,7 @@ sidebar_position: 3 ## Running the Mining Client -The reputation mining client can be run locally to sync with a local hardhat instance, the `rinkeby`, `ropsten`, or `kovan` testnets, or with `mainnet`. +The reputation mining client can be run locally to sync with a local hardhat instance, the `arbitrum-sepolia` testnet, or with `arbitrum` itself. To participate in the reputation mining process you need to have staked at least the [minimum amount of CLNY Tokens](../interfaces/ireputationminingcycle#getminstake-uint256-minstake), for at least [one full mining cycle duration](../interfaces/ireputationminingcycle#getminingwindowduration-uint256-miningwindowduration) before you can submit a new reputation root hash. @@ -22,13 +22,13 @@ Mandatory arguments: ``` (--minerAddress
) | (--privateKey ) (--colonyNetworkAddress
) -(--syncFrom ) // [mainnet:'7913100'] +(--syncFrom ) // [arbitrum-sepolia: '28290396', arbitrum:'199165580'] ``` Optional arguments: ``` -[--network <(rinkeby|ropsten|kovan|mainnet)>] +[--network <(arbitrum-sepolia|arbitrum)>] [--localPort ] [--dbPath <$PATH>] [--auto <(true|false)>] @@ -43,7 +43,7 @@ Private key of the miner account which the client will sign reputation mining co #### `--colonyNetworkAddress` -The address of the Colony Network's `EtherRouter`. See [Upgrades to the Colony Network](../concepts/upgrades) for more information about the EtherRouter design pattern. This address is static on all networks, with the `mainnet` address of `0x5346d0f80e2816fad329f2c140c870ffc3c3e2ef` +The address of the Colony Network's `EtherRouter`. See [Upgrades to the Colony Network](../concepts/upgrades) for more information about the EtherRouter design pattern. This address is static on all networks, with the `arbitrum-sepolia` address of `0x7777494e3d8cce0D3570E21FEf820F9Fee077777` and the `arbitrum` address of `0xCCcccdCC0CcF6C708D860e19353c5f9a49ACccCc` #### `--dbPath` @@ -51,7 +51,7 @@ Path for the sqlite database storing reputation state. Default is `./reputationS #### `--network` -Used for connecting to a supported Infura node (instead of a local client). Valid options are `rinkeby` `ropsten` `kovan` and `mainnet`. +Used for connecting to a supported Infura node (instead of a local client). Valid options are `arbitrum-sepolia` and `arbitrum`. #### `--localPort` @@ -61,7 +61,8 @@ Used to connect to a local client running on the specified port. Default is `854 Block number to start reputation state sync from. This is the block at which the reputation mining process was initialised. This number is static on all networks -* `mainnet: 7913100` +* `arbitrum-sepolia: 28290396` +* `arbitrum: 199165580` Note that beginning the sync with a too-early block will result in an error. If you get this exception, try syncing from a more recent block. Note that the sync process can take long. Latest tests syncing a client from scratch to 28 reputation cycles took \~2 hours. @@ -118,7 +119,7 @@ The oracle should be able to provide responses to any valid reputation score in For example, you can get the reputation score of the miner in a reputation state `0xc7eb2cf60aa4848ce0feed5d713c07fd26e404dd50ca3b9e4f2fabef196ca3bc`) using the address of the Meta Colony (`0x14946533cefe742399e9734a123f0c02d0405a51`), the mining skill id (`2`), and address of a miner (`0x0A1d439C7d0b9244035d4F934BBF8A418B35d064`). ``` -https://xdai.colony.io/reputation/mainnet/0xc7eb2cf60aa4848ce0feed5d713c07fd26e404dd50ca3b9e4f2fabef196ca3bc/0x14946533cefe742399e9734a123f0c02d0405a51/2/0x0A1d439C7d0b9244035d4F934BBF8A418B35d064 +https://xdai.colony.io/reputation/arbitrum/0xc7eb2cf60aa4848ce0feed5d713c07fd26e404dd50ca3b9e4f2fabef196ca3bc/0x14946533cefe742399e9734a123f0c02d0405a51/2/0x0A1d439C7d0b9244035d4F934BBF8A418B35d064 ``` The oracle returns diff --git a/packages/reputation-miner/bin/index.js b/packages/reputation-miner/bin/index.js index acb428fe34..06841ad557 100644 --- a/packages/reputation-miner/bin/index.js +++ b/packages/reputation-miner/bin/index.js @@ -11,7 +11,8 @@ const {RetryProvider} = require("../../package-utils"); const { ConsoleAdapter, SlackAdapter, DiscordAdapter, TruffleLoader } = require("../../package-utils"); -const supportedInfuraNetworks = ["rinkeby", "ropsten", "kovan", "mainnet"]; +const supportedInfuraNetworks = ["arbitrum-sepolia", "arbitrum"]; + const { minerAddress, privateKey,