Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2-testnet-4.0.6 #1845

Merged
merged 64 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
15430c7
feat(web): use-atlas-spam-api
Harman-singh-waraich Dec 13, 2024
01be41e
chore: rabbit-feedback
Harman-singh-waraich Dec 13, 2024
9303c62
feat: gated dispute kit
jaybuidl Dec 18, 2024
3ac630f
refactor: base dispute kit
jaybuidl Dec 18, 2024
e833a83
Merge branch 'dev' into feat/atlas-spam-api
Harman-singh-waraich Dec 30, 2024
2682917
fix: ensure that getDispute() includes the answer ID 0
jaybuidl Jan 13, 2025
6d0cbeb
chore(sdk): release @kleros/[email protected]
jaybuidl Jan 13, 2025
2c9ea33
fix: unconditionally add the standard answer with id 0
jaybuidl Jan 14, 2025
147215a
chore(sdk): release @kleros/[email protected]
jaybuidl Jan 14, 2025
763546c
chore: footer icons alignment
kemuru Jan 14, 2025
364cb02
Merge branch 'dev' into fix/sdk-getdispute-answer0
alcercu Jan 15, 2025
09e3971
Merge pull request #1831 from kleros/fix/sdk-getdispute-answer0
jaybuidl Jan 15, 2025
219d2e7
Merge branch 'dev' into chore/footer-icons-alignment
alcercu Jan 15, 2025
3110e46
Merge pull request #1836 from kleros/chore/footer-icons-alignment
alcercu Jan 15, 2025
3d298b9
chore: moved sdk config to correct folder
jaybuidl Jan 21, 2025
294278a
feat: gated dispute kit
jaybuidl Dec 18, 2024
cca96fc
feat: added support for ERC1155
jaybuidl Jan 21, 2025
b38dd0c
docs: inherited natspec
jaybuidl Jan 21, 2025
3463bb2
refactor: moved UUPSProxiable to the base contracts
jaybuidl Jan 21, 2025
828bb17
feat: better appeal loading mechanism
kemuru Jan 21, 2025
e18e65a
fix: condition fix
kemuru Jan 21, 2025
b4d925a
feat: versioning of upgradable contracts implementation
jaybuidl Jan 21, 2025
15488d9
chore: sort disputes by id instead of latest status change
kemuru Jan 21, 2025
87f9d08
feat: upgrade proxies validation, natspec reformat for UUPSProxiable …
jaybuidl Jan 22, 2025
c0f2f89
feat: added support for ERC1155
jaybuidl Jan 22, 2025
9f953c2
refactor: minor rename of DisputeKitGated interfaces
jaybuidl Jan 22, 2025
971c713
Merge branch 'dev' into refactor/dispute-kits
jaybuidl Jan 22, 2025
b52f642
Merge branch 'dev' into feat(web)/appeal-loading-improvement
alcercu Jan 22, 2025
1f7c36f
Merge branch 'dev' into chore/sort-disputes-by-id
alcercu Jan 22, 2025
4324611
Merge pull request #1841 from kleros/feat(web)/appeal-loading-improve…
alcercu Jan 22, 2025
5f23277
Merge pull request #1842 from kleros/chore/sort-disputes-by-id
alcercu Jan 22, 2025
f3f05ab
fix: missing web-devtools dependency
jaybuidl Jan 22, 2025
45daa0e
fix: prettier-config
Harman-singh-waraich Jan 23, 2025
b33651a
Merge branch 'dev' into feat/atlas-spam-api
Harman-singh-waraich Jan 23, 2025
de7fdd2
refactor(web): update-spam-api-call
Harman-singh-waraich Jan 23, 2025
19908c6
feat(web): file-restrictions-message
Harman-singh-waraich Jan 23, 2025
0bbec16
Merge pull request #1846 from kleros/fix/prettier-config
alcercu Jan 23, 2025
07327fa
Merge pull request #1789 from kleros/feat/atlas-spam-api
alcercu Jan 23, 2025
c813e76
refactor(web): update-message-creator-function
Harman-singh-waraich Jan 23, 2025
73b1551
refactor(web): feedback-addressing
Harman-singh-waraich Jan 24, 2025
2735f07
Merge branch 'dev' into feat/upload-restrictions-message
Harman-singh-waraich Jan 24, 2025
4ed43ef
Merge pull request #1847 from kleros/feat/upload-restrictions-message
alcercu Jan 24, 2025
af973c7
feat: new oracle court, edited spanish non-technical court, scripts i…
jaybuidl Jan 24, 2025
b039784
feat: styling of policy headers, bullet points, links
jaybuidl Jan 24, 2025
ad79247
refactor: policies JSON schema, cosmetic policy fixes
jaybuidl Jan 24, 2025
5af7b1b
chore: reduced the dispute periods for devnet
jaybuidl Jan 24, 2025
e1a8571
Merge pull request #1848 from kleros/feat/court-configs
jaybuidl Jan 24, 2025
47e2cd6
fix: xdai courts name
jaybuidl Jan 24, 2025
e8c013c
refactor: header styling and reactmarkdown
alcercu Jan 27, 2025
b5a85e6
fix: use more adequate sizing for inner component
alcercu Jan 27, 2025
25dce8a
Merge pull request #1849 from kleros/refactor(frontend)/header-styling
jaybuidl Jan 27, 2025
a623f89
refactor(web): graphql-batching-and-optimisations
Harman-singh-waraich Jan 27, 2025
9a99824
chore: yarn-lockfile
Harman-singh-waraich Jan 27, 2025
8bb3ad2
chore(web): remove-log
Harman-singh-waraich Jan 27, 2025
29336cb
Merge branch 'dev' into refactor/graphql-batching-and-optimisations
Harman-singh-waraich Jan 27, 2025
1fb3749
refactor(web): function-name-update
Harman-singh-waraich Jan 27, 2025
2343dfa
chore: codeclimate
jaybuidl Jan 27, 2025
e18c73c
chore: smaller well-done.svg
jaybuidl Jan 27, 2025
f191315
fix: regex vulnerable to super-linear runtime due to excessive backtr…
jaybuidl Jan 27, 2025
ec16bb7
Merge pull request #1851 from kleros/fix/regex-dos
jaybuidl Jan 27, 2025
150cecd
fix: miniguides svg
kemuru Jan 27, 2025
11c8057
Merge branch 'dev' into refactor/graphql-batching-and-optimisations
alcercu Jan 27, 2025
d4aaa7c
Merge pull request #1850 from kleros/refactor/graphql-batching-and-op…
alcercu Jan 27, 2025
386da9f
Merge pull request #1852 from kleros/fix/miniguides-svg
jaybuidl Jan 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
checks:
similar_code:
exclude_paths:
- "contracts/tests/"
complexity:
exclude_paths:
- "contracts/tests/"
engines:
tslint:
enabled: true
Expand All @@ -7,3 +14,5 @@ engines:
exclude_paths:
- "web/src/graphql/generated.ts"
- "contracts/deployments/"
- "contracts/config/"
- "kleros-sdk/config/"
73 changes: 54 additions & 19 deletions contracts/config/courts.v2.devnet.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,82 @@
[
{
"name": "General Court",
"id": 1,
"parent": 0,
"hiddenVotes": true,
"minStake": "520000000000000000000",
"minStake": "1500000000000000000",
"alpha": "5000",
"feeForJuror": "15000000000000000000",
"feeForJuror": "100000000000",
"jurorsForCourtJump": "511",
"timesPerPeriod": [
280800,
583200,
583200,
388800
120,
240,
240,
600
]
},
{
"name": "Curation",
"id": 2,
"parent": 1,
"hiddenVotes": false,
"minStake": "520000000000000000000",
"minStake": "2000000000000000000",
"alpha": "3100",
"feeForJuror": "6900000000000000000",
"jurorsForCourtJump": "30",
"feeForJuror": "100000000000",
"jurorsForCourtJump": "31",
"timesPerPeriod": [
140400,
291600,
291600,
194400
120,
240,
240,
600
]
},
{
"name": "English Language",
"id": 3,
"parent": 1,
"hiddenVotes": false,
"minStake": "1200000000000000000000",
"minStake": "2000000000000000000",
"alpha": "5000",
"feeForJuror": "22000000000000000000",
"feeForJuror": "100000000000",
"jurorsForCourtJump": "63",
"timesPerPeriod": [
280800,
437400,
437400,
291600
120,
240,
240,
600
]
},
{
"name": "Corte de Disputas de Consumo y Vecindad",
"id": 4,
"parent": 1,
"hiddenVotes": false,
"minStake": "2000000000000000000",
"alpha": "5000",
"feeForJuror": "100000000000",
"jurorsForCourtJump": "63",
"timesPerPeriod": [
120,
240,
240,
600
]
},
{
"name": "Oracle Court",
"id": 5,
"parent": 1,
"hiddenVotes": false,
"minStake": "2000000000000000000",
"alpha": "5000",
"feeForJuror": "100000000000",
"jurorsForCourtJump": "31",
"timesPerPeriod": [
120,
240,
240,
600
]
}
]
18 changes: 17 additions & 1 deletion contracts/config/courts.v2.mainnet-neo.json
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@
]
},
{
"name": "Blockchain No Técnica",
"name": "Corte de Disputas de Consumo y Vecindad",
"id": 29,
"parent": 23,
"hiddenVotes": false,
Expand All @@ -462,5 +462,21 @@
216000,
216000
]
},
{
"name": "Oracle Court",
"id": 30,
"parent": 1,
"hiddenVotes": false,
"minStake": "5000000000000000000000",
"feeForJuror": "6900000000000000",
"alpha": "5000",
"jurorsForCourtJump": "31",
"timesPerPeriod": [
280800,
583200,
583200,
388800
]
}
]
37 changes: 36 additions & 1 deletion contracts/config/courts.v2.testnet.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
{
"name": "General Court",
"id": 1,
"parent": 0,
"hiddenVotes": true,
Expand All @@ -15,13 +16,14 @@
]
},
{
"name": "Curation",
"id": 2,
"parent": 1,
"hiddenVotes": false,
"minStake": "200000000000000000000",
"alpha": "3100",
"feeForJuror": "10000000000000",
"jurorsForCourtJump": "30",
"jurorsForCourtJump": "31",
"timesPerPeriod": [
43200,
43200,
Expand All @@ -30,6 +32,7 @@
]
},
{
"name": "English Language",
"id": 3,
"parent": 1,
"hiddenVotes": false,
Expand All @@ -43,5 +46,37 @@
43200,
43200
]
},
{
"name": "Corte de Disputas de Consumo y Vecindad",
"id": 4,
"parent": 1,
"hiddenVotes": false,
"minStake": "200000000000000000000",
"alpha": "5000",
"feeForJuror": "10000000000000",
"jurorsForCourtJump": "63",
"timesPerPeriod": [
43200,
43200,
43200,
43200
]
},
{
"name": "Oracle Court",
"id": 5,
"parent": 1,
"hiddenVotes": false,
"minStake": "200000000000000000000",
"alpha": "5000",
"feeForJuror": "10000000000000",
"jurorsForCourtJump": "31",
"timesPerPeriod": [
43200,
43200,
43200,
43200
]
}
]
34 changes: 25 additions & 9 deletions contracts/config/policies.v2.devnet.json

