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

Dencun update #11

Merged
merged 2 commits into from
Feb 25, 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 @@ -175,6 +175,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
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 @@ -212,6 +212,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
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 @@ -181,6 +181,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -313,6 +318,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -411,6 +421,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -509,6 +524,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -249,6 +254,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -347,6 +357,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -445,6 +460,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
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 @@ -130,6 +130,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -238,6 +243,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -336,6 +346,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -434,6 +449,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down
7 changes: 7 additions & 0 deletions abi/solady/src/utils/JSONParserLib.sol/JSONParserLib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"inputs": [],
"name": "ParsingFailed",
"type": "error"
}
]
12 changes: 12 additions & 0 deletions abi/solady/src/utils/LibString.sol/LibString.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"inputs": [],
"name": "HexLengthInsufficient",
"type": "error"
},
{
"inputs": [],
"name": "TooBigForSmallString",
"type": "error"
}
]
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;
bytes32 parentBeaconBlockRoot;
bool fillPending;
}

Expand Down
31 changes: 18 additions & 13 deletions deployments/rigil/BlockAdAuctionV2.json

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions deployments/rigil/solcInputs/2c77e4990a5e02143cdaa02b8820ef1d.json

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions 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,7 +160,7 @@
iface?: ethers.utils.Interface,
method?: string
) {
const fillPending = true
const fillPending = false
const blockArgs = [
bbArgs.slot,
bbArgs.proposerPubkey,
Expand All @@ -171,6 +171,7 @@
bbArgs.random,
bbArgs.withdrawals.map(w => [ w.index, w.validator, w.address, w.amount ]),
ethers.constants.HashZero,
bbArgs.parentBeaconBlockRoot,
fillPending,
]
if (!method)
Expand All @@ -190,6 +191,7 @@
gasLimit: number;
random: string;
withdrawals: Withdrawal[];
parentBeaconBlockRoot: string;
}

interface Withdrawal {
Expand Down Expand Up @@ -217,6 +219,7 @@
feeRecipient: validator.feeRecipient,
gasLimit: validator.gasLimit,
proposerPubkey: validator.pubkey,
parentBeaconBlockRoot: beacon.payload_attributes.parent_beacon_block_root,
}

}
Expand All @@ -229,10 +232,10 @@
relayUrl: string,
beaconUrl: string,
buildOpts?: IBuildOptions,
resubmit: boolean,
resubmit?: boolean,
}

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

Check warning on line 238 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 @@ -256,7 +259,7 @@
}
}

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

Check warning on line 262 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
4 changes: 3 additions & 1 deletion tasks/utils/beacon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface PayloadAttributes {
prev_randao: string;
suggested_fee_recipient: string;
withdrawals: Withdrawal[];
parent_beacon_block_root: string;
}

export interface BeaconEventData {
Expand Down Expand Up @@ -95,7 +96,8 @@ export class BeaconPAListener {
validator_index: Number(w.validator_index),
address: w.address,
amount: Number(w.amount)
}))
})),
parent_beacon_block_root: parsed.data.payload_attributes.parent_beacon_block_root
}
}
}
Expand Down
Loading