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

catchup with fb changes - use mempool to build blocks #10

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions abi/contracts/blockad/BlockAdV1.sol/BlockAdAuctionV1.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down
5 changes: 5 additions & 0 deletions abi/contracts/blockad/BlockAdV2.sol/BlockAdAuctionV2.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down
20 changes: 20 additions & 0 deletions abi/contracts/blockad/lib/Builder.sol/Builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down Expand Up @@ -307,6 +312,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down Expand Up @@ -400,6 +410,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down Expand Up @@ -493,6 +508,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down Expand Up @@ -243,6 +248,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down Expand Up @@ -336,6 +346,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down Expand Up @@ -429,6 +444,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down
20 changes: 20 additions & 0 deletions abi/contracts/standard_peekers/bids.sol/EthBlockContract.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down Expand Up @@ -232,6 +237,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down Expand Up @@ -325,6 +335,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down Expand Up @@ -418,6 +433,11 @@
"internalType": "bytes",
"name": "extra",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fillPending",
"type": "bool"
}
],
"internalType": "struct Suave.BuildBlockArgs",
Expand Down
1 change: 1 addition & 0 deletions contracts/libraries/Suave.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ library Suave {
bytes32 random;
Withdrawal[] withdrawals;
bytes extra;
bool fillPending;
}

struct DataRecord {
Expand Down
69 changes: 37 additions & 32 deletions deployments/rigil/BlockAdAuctionV2.json

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions deployments/rigil/solcInputs/3f2cfcf165740f55302d083efbeaea10.json

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions deployments/rigil/solcInputs/7f031fc6e7dc25271d64b2857e669634.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion tasks/build-blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
.addOptionalParam('builder', 'Address of a Builder contract. By default fetch most recently deployed one.')
.addFlag('blockad', 'Whether to build blocks for ad-bids')
.addFlag('resubmit', 'Whether to resubmit to relay on err `payload attributes not (yet) known`')
.setAction(async function (taskArgs: any, hre: HRE) {

Check warning on line 33 in tasks/build-blocks.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
utils.checkChain(hre, [SUAVE_CHAIN_ID, RIGIL_CHAIN_ID])
const config = await getConfig(hre, taskArgs)

Expand Down Expand Up @@ -160,6 +160,7 @@
iface?: ethers.utils.Interface,
method?: string
) {
const fillPending = true
const blockArgs = [
bbArgs.slot,
bbArgs.proposerPubkey,
Expand All @@ -169,7 +170,8 @@
bbArgs.gasLimit,
bbArgs.random,
bbArgs.withdrawals.map(w => [ w.index, w.validator, w.address, w.amount ]),
ethers.constants.HashZero
ethers.constants.HashZero,
fillPending,
]
if (!method)
method = 'buildMevShare'
Expand Down Expand Up @@ -230,7 +232,7 @@
resubmit: boolean,
}

async function getConfig(hre: HRE, taskArgs: any): Promise<ITaskConfig> {

Check warning on line 235 in tasks/build-blocks.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const useTestnet = utils.getNetworkChainId(hre) === RIGIL_CHAIN_ID
const cliConfig = await parseTaskArgs(hre, taskArgs)
const envConfig = getEnvConfig(useTestnet)
Expand All @@ -254,7 +256,7 @@
}
}

async function parseTaskArgs(hre: HRE, taskArgs: any) {

Check warning on line 259 in tasks/build-blocks.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const nSlots = parseInt(taskArgs.nslots)
const builderCName = taskArgs.blockad ? 'BlockAdAuctionV2' : 'Builder'
const builderAdd = taskArgs.builder
Expand Down
Loading