Skip to content

Commit 6ecf247

Browse files
Merge pull request #381 from unknownunknown1/feat/sortition-modularity
Feat/sortition modularity
2 parents 6f48a97 + 91d3bda commit 6ecf247

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3759
-1798
lines changed

.github/workflows/contracts-testing.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Setup Node.js environment
17-
uses: actions/setup-node@v3.4.1
17+
uses: actions/setup-node@v3.5.1
1818
with:
1919
node-version: 16.x
2020

2121
- uses: actions/checkout@v3
2222

2323
- name: Cache node modules
24-
uses: actions/cache@v3.0.7
24+
uses: actions/cache@v3.0.11
2525
env:
2626
cache-name: cache-node-modules
2727
with:
@@ -52,7 +52,7 @@ jobs:
5252
working-directory: contracts
5353

5454
- name: Upload a build artifact
55-
uses: actions/upload-artifact@v3.1.0
55+
uses: actions/upload-artifact@v3.1.1
5656
with:
5757
name: code-coverage-report
5858
path: contracts/coverage

.github/workflows/deploy-bots.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ jobs:
44
build-deploy:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/setup-python@v2
9-
- uses: aws-actions/setup-sam@v1
7+
- uses: actions/checkout@v3
8+
- uses: actions/setup-python@v4
9+
- uses: aws-actions/setup-sam@v2
1010
- uses: aws-actions/configure-aws-credentials@v1
1111
with:
1212
aws-access-key-id: ${{ secrets.STAGING_AWS_ACCESS_KEY }}

bot-pinner/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"node": ">=16.13.0"
2020
},
2121
"devDependencies": {
22-
"@dappnode/dappnodesdk": "^0.2.65"
22+
"@dappnode/dappnodesdk": "^0.2.68"
2323
}
2424
}

contracts/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,39 +25,39 @@
2525
"publish": "yarn npm publish --access public --tag $(cat package.json | jq .version)"
2626
},
2727
"devDependencies": {
28-
"@nomicfoundation/hardhat-chai-matchers": "^1.0.3",
28+
"@nomicfoundation/hardhat-chai-matchers": "^1.0.4",
2929
"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.13",
3030
"@nomiclabs/hardhat-waffle": "^2.0.3",
3131
"@openzeppelin/contracts": "^4.7.3",
3232
"@tenderly/hardhat-tenderly": "^1.1.6",
3333
"@typechain/ethers-v5": "^10.0.0",
34-
"@typechain/hardhat": "^6.1.2",
34+
"@typechain/hardhat": "^6.1.4",
3535
"@types/chai": "^4.3.3",
36-
"@types/mocha": "^9.1.1",
36+
"@types/mocha": "^10.0.0",
3737
"@types/node": "^16",
38-
"@typescript-eslint/eslint-plugin": "^5.33.1",
39-
"@typescript-eslint/parser": "^5.33.1",
38+
"@typescript-eslint/eslint-plugin": "^5.41.0",
39+
"@typescript-eslint/parser": "^5.41.0",
4040
"chai": "^4.3.6",
4141
"chai-ethers": "^0.0.1",
42-
"dotenv": "^16.0.1",
42+
"dotenv": "^16.0.3",
4343
"ethereum-waffle": "^3.4.4",
4444
"ethereumjs-util": "^7.1.4",
4545
"ethers": "^5.6.7",
4646
"follow-redirects": "^1.15.0",
47-
"hardhat": "^2.10.1",
47+
"hardhat": "^2.11.2",
4848
"hardhat-contract-sizer": "^2.6.1",
49-
"hardhat-deploy": "^0.11.12",
49+
"hardhat-deploy": "^0.11.18",
5050
"hardhat-deploy-ethers": "^0.3.0-beta.13",
5151
"hardhat-docgen": "^1.3.0",
52-
"hardhat-gas-reporter": "^1.0.8",
53-
"hardhat-watcher": "^2.3.0",
52+
"hardhat-gas-reporter": "^1.0.9",
53+
"hardhat-watcher": "^2.5.0",
5454
"json-schema": "^0.4.0",
55-
"mocha": "^10.0.0",
55+
"mocha": "^10.1.0",
5656
"node-fetch": "^3.2.10",
5757
"npm-run-all": "^4.1.5",
5858
"shelljs": "^0.8.5",
5959
"solhint": "^3.3.7",
60-
"solidity-coverage": "^0.7.21",
60+
"solidity-coverage": "^0.8.2",
6161
"ts-node": "^10.8.0",
6262
"typechain": "^8.0.0",
6363
"typescript": "^4.6.4"

contracts/src/arbitration/KlerosCore.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,7 @@ contract KlerosCore is IArbitrator {
598598
if (drawnAddress != address(0)) {
599599
// In case no one has staked at the court yet.
600600
jurors[drawnAddress].lockedTokens[dispute.subcourtID] += round.tokensAtStakePerJuror;
601-
602601
emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);
603-
604602
round.drawnJurors.push(drawnAddress);
605603
}
606604
}

contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,8 @@ contract DisputeKitClassic is BaseDisputeKit, IEvidence {
630630
_coreDisputeID,
631631
core.getNumberOfRounds(_coreDisputeID) - 1
632632
);
633-
(uint256 stakedTokens, uint256 lockedTokens, ) = core.getJurorBalance(_juror, subcourtID);
634-
return stakedTokens >= lockedTokens + lockedAmountPerJuror;
633+
(uint256 stakedTokens, uint256 lockedTokens) = core.getJurorBalance(_juror, subcourtID);
634+
(, , uint256 minStake, , , ) = core.courts(subcourtID);
635+
return stakedTokens >= lockedTokens + lockedAmountPerJuror && stakedTokens >= minStake;
635636
}
636637
}

contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,9 @@ contract DisputeKitSybilResistant is BaseDisputeKit, IEvidence {
649649
_coreDisputeID,
650650
core.getNumberOfRounds(_coreDisputeID) - 1
651651
);
652-
(uint256 stakedTokens, uint256 lockedTokens, ) = core.getJurorBalance(_juror, subcourtID);
653-
654-
if (stakedTokens < lockedTokens + lockedAmountPerJuror) {
652+
(uint256 stakedTokens, uint256 lockedTokens) = core.getJurorBalance(_juror, subcourtID);
653+
(, , uint256 minStake, , , ) = core.courts(subcourtID);
654+
if (stakedTokens < lockedTokens + lockedAmountPerJuror || stakedTokens < minStake) {
655655
return false;
656656
} else {
657657
return proofOfHumanity(_juror);

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"node": "16.15.1"
3232
},
3333
"devDependencies": {
34-
"@commitlint/cli": "^14.1.0",
34+
"@commitlint/cli": "^17.2.0",
3535
"@commitlint/config-conventional": "^14.1.0",
3636
"conventional-changelog-cli": "^2.1.1",
3737
"depcheck": "^1.4.2",
@@ -41,7 +41,7 @@
4141
"eslint-import-resolver-parcel": "^1.10.5",
4242
"eslint-plugin-import": "^2.25.3",
4343
"eslint-plugin-node": "^11.1.0",
44-
"eslint-plugin-prettier": "^3.4.1",
44+
"eslint-plugin-prettier": "^4.2.1",
4545
"eslint-plugin-promise": "^5.1.1",
4646
"eslint-utils": "^3.0.0",
4747
"husky": "^7.0.0",

subgraph-fastbridge/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 kleros/fastbridge-arbitrum-rinkeby"
1111
},
1212
"dependencies": {
13-
"@graphprotocol/graph-cli": "^0.33.0",
14-
"@graphprotocol/graph-ts": "^0.27.0"
13+
"@graphprotocol/graph-cli": "^0.34.0",
14+
"@graphprotocol/graph-ts": "^0.28.1"
1515
},
1616
"volta": {
1717
"node": "16.17.0"

subgraph/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 KlerosCore"
1111
},
1212
"dependencies": {
13-
"@graphprotocol/graph-cli": "^0.33.0",
14-
"@graphprotocol/graph-ts": "^0.27.0"
13+
"@graphprotocol/graph-cli": "^0.34.0",
14+
"@graphprotocol/graph-ts": "^0.28.1"
1515
}
1616
}

0 commit comments

Comments
 (0)