@@ -33,110 +33,6 @@ const (
33
33
blinded
34
34
)
35
35
36
- // DEPRECATED: Please use ProduceBlockV3 instead.
37
- //
38
- // ProduceBlockV2 requests the beacon node to produce a valid unsigned beacon block,
39
- // which can then be signed by a proposer and submitted.
40
- func (s * Server ) ProduceBlockV2 (w http.ResponseWriter , r * http.Request ) {
41
- ctx , span := trace .StartSpan (r .Context (), "validator.ProduceBlockV2" )
42
- defer span .End ()
43
-
44
- if shared .IsSyncing (ctx , w , s .SyncChecker , s .HeadFetcher , s .TimeFetcher , s .OptimisticModeFetcher ) {
45
- return
46
- }
47
-
48
- segments := strings .Split (r .URL .Path , "/" )
49
- rawSlot := segments [len (segments )- 1 ]
50
- rawRandaoReveal := r .URL .Query ().Get ("randao_reveal" )
51
- rawGraffiti := r .URL .Query ().Get ("graffiti" )
52
- rawSkipRandaoVerification := r .URL .Query ().Get ("skip_randao_verification" )
53
-
54
- slot , valid := shared .ValidateUint (w , "slot" , rawSlot )
55
- if ! valid {
56
- return
57
- }
58
-
59
- var randaoReveal []byte
60
- if rawSkipRandaoVerification == "true" {
61
- randaoReveal = common .InfiniteSignature [:]
62
- } else {
63
- rr , err := bytesutil .DecodeHexWithLength (rawRandaoReveal , fieldparams .BLSSignatureLength )
64
- if err != nil {
65
- httputil .HandleError (w , errors .Wrap (err , "Unable to decode randao reveal" ).Error (), http .StatusBadRequest )
66
- return
67
- }
68
- randaoReveal = rr
69
- }
70
- var graffiti []byte
71
- if rawGraffiti != "" {
72
- g , err := bytesutil .DecodeHexWithLength (rawGraffiti , 32 )
73
- if err != nil {
74
- httputil .HandleError (w , errors .Wrap (err , "Unable to decode graffiti" ).Error (), http .StatusBadRequest )
75
- return
76
- }
77
- graffiti = g
78
- }
79
-
80
- s .produceBlockV3 (ctx , w , r , & eth.BlockRequest {
81
- Slot : primitives .Slot (slot ),
82
- RandaoReveal : randaoReveal ,
83
- Graffiti : graffiti ,
84
- SkipMevBoost : true ,
85
- }, full )
86
- }
87
-
88
- // DEPRECATED: Please use ProduceBlockV3 instead.
89
- //
90
- // ProduceBlindedBlock requests the beacon node to produce a valid unsigned blinded beacon block,
91
- // which can then be signed by a proposer and submitted.
92
- func (s * Server ) ProduceBlindedBlock (w http.ResponseWriter , r * http.Request ) {
93
- ctx , span := trace .StartSpan (r .Context (), "validator.ProduceBlindedBlock" )
94
- defer span .End ()
95
-
96
- if shared .IsSyncing (ctx , w , s .SyncChecker , s .HeadFetcher , s .TimeFetcher , s .OptimisticModeFetcher ) {
97
- return
98
- }
99
-
100
- segments := strings .Split (r .URL .Path , "/" )
101
- rawSlot := segments [len (segments )- 1 ]
102
- rawRandaoReveal := r .URL .Query ().Get ("randao_reveal" )
103
- rawGraffiti := r .URL .Query ().Get ("graffiti" )
104
- rawSkipRandaoVerification := r .URL .Query ().Get ("skip_randao_verification" )
105
-
106
- slot , valid := shared .ValidateUint (w , "slot" , rawSlot )
107
- if ! valid {
108
- return
109
- }
110
-
111
- var randaoReveal []byte
112
- if rawSkipRandaoVerification == "true" {
113
- randaoReveal = common .InfiniteSignature [:]
114
- } else {
115
- rr , err := bytesutil .DecodeHexWithLength (rawRandaoReveal , fieldparams .BLSSignatureLength )
116
- if err != nil {
117
- httputil .HandleError (w , errors .Wrap (err , "Unable to decode randao reveal" ).Error (), http .StatusBadRequest )
118
- return
119
- }
120
- randaoReveal = rr
121
- }
122
- var graffiti []byte
123
- if rawGraffiti != "" {
124
- g , err := bytesutil .DecodeHexWithLength (rawGraffiti , 32 )
125
- if err != nil {
126
- httputil .HandleError (w , errors .Wrap (err , "Unable to decode graffiti" ).Error (), http .StatusBadRequest )
127
- return
128
- }
129
- graffiti = g
130
- }
131
-
132
- s .produceBlockV3 (ctx , w , r , & eth.BlockRequest {
133
- Slot : primitives .Slot (slot ),
134
- RandaoReveal : randaoReveal ,
135
- Graffiti : graffiti ,
136
- SkipMevBoost : false ,
137
- }, blinded )
138
- }
139
-
140
36
// ProduceBlockV3 requests a beacon node to produce a valid block, which can then be signed by a validator. The
141
37
// returned block may be blinded or unblinded, depending on the current state of the network as
142
38
// decided by the execution and beacon nodes.
0 commit comments