Skip to content

Commit

Permalink
Privacy e2e (#32)
Browse files Browse the repository at this point in the history
* feat: upload contract changes

* feat: updated abi

* feat: upload p2p (mev-commit) changes for privacy e2e

* feat(oracle): e2e privacy changes (#35)

* refactor: moved to x packages

* refactor: get rid of logs parsing, redundant checks and function in sc

* refactor: updated abi

* feat: withdraw API (#38)

* fix: go mod tidy oracle

* fix: abi gen with new ver

* fix: updated handshake ver

* fix: delete unused

* fix: start publisher

* fix: events unit test

* fix: deposit function

* fix: whitespace

* refactor: changed balance from map to lru cache

* fix: change blocksnumber to 10 for the testing

* fix: contract tests

* fix: integration test (#39)

Co-authored-by: Alok <[email protected]>

* fix: move blocksPerWindow set up to separated func

* fix: updated artifacts workflow

* fix: added missing goreleaser to real bidder

* fix: updated dir in goreleaser

* feat: added logs to updater

* refactor: changed 10000 to timeDiff in real-bidder

* feat(tracker): split preconf protocol for better organisation (#44)

* fix: round decay to 100 if greater

* fix: updated abis and protos

* fix: oracle changes after decay merge

* fix: p2p after merge

* chore: increased dispatch window

* chore: added wait receipt for testing

* chore: deleted wait receipt

* chore: added logs for debug

* chore: added log for encrypted commitment stored

* fix: sync in store

* chore: pr clean ups

* fix: deleted redundant method

* chore: updated logs

* chore: deleted curly brackets from storeEncr func

* chore: increased dispatchWindow for test

* chore: clean up redundant logs

* chore: fixed SCs warnings

* chore: fixed growing state in encryptor

* chore: changed min time for the real bidder

* fix: deep copy txnHashes in test

---------

Co-authored-by: aloknerurkar <[email protected]>
Co-authored-by: Alok <[email protected]>
Co-authored-by: Alok Nerurkar <[email protected]>
  • Loading branch information
4 people authored May 9, 2024
1 parent 9705644 commit d59f069
Show file tree
Hide file tree
Showing 103 changed files with 12,227 additions and 4,659 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
module: [ infrastructure/tools/keystore-generator, p2p/integrationtest/provider, p2p/integrationtest/bidder, bridge/standard/bridge-v1, external/geth, oracle, p2p]
module: [ infrastructure/tools/keystore-generator, p2p/integrationtest/real-bidder, p2p/integrationtest/provider, bridge/standard/bridge-v1, external/geth, oracle, p2p]
steps:
- name: Set Snapshot Flag
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
Expand Down
196 changes: 165 additions & 31 deletions contracts-abi/abi/BidderRegistry.abi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "constructor",
"inputs": [
{
"name": "_minAllowance",
"name": "_minDeposit",
"type": "uint256",
"internalType": "uint256"
},
Expand All @@ -21,6 +21,11 @@
"name": "_owner",
"type": "address",
"internalType": "address"
},
{
"name": "_blockTracker",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
Expand Down Expand Up @@ -64,7 +69,7 @@
},
{
"type": "function",
"name": "LockBidFunds",
"name": "OpenBid",
"inputs": [
{
"name": "commitmentDigest",
Expand All @@ -80,14 +85,19 @@
"name": "bidder",
"type": "address",
"internalType": "address"
},
{
"name": "blockNumber",
"type": "uint64",
"internalType": "uint64"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "bidderPrepaidBalances",
"name": "bidderRegistered",
"inputs": [
{
"name": "",
Expand All @@ -98,30 +108,37 @@
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "bidderRegistered",
"inputs": [
"name": "blockTrackerContract",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
"internalType": "contract IBlockTracker"
}
],
"outputs": [
"stateMutability": "view"
},
{
"type": "function",
"name": "depositForSpecificWindow",
"inputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
"name": "window",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
Expand Down Expand Up @@ -164,12 +181,17 @@
},
{
"type": "function",
"name": "getAllowance",
"name": "getDeposit",
"inputs": [
{
"name": "bidder",
"type": "address",
"internalType": "address"
},
{
"name": "window",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
Expand Down Expand Up @@ -215,7 +237,31 @@
},
{
"type": "function",
"name": "minAllowance",
"name": "lockedFunds",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
},
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "minDeposit",
"inputs": [],
"outputs": [
{
Expand Down Expand Up @@ -252,13 +298,6 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "prepay",
"inputs": [],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "protocolFeeAmount",
Expand Down Expand Up @@ -302,6 +341,11 @@
"type": "function",
"name": "retrieveFunds",
"inputs": [
{
"name": "windowToSettle",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "commitmentDigest",
"type": "bytes32",
Expand Down Expand Up @@ -377,6 +421,11 @@
"type": "function",
"name": "unlockFunds",
"inputs": [
{
"name": "window",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "bidID",
"type": "bytes32",
Expand All @@ -388,24 +437,29 @@
},
{
"type": "function",
"name": "withdrawFeeRecipientAmount",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "withdrawPrepaidAmount",
"name": "withdrawBidderAmountFromWindow",
"inputs": [
{
"name": "bidder",
"type": "address",
"internalType": "address payable"
},
{
"name": "window",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "withdrawFeeRecipientAmount",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "withdrawProtocolFee",
Expand Down Expand Up @@ -443,7 +497,38 @@
"internalType": "address"
},
{
"name": "prepaidAmount",
"name": "depositedAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "windowNumber",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "BidderWithdrawal",
"inputs": [
{
"name": "bidder",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "window",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
Expand All @@ -461,6 +546,55 @@
"indexed": true,
"internalType": "bytes32"
},
{
"name": "bidder",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "window",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "FundsRewarded",
"inputs": [
{
"name": "commitmentDigest",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "bidder",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "provider",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "window",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint256",
Expand Down
Loading

0 comments on commit d59f069

Please sign in to comment.