Skip to content

Commit

Permalink
feat: pass chain-id in prepareProposal
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-forbes committed Jul 4, 2023
1 parent f5f063c commit c770402
Show file tree
Hide file tree
Showing 8 changed files with 256 additions and 204 deletions.
428 changes: 240 additions & 188 deletions abci/types/types.pb.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions proto/tendermint/abci/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ message RequestPrepareProposal {
tendermint.types.Data block_data = 1;
// If an application decides to populate block_data with extra information, they can not exceed this value.
int64 block_data_size = 2;
// proposal_header is the header from the proposal
string chain_id = 3;
}

message RequestProcessProposal {
Expand Down
1 change: 0 additions & 1 deletion proto/tendermint/crypto/keys.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion proto/tendermint/mempool/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion proto/tendermint/p2p/conn.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion proto/tendermint/statesync/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions proto/tendermint/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,22 @@ message Data {
// field number 4 is reserved for blobs

// SquareSize is the number of rows or columns in the original data square.
uint64 square_size = 5;
uint64 square_size = 5;

// Hash is the root of a binary Merkle tree where the leaves of the tree are
// the row and column roots of an extended data square. Hash is often referred
// to as the "data root".
bytes hash = 6;
bytes hash = 6;
}

// Blob (named after binary large object) is a chunk of data submitted by a user
// to be published to the Celestia blockchain. The data of a Blob is published
// to a namespace and is encoded into shares based on the format specified by
// share_version.
message Blob {
bytes namespace_id = 1;
bytes data = 2;
uint32 share_version = 3;
bytes namespace_id = 1;
bytes data = 2;
uint32 share_version = 3;
uint32 namespace_version = 4;
}

Expand Down Expand Up @@ -211,17 +211,17 @@ message BlobTx {
// ShareProof is an NMT proof that a set of shares exist in a set of rows and a
// Merkle proof that those rows exist in a Merkle tree with a given data root.
message ShareProof {
repeated bytes data = 1;
repeated NMTProof share_proofs = 2;
bytes namespace_id = 3;
RowProof row_proof = 4;
uint32 namespace_version = 5;
repeated bytes data = 1;
repeated NMTProof share_proofs = 2;
bytes namespace_id = 3;
RowProof row_proof = 4;
uint32 namespace_version = 5;
}

// RowProof is a Merkle proof that a set of rows exist in a Merkle tree with a
// given data root.
message RowProof {
repeated bytes row_roots = 1;
repeated bytes row_roots = 1;
repeated tendermint.crypto.Proof proofs = 2;
bytes root = 3;
uint32 start_row = 4;
Expand Down
4 changes: 3 additions & 1 deletion state/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
preparedProposal, err := blockExec.proxyApp.PrepareProposalSync(
abci.RequestPrepareProposal{
BlockData: &cmtproto.Data{Txs: txs.ToSliceOfBytes()},
BlockDataSize: maxDataBytes},
BlockDataSize: maxDataBytes,
ChainId: state.ChainID,
},
)
if err != nil {
// The App MUST ensure that only valid (and hence 'processable') transactions
Expand Down

0 comments on commit c770402

Please sign in to comment.