Skip to content

Commit a9bf7e2

Browse files
alan-ssvlabsAlan Li
authored andcommitted
Spec - remove ssz encoding for CommitteeMember and Share (#490)
* remove ssz encoding for CommitteeMember and Share * remove commented code --------- Co-authored-by: Alan Li <lizhuolun@ZhuolundeMacBook-Pro.local>
1 parent 659fa7c commit a9bf7e2

File tree

16 files changed

+11
-666
lines changed

16 files changed

+11
-666
lines changed

ssv/spectest/generate/tests.json.gz

3 Bytes
Binary file not shown.

types/generate.go

-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
package types
22

3-
//go:generate rm -f ./operator_encoding.go
4-
//go:generate go run github.com/ferranbt/fastssz/sszgen --path operator.go --include ./committee_id.go,./domain_type.go --exclude-objs OperatorID
5-
6-
//go:generate rm -f ./share_encoding.go
7-
//go:generate go run github.com/ferranbt/fastssz/sszgen --path share.go --include $GOPATH/pkg/mod/github.com/attestantio/go-eth2-client@v0.21.3/spec/phase0,./operator.go,./messages.go,./signer.go,./domain_type.go
8-
93
//go:generate rm -f ./messages_encoding.go
104
//go:generate go run github.com/ferranbt/fastssz/sszgen --path messages.go --include ./operator.go --exclude-objs ValidatorPK,MessageID,MsgType,ShareValidatorPK
115

types/operator.go

-8
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,3 @@ func (cm *CommitteeMember) HasPartialQuorum(cnt int) bool {
4444
}
4545
return uint64(cnt) >= cm.FaultyNodes+1
4646
}
47-
48-
func (cm *CommitteeMember) Encode() ([]byte, error) {
49-
return cm.MarshalSSZ()
50-
}
51-
52-
func (cm *CommitteeMember) Decode(data []byte) error {
53-
return cm.UnmarshalSSZ(data)
54-
}

types/operator_encoding.go

-252
This file was deleted.

types/share.go

-8
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,3 @@ type ShareMember struct {
1818
SharePubKey ShareValidatorPK `ssz-size:"48"`
1919
Signer OperatorID
2020
}
21-
22-
func (share *Share) Encode() ([]byte, error) {
23-
return share.MarshalSSZ()
24-
}
25-
26-
func (share *Share) Decode(data []byte) error {
27-
return share.UnmarshalSSZ(data)
28-
}

0 commit comments

Comments
 (0)