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

Add the Data Availability Header to BlockID #312

Closed
wants to merge 108 commits into from
Closed
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
31c996a
include DAH in block ID proto files, add QoL methods, and fix all ./t…
evan-forbes May 3, 2021
1522ee8
Merge branch 'master' into evan/add-dah-to-block-id
evan-forbes May 4, 2021
052bdbe
linter and bug
evan-forbes May 4, 2021
f9b9629
fix all evidence package bugs
evan-forbes May 4, 2021
760d371
don't use nil dah when creating a new blockchain reactor
evan-forbes May 4, 2021
e49a6ed
fix TestValidateBlockHeader
evan-forbes May 4, 2021
8243b27
fix TestLoadBaseMeta
evan-forbes May 4, 2021
8dd6964
fix TestLoadBlockMeta
evan-forbes May 4, 2021
24153f7
fix TestBlockFetchAtHeight
evan-forbes May 4, 2021
61969de
fix TestSignProposal
evan-forbes May 4, 2021
563e94e
fix TestMock
evan-forbes May 5, 2021
235da5b
fix TestCreateProposalBlock
evan-forbes May 5, 2021
300e0fb
Fix TestBlockchainMessageVectors
evan-forbes May 5, 2021
98c9f13
use EmptyBlockID func and use block in vote
evan-forbes May 5, 2021
4dcd7a8
Fix TestBlockHash
evan-forbes May 5, 2021
e8e50fc
go mod tidy
evan-forbes May 5, 2021
672ce3b
Fix TestBlockMakePartSet
evan-forbes May 5, 2021
76bae0c
Fix more nil commit Tests
evan-forbes May 5, 2021
5956145
fix more nil commit tests
evan-forbes May 5, 2021
39b5c75
get rid of the BlockID method
evan-forbes May 5, 2021
330e9dd
Fix TestBeginBlockByzantineValidators
evan-forbes May 5, 2021
0d9509a
fill in more of the blockIDs
evan-forbes May 6, 2021
d4a3bf8
Fix TestLightBlockProtobuf
evan-forbes May 6, 2021
1256a42
fix TestLightBlockValidateBasic
evan-forbes May 6, 2021
edc26f4
fix TestEvidenceProto
evan-forbes May 6, 2021
f80f731
fix TestHeader_ValidateBasic
evan-forbes May 6, 2021
80f6d75
fix TestProposalString
evan-forbes May 6, 2021
7847b9d
fix TestProposalValidateBasic
evan-forbes May 6, 2021
d7aa886
fix TestHeaderHash
evan-forbes May 6, 2021
d0034ec
update MaxHeaderBytes to fix TestMaxHeaderBytes
evan-forbes May 6, 2021
48a8305
fix TestProposalProtoBuf
evan-forbes May 6, 2021
03a4329
fix TestCommitValidateBasic
evan-forbes May 6, 2021
24681e6
tons of test fixes
evan-forbes May 7, 2021
df5b458
cleanup
evan-forbes May 7, 2021
d11f9d4
more fixes
evan-forbes May 8, 2021
9d53b41
don't return a nil for a non nil data availability header
evan-forbes May 10, 2021
bc81eff
Merge branch 'master' into evan/add-dah-to-block-id
evan-forbes May 10, 2021
3e5f077
Merge branch 'master' into evan/add-dah-to-block-id
evan-forbes May 10, 2021
5918bc0
fix more bugs
evan-forbes May 11, 2021
9dbf03a
linter
evan-forbes May 11, 2021
d865cc7
linter
evan-forbes May 11, 2021
8acce6b
remove unreachable code
evan-forbes May 11, 2021
a127447
linter
evan-forbes May 11, 2021
5c39da7
increase timeouts for CI
evan-forbes May 11, 2021
a6c85fc
remove unused nolint directive
evan-forbes May 11, 2021
304537f
add more docs to comptueshares
evan-forbes May 11, 2021
717ffd0
revert linter changes
evan-forbes May 11, 2021
2a33518
increase consensus timeouts
evan-forbes May 11, 2021
4c4bad0
increase timeout for RetrieveBlockData
evan-forbes May 11, 2021
74795bf
remove uneccessary hash call
evan-forbes May 11, 2021
ee766c7
add TxFilter test back in
evan-forbes May 11, 2021
51d9e95
revert uneccessary changes
evan-forbes May 11, 2021
912a067
increase timeouts for problem tests
evan-forbes May 11, 2021
d5dbe9a
hardcode bytes for min dah
evan-forbes May 12, 2021
cc5fd2d
fix accidental linter error
evan-forbes May 12, 2021
10c3334
slight timing adjustment
evan-forbes May 12, 2021
3bc1510
revert commented out test
evan-forbes May 13, 2021
8301d52
use less than or equal too instead of requiring equal
evan-forbes May 13, 2021
93adad9
add details to panic
evan-forbes May 13, 2021
a3f1101
typo
evan-forbes May 13, 2021
371684e
clean up
evan-forbes May 13, 2021
b28f6cb
use random blockID during proto test
evan-forbes May 13, 2021
17055a6
remove uneeded line
evan-forbes May 13, 2021
10366d2
add the hash back into the dah only when coming from proto
evan-forbes May 15, 2021
9fd4f9f
revert timeout increases
evan-forbes May 15, 2021
d40de7e
Merge branch 'master' into evan/add-dah-to-block-id
evan-forbes May 20, 2021
a6b08fc
Merge branch 'master' into evan/add-dah-to-block-id
evan-forbes May 21, 2021
5f88f6e
add a dah to test data
evan-forbes May 21, 2021
3f1c2f2
don't pass the block while making test commits
evan-forbes May 21, 2021
a8a81ee
add error for blockIDFromProto
evan-forbes May 21, 2021
62e4f8e
double e2e timeout
evan-forbes May 21, 2021
6da14b3
try longer progress e2e timeout
evan-forbes May 21, 2021
7074695
try even higher timeout
evan-forbes May 21, 2021
f39d6f9
what is time anyways
evan-forbes May 21, 2021
a9048c2
increase the rpc config timeout
evan-forbes May 21, 2021
fe0647c
disable reading limit check
evan-forbes May 21, 2021
4990c0a
comment out tests that check for message length
evan-forbes May 21, 2021
e83b8bd
Revert "comment out tests that check for message length"
evan-forbes May 21, 2021
860ba0a
crank the node info msg size
evan-forbes May 21, 2021
6cff6aa
add the type to see which proto message are getting so messed up
evan-forbes May 21, 2021
0931465
find the type of the fialing readers
evan-forbes May 21, 2021
098e39f
log the type of the reader
evan-forbes May 21, 2021
4e58a5c
log the number of time each is read
evan-forbes May 21, 2021
15f8e99
Revert "log the number of time each is read"
evan-forbes May 21, 2021
9673461
increase the timeout for the privval secret connection
evan-forbes May 21, 2021
c861186
lol
evan-forbes May 21, 2021
edfb5c1
revert some timeouts
evan-forbes May 21, 2021
b0165bb
revert another
evan-forbes May 21, 2021
0f70204
Merge branch 'master' into evan/add-dah-to-block-id
evan-forbes May 24, 2021
90828bb
Merge branch 'master' into evan/add-dah-to-block-id3
evan-forbes May 24, 2021
ad7f96f
increase timeout and add additional hash len check
evan-forbes May 24, 2021
039a9c7
revert later: try to figure out why test fails in CI only
evan-forbes May 24, 2021
4b91915
very large timeout per each node
evan-forbes May 24, 2021
26f6087
add additional condition to run fillDataAvailabilityHeader
evan-forbes May 24, 2021
4c82b57
Merge branch 'evan/add-dah-to-block-id3' into evan/add-dah-to-block-id
evan-forbes May 24, 2021
359a83f
Revert "TestStateLockPOLSafety1 times out on CI: increase threshold"
evan-forbes May 24, 2021
475de23
increase consensus test config timeouts again
evan-forbes May 24, 2021
4cbf0ef
increase signer endpoint timeout
evan-forbes May 24, 2021
156a597
increase TestRetrieveBlockData timeout
evan-forbes May 24, 2021
3e1dc41
just directly use the size of the message
evan-forbes May 24, 2021
722593f
Revert "just directly use the size of the message"
evan-forbes May 24, 2021
dfeb971
increase some other privval timeouts
evan-forbes May 24, 2021
1fac653
some other random timeouts
evan-forbes May 24, 2021
3a48ee9
double the mempool timeout
evan-forbes May 24, 2021
950595d
Merge branch 'master' into evan/add-dah-to-block-id
evan-forbes May 26, 2021
dca6828
Merge branch 'master' into evan/add-dah-to-block-id
evan-forbes Jun 24, 2021
73b0fa2
minor conflict fixes
evan-forbes Jun 24, 2021
54e1719
use more reasonable e2e timeout
evan-forbes Jun 24, 2021
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
220 changes: 176 additions & 44 deletions abci/types/types.pb.go

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions blockchain/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,18 @@ func TestBcStatusResponseMessageValidateBasic(t *testing.T) {

// nolint:lll // ignore line length in tests
func TestBlockchainMessageVectors(t *testing.T) {
block := types.MakeBlock(int64(3), []types.Tx{types.Tx("Hello World")}, nil, nil, types.Messages{}, nil)
block := types.MakeBlock(
int64(3),
[]types.Tx{types.Tx("Hello World")},
nil,
nil,
types.Messages{},
&types.Commit{
BlockID: types.BlockID{
DataAvailabilityHeader: types.MinDataAvailabilityHeader(),
},
},
)
block.Version.Block = 11 // overwrite updated protocol version

bpb, err := block.ToProto()
Expand All @@ -97,7 +108,7 @@ func TestBlockchainMessageVectors(t *testing.T) {
BlockRequest: &bcproto.BlockRequest{Height: math.MaxInt64}}},
"0a0a08ffffffffffffffff7f"},
{"BlockResponseMessage", &bcproto.Message{Sum: &bcproto.Message_BlockResponse{
BlockResponse: &bcproto.BlockResponse{Block: bpb}}}, "1ac2020abf020a5d0a02080b1803220b088092b8c398feffffff012a021200380142204c149a7cfadc92b669b0cbfa4951a1b18c2d9f3177a3b8756d39ebb96e9d63317220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85512130a0b48656c6c6f20576f726c6412001a0022001ac8010a3000000000000000010000000000000001b81cb5596c28d044214b9f935e4af7dbe76e417f6182d86fbee68bfff7b2ff3a0a30ffffffffffffffffffffffffffffffffc4096ba8fccf882c309896e9168fa43fe62fccb752cb12d5160cc1d9c2ebffe7123000000000000000010000000000000001b81cb5596c28d044214b9f935e4af7dbe76e417f6182d86fbee68bfff7b2ff3a1230ffffffffffffffffffffffffffffffffc4096ba8fccf882c309896e9168fa43fe62fccb752cb12d5160cc1d9c2ebffe7"},
BlockResponse: &bcproto.BlockResponse{Block: bpb}}}, "1a84060a81060acb020a02080b1803220b088092b8c398feffffff012acd0112001ac8010a30fffffffffffffffefffffffffffffffe669aa8f0d85221a05b6f0917884d30616a6c7d5330a5640a08a04dcc5b092f4f0a30ffffffffffffffffffffffffffffffff293437f3b6a5611e25c90d5a44b84cc4b3720cdba68553defe8b719af1f5c3951230fffffffffffffffefffffffffffffffe669aa8f0d85221a05b6f0917884d30616a6c7d5330a5640a08a04dcc5b092f4f1230ffffffffffffffffffffffffffffffff293437f3b6a5611e25c90d5a44b84cc4b3720cdba68553defe8b719af1f5c3953220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855380142204c149a7cfadc92b669b0cbfa4951a1b18c2d9f3177a3b8756d39ebb96e9d63317220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85512130a0b48656c6c6f20576f726c6412001a0022001ac8010a3000000000000000010000000000000001b81cb5596c28d044214b9f935e4af7dbe76e417f6182d86fbee68bfff7b2ff3a0a30ffffffffffffffffffffffffffffffffc4096ba8fccf882c309896e9168fa43fe62fccb752cb12d5160cc1d9c2ebffe7123000000000000000010000000000000001b81cb5596c28d044214b9f935e4af7dbe76e417f6182d86fbee68bfff7b2ff3a1230ffffffffffffffffffffffffffffffffc4096ba8fccf882c309896e9168fa43fe62fccb752cb12d5160cc1d9c2ebffe722d0011acd0112001ac8010a30fffffffffffffffefffffffffffffffe669aa8f0d85221a05b6f0917884d30616a6c7d5330a5640a08a04dcc5b092f4f0a30ffffffffffffffffffffffffffffffff293437f3b6a5611e25c90d5a44b84cc4b3720cdba68553defe8b719af1f5c3951230fffffffffffffffefffffffffffffffe669aa8f0d85221a05b6f0917884d30616a6c7d5330a5640a08a04dcc5b092f4f1230ffffffffffffffffffffffffffffffff293437f3b6a5611e25c90d5a44b84cc4b3720cdba68553defe8b719af1f5c395"},
{"NoBlockResponseMessage", &bcproto.Message{Sum: &bcproto.Message_NoBlockResponse{
NoBlockResponse: &bcproto.NoBlockResponse{Height: 1}}}, "12020801"},
{"NoBlockResponseMessage", &bcproto.Message{Sum: &bcproto.Message_NoBlockResponse{
Expand Down
9 changes: 8 additions & 1 deletion blockchain/v0/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,17 @@ FOR_LOOP:
didProcessCh <- struct{}{}
}

first.DataHash = nil
first.Hash()
evan-forbes marked this conversation as resolved.
Show resolved Hide resolved

var (
firstParts = first.MakePartSet(types.BlockPartSizeBytes)
firstPartSetHeader = firstParts.Header()
firstID = types.BlockID{Hash: first.Hash(), PartSetHeader: firstPartSetHeader}
firstID = types.BlockID{
Hash: first.Hash(),
PartSetHeader: firstPartSetHeader,
DataAvailabilityHeader: &first.DataAvailabilityHeader,
}
)

// Finally, verify the first block using the second's commit
Expand Down
31 changes: 27 additions & 4 deletions blockchain/v0/reactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ func newBlockchainReactor(

// let's add some blocks in
for blockHeight := int64(1); blockHeight <= maxBlockHeight; blockHeight++ {
lastCommit := types.NewCommit(blockHeight-1, 0, types.BlockID{}, nil)
lastCommit := types.NewCommit(
blockHeight-1,
0,
types.EmptyBlockID(),
nil,
)
if blockHeight > 1 {
lastBlockMeta := blockStore.LoadBlockMeta(blockHeight - 1)
lastBlock := blockStore.LoadBlock(blockHeight - 1)
Expand All @@ -117,10 +122,14 @@ func newBlockchainReactor(
}

thisBlock := makeBlock(blockHeight, state, lastCommit)
thisBlock.Hash()

thisParts := thisBlock.MakePartSet(types.BlockPartSizeBytes)
blockID := types.BlockID{Hash: thisBlock.Hash(), PartSetHeader: thisParts.Header()}

blockID := types.BlockID{
Hash: thisBlock.Hash(),
PartSetHeader: thisParts.Header(),
DataAvailabilityHeader: &thisBlock.DataAvailabilityHeader,
}
state, _, err = blockExec.ApplyBlock(state, blockID, thisBlock)
if err != nil {
panic(fmt.Errorf("error apply block: %w", err))
Expand Down Expand Up @@ -173,11 +182,23 @@ func TestNoBlockResponse(t *testing.T) {
}

for {
fmt.Println("is caught up?")
if reactorPairs[1].reactor.pool.IsCaughtUp() {
break
}

time.Sleep(10 * time.Millisecond)
// The mutex is getting hit now, I don't know why

// fmt.Println(
// "ahead reactor peer count",
// // "is running", reactorPairs[0].reactor.pool.IsRunning(),
// len(reactorPairs[0].reactor.pool.peers),
// "behind reactor peer count",
// // "is running", reactorPairs[1].reactor.pool.IsRunning(),
// len(reactorPairs[1].reactor.pool.peers),
// )

time.Sleep(100 * time.Millisecond)
}

assert.Equal(t, maxBlockHeight, reactorPairs[0].reactor.store.Height())
Expand Down Expand Up @@ -295,6 +316,8 @@ func makeTxs(height int64) (txs []types.Tx) {
func makeBlock(height int64, state sm.State, lastCommit *types.Commit) *types.Block {
block, _ := state.MakeBlock(height, makeTxs(height), nil,
nil, types.Messages{}, lastCommit, state.Validators.GetProposer().Address)

block.LastBlockID = lastCommit.BlockID
return block
}

Expand Down
63 changes: 53 additions & 10 deletions consensus/byzantine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,18 @@ func TestByzantinePrevoteEquivocation(t *testing.T) {
// allow first height to happen normally so that byzantine validator is no longer proposer
if height == prevoteHeight {
bcs.Logger.Info("Sending two votes")
prevote1, err := bcs.signVote(tmproto.PrevoteType, bcs.ProposalBlock.Hash(), bcs.ProposalBlockParts.Header())
prevote1, err := bcs.signVote(tmproto.PrevoteType,
types.BlockID{
Hash: bcs.ProposalBlock.Hash(),
PartSetHeader: bcs.ProposalBlockParts.Header(),
DataAvailabilityHeader: &bcs.ProposalBlock.DataAvailabilityHeader,
},
)
require.NoError(t, err)
prevote2, err := bcs.signVote(tmproto.PrevoteType, nil, types.PartSetHeader{})
prevote2, err := bcs.signVote(
tmproto.PrevoteType,
types.EmptyBlockID(),
)
require.NoError(t, err)
peerList := reactors[byzantineNode].Switch.Peers().List()
bcs.Logger.Info("Getting peer list", "peers", peerList)
Expand Down Expand Up @@ -374,8 +383,12 @@ func byzantineDecideProposalFunc(t *testing.T, height int64, round int32, cs *St

// Create a new proposal block from state/txs from the mempool.
block1, blockParts1 := cs.createProposalBlock()
polRound, propBlockID := cs.ValidRound, types.BlockID{Hash: block1.Hash(), PartSetHeader: blockParts1.Header()}
proposal1 := types.NewProposal(height, round, polRound, propBlockID, &block1.DataAvailabilityHeader)
polRound, propBlockID := cs.ValidRound, types.BlockID{
Hash: block1.Hash(),
PartSetHeader: blockParts1.Header(),
DataAvailabilityHeader: &block1.DataAvailabilityHeader,
}
proposal1 := types.NewProposal(height, round, polRound, propBlockID)
p1, err := proposal1.ToProto()
require.NoError(t, err)
if err := cs.privValidator.SignProposal(cs.state.ChainID, p1); err != nil {
Expand All @@ -389,8 +402,12 @@ func byzantineDecideProposalFunc(t *testing.T, height int64, round int32, cs *St

// Create a new proposal block from state/txs from the mempool.
block2, blockParts2 := cs.createProposalBlock()
polRound, propBlockID = cs.ValidRound, types.BlockID{Hash: block2.Hash(), PartSetHeader: blockParts2.Header()}
proposal2 := types.NewProposal(height, round, polRound, propBlockID, &block2.DataAvailabilityHeader)
polRound, propBlockID = cs.ValidRound, types.BlockID{
Hash: block2.Hash(),
PartSetHeader: blockParts2.Header(),
DataAvailabilityHeader: &block2.DataAvailabilityHeader,
}
proposal2 := types.NewProposal(height, round, polRound, propBlockID)
p2, err := proposal2.ToProto()
require.NoError(t, err)
if err := cs.privValidator.SignProposal(cs.state.ChainID, p2); err != nil {
Expand All @@ -407,9 +424,29 @@ func byzantineDecideProposalFunc(t *testing.T, height int64, round int32, cs *St
t.Logf("Byzantine: broadcasting conflicting proposals to %d peers", len(peers))
for i, peer := range peers {
if i < len(peers)/2 {
go sendProposalAndParts(height, round, cs, peer, proposal1, block1Hash, blockParts1)
go sendProposalAndParts(
height,
round,
cs,
peer,
proposal1,
block1Hash,
blockParts1,
&block1.DataAvailabilityHeader,
)

} else {
go sendProposalAndParts(height, round, cs, peer, proposal2, block2Hash, blockParts2)
go sendProposalAndParts(
height,
round,
cs,
peer,
proposal2,
block2Hash,
blockParts2,
&block2.DataAvailabilityHeader,
)

}
}
}
Expand All @@ -422,6 +459,7 @@ func sendProposalAndParts(
proposal *types.Proposal,
blockHash []byte,
parts *types.PartSet,
dah *types.DataAvailabilityHeader,
) {
// proposal
msg := &ProposalMessage{Proposal: proposal}
Expand All @@ -440,8 +478,13 @@ func sendProposalAndParts(

// votes
cs.mtx.Lock()
prevote, _ := cs.signVote(tmproto.PrevoteType, blockHash, parts.Header())
precommit, _ := cs.signVote(tmproto.PrecommitType, blockHash, parts.Header())
blockID := types.BlockID{
Hash: blockHash,
PartSetHeader: parts.Header(),
DataAvailabilityHeader: dah,
}
prevote, _ := cs.signVote(tmproto.PrevoteType, blockID)
precommit, _ := cs.signVote(tmproto.PrecommitType, blockID)
cs.mtx.Unlock()

peer.Send(VoteChannel, MustEncode(&VoteMessage{prevote}))
Expand Down
29 changes: 14 additions & 15 deletions consensus/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ func newValidatorStub(privValidator types.PrivValidator, valIndex int32) *valida
}
}

func (vs *validatorStub) signVote(
voteType tmproto.SignedMsgType,
hash []byte,
header types.PartSetHeader) (*types.Vote, error) {
func (vs *validatorStub) signVote(voteType tmproto.SignedMsgType, blockID types.BlockID) (*types.Vote, error) {

pubKey, err := vs.PrivValidator.GetPubKey()
if err != nil {
Expand All @@ -103,7 +100,7 @@ func (vs *validatorStub) signVote(
Round: vs.Round,
Timestamp: tmtime.Now(),
Type: voteType,
BlockID: types.BlockID{Hash: hash, PartSetHeader: header},
BlockID: blockID,
}
v := vote.ToProto()
err = vs.PrivValidator.SignVote(config.ChainID(), v)
Expand All @@ -113,8 +110,8 @@ func (vs *validatorStub) signVote(
}

// Sign vote for type/hash/header
func signVote(vs *validatorStub, voteType tmproto.SignedMsgType, hash []byte, header types.PartSetHeader) *types.Vote {
v, err := vs.signVote(voteType, hash, header)
func signVote(vs *validatorStub, voteType tmproto.SignedMsgType, blockID types.BlockID) *types.Vote {
v, err := vs.signVote(voteType, blockID)
if err != nil {
panic(fmt.Errorf("failed to sign vote: %v", err))
}
Expand All @@ -123,12 +120,11 @@ func signVote(vs *validatorStub, voteType tmproto.SignedMsgType, hash []byte, he

func signVotes(
voteType tmproto.SignedMsgType,
hash []byte,
header types.PartSetHeader,
blockID types.BlockID,
vss ...*validatorStub) []*types.Vote {
votes := make([]*types.Vote, len(vss))
for i, vs := range vss {
votes[i] = signVote(vs, voteType, hash, header)
votes[i] = signVote(vs, voteType, blockID)
}
return votes
}
Expand Down Expand Up @@ -200,8 +196,12 @@ func decideProposal(
}

// Make proposal
polRound, propBlockID := validRound, types.BlockID{Hash: block.Hash(), PartSetHeader: blockParts.Header()}
proposal = types.NewProposal(height, round, polRound, propBlockID, &block.DataAvailabilityHeader)
polRound, propBlockID := validRound, types.BlockID{
Hash: block.Hash(),
PartSetHeader: blockParts.Header(),
DataAvailabilityHeader: &block.DataAvailabilityHeader,
}
proposal = types.NewProposal(height, round, polRound, propBlockID)
p, err := proposal.ToProto()
if err != nil {
panic(err)
Expand All @@ -224,11 +224,10 @@ func addVotes(to *State, votes ...*types.Vote) {
func signAddVotes(
to *State,
voteType tmproto.SignedMsgType,
hash []byte,
header types.PartSetHeader,
blockID types.BlockID,
vss ...*validatorStub,
) {
votes := signVotes(voteType, hash, header, vss...)
votes := signVotes(voteType, blockID, vss...)
addVotes(to, votes...)
}

Expand Down
Loading