-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1407 from EYBlockchain/westlad/x509-add-real-certs
Westlad/x509 add real certs
- Loading branch information
Showing
62 changed files
with
4,603 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ node_modules/* | |
**/node_modules/* | ||
**/migrations/* | ||
**/doc/* | ||
mumbai/ | ||
cli/build/* | ||
wallet/cli/* | ||
mumbai/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -714,6 +714,7 @@ jobs: | |
adversary-test: | ||
env: | ||
CONFIRMATIONS: 1 | ||
NF_SERVICES_TO_START: blockchain,client,deployer,mongodb,optimist,rabbitmq,worker,lazy-optimist,bad-client | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -965,7 +966,7 @@ jobs: | |
curl -i http://localhost:8092/healthcheck | ||
attempt_limit: 10 | ||
attempt_delay: 30000 | ||
|
||
- name: 'Check challenger liveliness' | ||
uses: Wandalen/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /bin/bash | ||
set -o allexport | ||
BLOCKCHAIN_URL="$2" | ||
ETH_NETWORK=polygonPos | ||
ETH_PRIVATE_KEY="$1" | ||
MULTISIG_APPROVERS='0x0000000000000000000000000000000000000001,0x0000000000000000000000000000000000000002,0x0000000000000000000000000000000000000003,0x0000000000000000000000000000000000000004' | ||
WHITELISTING=enable | ||
NF_SERVICES_TO_START='deployer,worker' | ||
DEPLOY_MOCK_TOKENS=false | ||
ENVIRONMENT=mumbai | ||
FEE_L2_TOKEN_ID=WMATIC | ||
DEPLOY_MOCKED_SANCTIONS_CONTRACT=true | ||
GAS_PRICE=500000000000 | ||
RESTRICT_TOKENS=disable | ||
set +o allexport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# How the Random Beacon value was generated | ||
|
||
For the MPC Phase 2 setup, we use a random beacon to finalise the contributions. This was done by posting the number of a future Ethereum mainnet block into the data field of a transaction, and then using the blockhash of the future block as the random beacon when the block came into being. | ||
|
||
The transaction recording the posting of the blocknumber was [0x26c0872cd302b5eccd6e0e7451a5a608fdba82c9091238629b435130de3e3844](https://etherscan.io/tx/0x26c0872cd302b5eccd6e0e7451a5a608fdba82c9091238629b435130de3e3844) in block 16776388 and the future block number was 16776480 (0xfffd20). | ||
|
||
The hash of the future block was: [0x1e0c4ac8bb3127e12c05b172c2498f5e6932bf4174b8d73e7f826d078bbe5295](https://etherscan.io/block/16776480) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-License-Identifier: CC0-1.0 | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import './Ownable.sol'; | ||
import './Structures.sol'; | ||
import './X509Interface.sol'; | ||
import './SanctionsListInterface.sol'; | ||
|
||
contract Certified is Ownable { | ||
X509Interface x509; | ||
SanctionsListInterface sanctionsList; | ||
|
||
function initialize() public virtual override initializer { | ||
Ownable.initialize(); | ||
} | ||
|
||
function setAuthorities(address sanctionsListAddress, address x509Address) public onlyOwner { | ||
x509 = X509Interface(x509Address); | ||
sanctionsList = SanctionsListInterface(sanctionsListAddress); | ||
} | ||
|
||
// this modifier checks all of the 'authorisation' contract interfaces to see if we are allowed to transact | ||
modifier onlyCertified() { | ||
require( | ||
x509.x509Check(msg.sender), | ||
'Certified: You are not authorised to transact using Nightfall' | ||
); | ||
require( | ||
!sanctionsList.isSanctioned(msg.sender), | ||
'Certified: You are on the Chainalysis sanctions list' | ||
); | ||
_; | ||
} | ||
} |
Oops, something went wrong.