@@ -90,6 +90,72 @@ var tests = []TestSpec{
9090 },
9191}
9292
93+ var builderTests = []TestSpec {
94+ BuilderWithdrawalsTestSpec {
95+ BaseWithdrawalsTestSpec : BaseWithdrawalsTestSpec {
96+ Name : "test-builders-capella-invalid-withdrawals" ,
97+ Description : `
98+ Test canonical chain can still finalize if the builders start
99+ building payloads with invalid withdrawals list.
100+ ` ,
101+ // All validators can withdraw from the start
102+ GenesisExecutionWithdrawalCredentialsShares : 1 ,
103+ },
104+ BuilderTestError : INVALID_WITHDRAWALS ,
105+ },
106+ BuilderWithdrawalsTestSpec {
107+ BaseWithdrawalsTestSpec : BaseWithdrawalsTestSpec {
108+ Name : "test-builders-capella-error-on-capella-header-request" ,
109+ Description : `
110+ Test canonical chain can still finalize if the builders start
111+ returning error on header request after capella transition.
112+ ` ,
113+ // All validators can withdraw from the start
114+ GenesisExecutionWithdrawalCredentialsShares : 1 ,
115+ },
116+ BuilderTestError : ERROR_ON_HEADER_REQUEST ,
117+ },
118+ BuilderWithdrawalsTestSpec {
119+ BaseWithdrawalsTestSpec : BaseWithdrawalsTestSpec {
120+ Name : "test-builders-capella-error-on-capella-unblind-payload-requestr" ,
121+ Description : `
122+ Test canonical chain can still finalize if the builders start
123+ returning error on unblinded payload request after capella transition.
124+ ` ,
125+ // All validators can withdraw from the start
126+ GenesisExecutionWithdrawalCredentialsShares : 1 ,
127+ },
128+ BuilderTestError : ERROR_ON_UNBLINDED_PAYLOAD_REQUEST ,
129+ },
130+ BuilderWithdrawalsTestSpec {
131+ BaseWithdrawalsTestSpec : BaseWithdrawalsTestSpec {
132+ Name : "test-builders-capella-invalid-payload" ,
133+ Description : `
134+ Test consensus clients correctly circuit break builder after a
135+ period of empty blocks due to invalid unblinded blocks.
136+ The payloads are built using an invalid state root, which can only
137+ be caught after unblinding the entire payload and running it in the
138+ local execution client, at which point another payload cannot be
139+ produced locally and results in an empty slot.
140+ ` ,
141+ // All validators can withdraw from the start
142+ GenesisExecutionWithdrawalCredentialsShares : 1 ,
143+ },
144+ BuilderTestError : VALID_WITHDRAWALS_INVALID_STATE_ROOT ,
145+ },
146+ BuilderWithdrawalsTestSpec {
147+ BaseWithdrawalsTestSpec : BaseWithdrawalsTestSpec {
148+ Name : "test-builders-capella-correct-withdrawals" ,
149+ Description : `
150+ Test canonical chain includes capella payloads built by the builder api.
151+ ` ,
152+ // All validators can withdraw from the start
153+ GenesisExecutionWithdrawalCredentialsShares : 1 ,
154+ },
155+ BuilderTestError : NO_ERROR ,
156+ },
157+ }
158+
93159func main () {
94160 // Create simulator that runs all tests
95161 sim := hivesim .New ()
@@ -101,16 +167,22 @@ func main() {
101167 c := clients .ClientsByRole (clientTypes )
102168
103169 // Create the test suites
104- engineSuite := hivesim.Suite {
170+ withdrawalsSuite := hivesim.Suite {
105171 Name : "eth2-withdrawals" ,
106- Description : `Collection of test vectors that use a ExecutionClient+BeaconNode+ValidatorClient testnet.` ,
172+ Description : `Collection of test vectors that use a ExecutionClient+BeaconNode+ValidatorClient testnet for Shanghai+Capella.` ,
173+ }
174+ builderSuite := hivesim.Suite {
175+ Name : "eth2-withdrawals-builder" ,
176+ Description : `Collection of test vectors that use a ExecutionClient+BeaconNode+ValidatorClient testnet and builder API for Shanghai+Capella.` ,
107177 }
108178
109179 // Add all tests to the suites
110- addAllTests (& engineSuite , c , tests )
180+ addAllTests (& withdrawalsSuite , c , tests )
181+ addAllTests (& builderSuite , c , builderTests )
111182
112183 // Mark suites for execution
113- hivesim .MustRunSuite (sim , engineSuite )
184+ hivesim .MustRunSuite (sim , withdrawalsSuite )
185+ hivesim .MustRunSuite (sim , builderSuite )
114186}
115187
116188func addAllTests (
0 commit comments