Skip to content

Commit

Permalink
Merge branch 'main' into evan/nmt-subroot-path-gen
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-forbes authored Aug 17, 2022
2 parents fb65861 + a5877a4 commit 65928ed
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ build
coverage.txt
tools-stamp
.vscode
profile.out
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ benchmark:
@go test -mod=readonly -bench=. ./...

test-cover:
@export VERSION=$(VERSION); bash -x contrib/test_cover.sh
@export VERSION=$(VERSION); bash -x scripts/test_cover.sh
.PHONY: test-cover
16 changes: 13 additions & 3 deletions app/process_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) abci.ResponsePr
rejectedPropBlockLog,
"reason",
"varying number of messages and payForData txs in the same block",
"proposerAddress",
req.Header.ProposerAddress,
)
return abci.ResponseProcessProposal{
Result: abci.ResponseProcessProposal_REJECT,
Expand All @@ -70,6 +72,8 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) abci.ResponsePr
"found a message that uses an invalid namespace id",
"error",
err.Error(),
"proposerAddress",
req.Header.ProposerAddress,
)
return abci.ResponseProcessProposal{
Result: abci.ResponseProcessProposal_REJECT,
Expand All @@ -84,6 +88,8 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) abci.ResponsePr
"failure to create commitment for included message",
"error",
err.Error(),
"proposerAddress",
req.Header.ProposerAddress,
)
return abci.ResponseProcessProposal{
Result: abci.ResponseProcessProposal_REJECT,
Expand All @@ -92,7 +98,7 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) abci.ResponsePr

// TODO: refactor to actually check for subtree roots instead of simply inclusion see issues #382 and #383
if _, has := commitments[string(commit)]; !has {
app.Logger().Info(rejectedPropBlockLog, "reason", "missing MsgPayForData for included message")
app.Logger().Error(rejectedPropBlockLog, "reason", "missing MsgPayForData for included message", "proposerAddress", req.Header.ProposerAddress)
return abci.ResponseProcessProposal{
Result: abci.ResponseProcessProposal_REJECT,
}
Expand All @@ -101,7 +107,7 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) abci.ResponsePr

data, err := coretypes.DataFromProto(req.BlockData)
if err != nil {
app.Logger().Error(rejectedPropBlockLog, "reason", "failure to unmarshal block data:", "error", err)
app.Logger().Error(rejectedPropBlockLog, "reason", "failure to unmarshal block data:", "error", err, "proposerAddress", req.Header.ProposerAddress)
return abci.ResponseProcessProposal{
Result: abci.ResponseProcessProposal_REJECT,
}
Expand All @@ -116,7 +122,7 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) abci.ResponsePr

shares, _, err := data.ComputeShares(req.BlockData.OriginalSquareSize)
if err != nil {
app.Logger().Error(rejectedPropBlockLog, "reason", "failure to compute shares from block data:", "error", err)
app.Logger().Error(rejectedPropBlockLog, "reason", "failure to compute shares from block data:", "error", err, "proposerAddress", req.Header.ProposerAddress)
return abci.ResponseProcessProposal{
Result: abci.ResponseProcessProposal_REJECT,
}
Expand All @@ -130,6 +136,8 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) abci.ResponsePr
"failure to erasure the data square",
"error",
err,
"proposerAddress",
req.Header.ProposerAddress,
)
return abci.ResponseProcessProposal{
Result: abci.ResponseProcessProposal_REJECT,
Expand All @@ -143,6 +151,8 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) abci.ResponsePr
rejectedPropBlockLog,
"reason",
"proposed data root differs from calculated data root",
"proposerAddress",
req.Header.ProposerAddress,
)
return abci.ResponseProcessProposal{
Result: abci.ResponseProcessProposal_REJECT,
Expand Down
4 changes: 2 additions & 2 deletions contrib/Dockerfile.test → docker/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COPY . .

# Install minimum necessary dependencies, build Cosmos SDK, remove packages
RUN apk add --no-cache $PACKAGES && \
make install
make install

# Final image
FROM alpine:edge
Expand All @@ -27,7 +27,7 @@ WORKDIR /root
# Copy over binaries from the build-env
COPY --from=build-env /go/bin/celestia-appd /usr/bin/celestia-appd

COPY ./contrib/single-node.sh .
COPY ./scripts/single-node.sh .

EXPOSE 26657

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 65928ed

Please sign in to comment.