Large diffs are not rendered by default.

198 changes: 103 additions & 95 deletions contracts/config/policies.v2.mainnet-neo.json

Large diffs are not rendered by default.

34 changes: 25 additions & 9 deletions contracts/config/policies.v2.testnet.json

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions contracts/config/policies.v2/Curation-Court-Policy.json

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions contracts/config/policies.v2/General-Court-Policy.json

This file was deleted.

2 changes: 1 addition & 1 deletion contracts/deploy/00-home-chain-arbitration-neo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
deployer,
deployer,
pnk.target,
ZeroAddress, // KlerosCore is configured later
ZeroAddress, // jurorProsecutionModule is not implemented yet
disputeKit.address,
false,
[minStake, alpha, feeForJuror, jurorsForCourtJump],
Expand Down
34 changes: 34 additions & 0 deletions contracts/deploy/upgrade-dispute-kit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { deployUpgradable } from "./utils/deployUpgradable";
import { HomeChains, isSkipped } from "./utils";

const deployUpgradeDisputeKit: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { deployments, getNamedAccounts, getChainId } = hre;

// fallback to hardhat node signers on local network
const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address;
const chainId = Number(await getChainId());
console.log("upgrading on %s with deployer %s", HomeChains[chainId], deployer);

try {
console.log("upgrading DisputeKitClassicNeo...");
await deployUpgradable(deployments, "DisputeKitClassicNeo", {
contract: "DisputeKitClassic",
initializer: "initialize",
from: deployer,
// Warning: do not reinitialize everything, only the new variables
args: [],
});
} catch (err) {
console.error(err);
throw err;
}
};

