Skip to content

Commit

Permalink
Merge pull request #74 from informalsystems/main
Browse files Browse the repository at this point in the history
Update v0.38.x branch to current status of main
  • Loading branch information
p-offtermatt authored Oct 10, 2023
2 parents ec93723 + c8f55fe commit ea28546
Show file tree
Hide file tree
Showing 24 changed files with 1,989 additions and 559 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ on:
schedule:
- cron: '38 20 * * *'
push:
branches: [ "main", "v0.37.x", "v0.34.x" ]
branches: [ "main", "v0.38.x", "v0.37.x", "v0.34.x" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main", "v0.37.x", "v0.34.x" ]
branches: [ "main", "v0.38.x", "v0.37.x", "v0.34.x" ]

env:
# Use docker.io for Docker Hub if empty
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Automated Tests
on:
push:
branches:
- main
- v0.38.x
- v0.37.x
- v0.34.x
pull_request:
branches:
- main
- v0.38.x
- v0.37.x
- v0.34.x
jobs:
Automated_Tests:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Make test
run: make test-docker
8 changes: 8 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ defaults:
- "{{ author }}"

pull_request_rules:
- name: Backport patches to the v0.38.x branch
conditions:
- base=main
- label=A:backport/v0.38.x
actions:
backport:
branches:
- v0.38.x
- name: Backport patches to the v0.37.x branch
conditions:
- base=main
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-alpine
FROM golang:1.21-alpine

ENV PACKAGES curl make git libc-dev bash gcc linux-headers
RUN apk add --no-cache $PACKAGES
Expand Down
26 changes: 26 additions & 0 deletions Dockerfile-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# import simd from ibc-go
FROM ghcr.io/cosmos/simapp:0.50.0-rc.1 AS simapp-builder

FROM golang:1.21-alpine as cometmock-builder

ENV PACKAGES curl make git libc-dev bash gcc linux-headers
RUN apk add --no-cache $PACKAGES

ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOFLAGS="-buildvcs=false"

# cache gomodules for cometmock
ADD ./go.mod /go.mod
ADD ./go.sum /go.sum
RUN go mod download

# Add CometMock and install it
ADD . /CometMock
WORKDIR /CometMock
RUN go build -o /usr/local/bin/cometmock ./cometmock

RUN apk update
RUN apk add --no-cache which iputils procps-ng tmux net-tools htop jq gcompat

COPY --from=simapp-builder /usr/bin/simd /usr/local/bin/simd
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
install:
go install ./cometmock
go install ./cometmock

test-locally:
go test -timeout 600s ./e2e-tests -test.v

test-docker:
# Build the Docker image
docker build -f Dockerfile-test -t cometmock-test .

# Start a container and execute the test command inside
docker rm cometmock-test-instance || true
docker run --name cometmock-test-instance --workdir /CometMock cometmock-test go test -timeout 600s ./e2e-tests -test.v
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ controlling which validators sign blocks,

On a technical level, CometMock communicates with applications via ABCI through GRPC or TSP (Tendermint Socket Protocol) calls. It calls BeginBlock, DeliverTx, EndBlock and Commit like CometBFT does during normal execution.

Currently, CometMock maintains releases compatible with CometBFT v0.37 and v0.34, see branches [v0.34.x](https://github.com/informalsystems/CometMock/tree/v0.34.x) and [v0.37.x](https://github.com/informalsystems/CometMock/tree/v0.37.x). It offers *many* of the RPC endpoints offered by Comet (see https://docs.cometbft.com/v0.34/rpc/ and https://docs.cometbft.com/v0.37/rpc/ for the respective version of the interface),
Currently, CometMock maintains releases compatible with CometBFT v0.38, v0.37 and v0.34, see branches [v0.34.x](https://github.com/informalsystems/CometMock/tree/v0.34.x), [v0.37.x](https://github.com/informalsystems/CometMock/tree/v0.37.x) and [v0.38.x](https://github.com/informalsystems/CometMock/tree/v0.38.x). It offers *many* of the RPC endpoints offered by Comet (see https://docs.cometbft.com/v0.34/rpc/, https://docs.cometbft.com/v0.37/rpc/ and https://docs.cometbft.com/v0.38/rpc/ for the respective version of the interface),
in particular it supports the subset used by Gorelayer (https://github.com/cosmos/relayer/).
See the endpoints offered here: [https://github.com/informalsystems/CometMock/cometmock/rpc_server/routes.go#L30C2-L53](https://github.com/informalsystems/CometMock/blob/main/cometmock/rpc_server/routes.go)

Expand Down
Loading

0 comments on commit ea28546

Please sign in to comment.