Skip to content

Commit e8a3ef5

Browse files
authored
*: remove chain-split-halt (#4374)
* Comment out chain-split-halt (#4372) * *: completely remove chain-split-halt (#4375) * Completely remove chain-split-halt * Remove unused attestationChecker function
1 parent 7fcd433 commit e8a3ef5

12 files changed

Lines changed: 178 additions & 632 deletions

app/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ func wireCoreWorkflow(ctx context.Context, life *lifecycle.Manager, conf Config,
664664
// Consensus
665665
consensusController, err := consensus.NewConsensusController(
666666
ctx, eth2Cl, p2pNode, sender, peers, p2pKey,
667-
deadlineFunc, gaterFunc, consensusDebugger, featureset.Enabled(featureset.ChainSplitHalt))
667+
deadlineFunc, gaterFunc, consensusDebugger)
668668
if err != nil {
669669
return err
670670
}

core/consensus/controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ type consensusController struct {
4040
// NewConsensusController creates a new consensus controller with the default consensus protocol.
4141
func NewConsensusController(ctx context.Context, eth2Cl eth2wrap.Client, p2pNode host.Host, sender *p2p.Sender,
4242
peers []p2p.Peer, p2pKey *k1.PrivateKey, deadlineFunc core.DeadlineFunc,
43-
gaterFunc core.DutyGaterFunc, debugger Debugger, compareAttestations bool,
43+
gaterFunc core.DutyGaterFunc, debugger Debugger,
4444
) (core.ConsensusController, error) {
4545
qbftDeadliner := core.NewDeadliner(ctx, "consensus.qbft", deadlineFunc)
4646

47-
defaultConsensus, err := qbft.NewConsensus(ctx, eth2Cl, p2pNode, sender, peers, p2pKey, qbftDeadliner, gaterFunc, debugger.AddInstance, compareAttestations)
47+
defaultConsensus, err := qbft.NewConsensus(ctx, eth2Cl, p2pNode, sender, peers, p2pKey, qbftDeadliner, gaterFunc, debugger.AddInstance)
4848
if err != nil {
4949
return nil, err
5050
}

core/consensus/controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func TestConsensusController(t *testing.T) {
6666
bmock, err := beaconmock.New(ctx)
6767
require.NoError(t, err)
6868

69-
controller, err := consensus.NewConsensusController(ctx, bmock, hosts[0], new(p2p.Sender), peers, p2pkeys[0], deadlineFunc, gaterFunc, debugger, false)
69+
controller, err := consensus.NewConsensusController(ctx, bmock, hosts[0], new(p2p.Sender), peers, p2pkeys[0], deadlineFunc, gaterFunc, debugger)
7070
require.NoError(t, err)
7171
require.NotNil(t, controller)
7272

core/consensus/qbft/msg.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func newMsg(pbMsg *pbv1.QBFTMsg, justification []*pbv1.QBFTMsg, values map[[32]b
4141
}
4242
}
4343

44-
var justImpls []qbft.Msg[core.Duty, [32]byte, proto.Message]
44+
var justImpls []qbft.Msg[core.Duty, [32]byte]
4545

4646
for _, j := range justification {
4747
impl, err := newMsg(j, nil, values)
@@ -62,15 +62,15 @@ func newMsg(pbMsg *pbv1.QBFTMsg, justification []*pbv1.QBFTMsg, values map[[32]b
6262
}, nil
6363
}
6464

65-
// Msg wraps *pbv1.QBFTMsg and justifications and implements qbft.Msg[core.Duty, [32]byte, proto.Message].
65+
// Msg wraps *pbv1.QBFTMsg and justifications and implements qbft.Msg[core.Duty, [32]byte].
6666
type Msg struct {
6767
msg *pbv1.QBFTMsg
6868
valueHash [32]byte
6969
preparedValueHash [32]byte
7070
values map[[32]byte]*anypb.Any
7171

7272
justificationProtos []*pbv1.QBFTMsg
73-
justification []qbft.Msg[core.Duty, [32]byte, proto.Message]
73+
justification []qbft.Msg[core.Duty, [32]byte]
7474
}
7575

7676
func (m Msg) Type() qbft.MsgType {
@@ -118,7 +118,7 @@ func (m Msg) PreparedValue() [32]byte {
118118
return m.preparedValueHash
119119
}
120120

121-
func (m Msg) Justification() []qbft.Msg[core.Duty, [32]byte, proto.Message] {
121+
func (m Msg) Justification() []qbft.Msg[core.Duty, [32]byte] {
122122
return m.justification
123123
}
124124

@@ -227,4 +227,4 @@ func toHash32(val []byte) ([32]byte, bool) {
227227
return resp, true
228228
}
229229

230-
var _ qbft.Msg[core.Duty, [32]byte, proto.Message] = Msg{} // Interface assertion
230+
var _ qbft.Msg[core.Duty, [32]byte] = Msg{} // Interface assertion

0 commit comments

Comments
 (0)