deployUpgradeDisputeKit.tags = ["Upgrade", "DisputeKit"];
deployUpgradeDisputeKit.skip = async ({ network }) => {
return isSkipped(network, !HomeChains[network.config.chainId ?? 0]);
};

export default deployUpgradeDisputeKit;
31 changes: 8 additions & 23 deletions contracts/deploy/upgrade-kleros-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,21 @@ import { deployUpgradable } from "./utils/deployUpgradable";
import { HomeChains, isSkipped } from "./utils";

const deployUpgradeKlerosCore: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { ethers, deployments, getNamedAccounts, getChainId } = hre;
const { ZeroAddress } = hre.ethers;
const { deployments, getNamedAccounts, getChainId } = hre;

// fallback to hardhat node signers on local network
const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address;
const chainId = Number(await getChainId());
console.log("upgrading to %s with deployer %s", HomeChains[chainId], deployer);
console.log("upgrading on %s with deployer %s", HomeChains[chainId], deployer);

try {
const pnk = await deployments.get("PNK");
const disputeKit = await deployments.get("DisputeKitClassic");
const minStake = 2n * 10n ** 20n;
const alpha = 10000;
const feeForJuror = 10n * 17n;
const sortitionModule = await deployments.get("SortitionModule");

console.log("upgrading the KlerosCore...");
await deployUpgradable(deployments, "KlerosCore", {
console.log("upgrading KlerosCoreNeo...");
await deployUpgradable(deployments, "KlerosCoreNeo", {
newImplementation: "KlerosCoreNeo",
initializer: "initialize",
from: deployer,
args: [
deployer,
pnk,
ZeroAddress,
disputeKit.address,
false,
[minStake, alpha, feeForJuror, 256], // minStake, alpha, feeForJuror, jurorsForCourtJump
[0, 0, 0, 10], // evidencePeriod, commitPeriod, votePeriod, appealPeriod
ethers.toBeHex(5), // Extra data for sortition module will return the default value of K
sortitionModule.address,
],
// Warning: do not reinitialize everything, only the new variables
args: [],
});
} catch (err) {
console.error(err);
Expand Down
23 changes: 7 additions & 16 deletions contracts/deploy/upgrade-sortition-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,20 @@ import { HomeChains, isSkipped } from "./utils";

const deployUpgradeSortitionModule: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { deployments, getNamedAccounts, getChainId } = hre;
const RNG_LOOKAHEAD = 20;

// fallback to hardhat node signers on local network
const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address;
const chainId = Number(await getChainId());
console.log("upgrading to %s with deployer %s", HomeChains[chainId], deployer);
console.log("upgrading on %s with deployer %s", HomeChains[chainId], deployer);

try {
const rng = await deployments.get("RandomizerRNG");
const klerosCore = await deployments.get("KlerosCore");
const klerosCoreAddress = klerosCore.address;

console.log("upgrading the SortitionModule...");
await deployUpgradable(deployments, "SortitionModule", {
console.log("upgrading SortitionModuleNeo...");
await deployUpgradable(deployments, "SortitionModuleNeo", {
newImplementation: "SortitionModuleNeo",
initializer: "initialize",
from: deployer,
args: [
deployer,
klerosCoreAddress,
1800, // minStakingTime
1800, // maxFreezingTime
rng.address,
RNG_LOOKAHEAD,
],
// Warning: do not reinitialize everything, only the new variables
args: [],
});
} catch (err) {
console.error(err);
Expand Down
6 changes: 3 additions & 3 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const config: HardhatUserConfig = {
// Home chain ---------------------------------------------------------------------------------
arbitrumSepolia: {
chainId: 421614,
url: process.env.ARBITRUM_SEPOLIA_RPC ?? "https://sepolia-rollup.arbitrum.io/rpc",
url: process.env.ARBITRUM_SEPOLIA_RPC ?? `https://arbitrum-sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts:
(process.env.ARB_GOERLI_PRIVATE_KEY_WALLET_1 && [
process.env.ARB_GOERLI_PRIVATE_KEY_WALLET_1 as string,
Expand All @@ -121,7 +121,7 @@ const config: HardhatUserConfig = {
},
arbitrumSepoliaDevnet: {
chainId: 421614,
url: process.env.ARBITRUM_SEPOLIA_RPC ?? "https://sepolia-rollup.arbitrum.io/rpc",
url: process.env.ARBITRUM_SEPOLIA_RPC ?? `https://arbitrum-sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts:
(process.env.ARB_GOERLI_PRIVATE_KEY_WALLET_1 && [
process.env.ARB_GOERLI_PRIVATE_KEY_WALLET_1 as string,
Expand All @@ -147,7 +147,7 @@ const config: HardhatUserConfig = {
},
arbitrum: {
chainId: 42161,
url: "https://arb1.arbitrum.io/rpc",
url: process.env.ARBITRUM_RPC ?? `https://arbitrum-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
live: true,
saveDeployments: true,
Expand Down
Loading
Loading