Skip to content

Conversation

@reecepbcups
Copy link
Member

@reecepbcups reecepbcups commented Aug 2, 2024

gordian-engine/gordian#6

Gordian Simapp Dockerfile

# spawn new chain, with gordian, then:

FROM golang:1.22-alpine AS go-builder

# cp -r /home/reece/Desktop/Programming/Go/gordian/gcosmos/_cosmosvendor/cosmos-sdk .
# cp -r /home/reece/Desktop/Programming/Go/gordian .
# docker build . -t myproject:local

SHELL ["/bin/sh", "-ecuxo", "pipefail"]

RUN apk add --no-cache ca-certificates build-base git

WORKDIR /code

RUN mkdir -p /home/reece/Desktop/Programming/Go/gordian/gcosmos/_cosmosvendor/cosmos-sdk
COPY gordian /home/reece/Desktop/Programming/Go/gordian
COPY cosmos-sdk /home/reece/Desktop/Programming/Go/gordian/gcosmos/_cosmosvendor/cosmos-sdk

ADD go.mod go.sum ./
RUN set -eux; \
    export ARCH=$(uname -m); \
    WASM_VERSION=$(go list -m all | grep github.com/CosmWasm/wasmvm || true); \
    if [ ! -z "${WASM_VERSION}" ]; then \
      WASMVM_REPO=$(echo $WASM_VERSION | awk '{print $1}');\
      WASMVM_VERS=$(echo $WASM_VERSION | awk '{print $2}');\
      wget -O /lib/libwasmvm_muslc.a https://${WASMVM_REPO}/releases/download/${WASMVM_VERS}/libwasmvm_muslc.$(uname -m).a;\
    fi; \
    go mod download;

# Copy over code
COPY . /code



# force it to use static lib (from above) not standard libgo_cosmwasm.so file
# then log output of file /code/bin/appd
# then ensure static linking
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \
  && file /code/build/appd \
  && echo "Ensuring binary is statically linked ..." \
  && (file /code/build/appd | grep "statically linked")

# --------------------------------------------------------
FROM alpine:3.16

COPY --from=go-builder /code/build/appd /usr/bin/appd

# Install dependencies used for Starship
RUN apk add --no-cache curl make bash jq sed

WORKDIR /opt

# rest server, tendermint p2p, tendermint rpc
EXPOSE 1317 26656 26657

CMD ["/usr/bin/appd", "version"]

Comment on lines 56 to 74
cmd = NewRootCmdWithServer(func(cc client.Context) serverv2.ServerComponent[transaction.Tx] {
dc := server.NewDefaultContext()

var ctx context.Context = context.Background()
ctx = context.WithValue(ctx, client.ClientContextKey, client.Context{
ChainID: "gcosmos",
HomeDir: "/home/reece/.simappv2",
})
// ctx = context.WithValue(ctx, server.ServerContextKey, server.NewDefaultContext())

log := slog.New(slog.NewJSONHandler(os.Stdout, nil))

codec := gtx.NewTxDecoder(cc.TxConfig)
c, err := gserver.NewComponent(ctx, dc, log, codec, cc.Codec)
if err != nil {
panic(err)
}
return c
})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ref

* old simapp file movement

* simapp v2 -> simapp

* base v2 copy paste over

* archive

* proper embeding and namespace

* remote ict in cfg

* rm ignite

* misc

* working: just get a standard namespace to launch with gordian

* working with gordian / cometbft selector

* simplify selectors into priv methods

* helper

* embed *.*

* todo

* fix: latest gordian changes
@reecepbcups reecepbcups changed the title feat(v0.52): gordian integration feat(v0.52): SDK v0.52 + gordian integration Aug 9, 2024
@reecepbcups
Copy link
Member Author

reecepbcups commented Aug 14, 2024

built off Gordian 4e8efad6985ed80402d0cd807d286c80d8d2f91e for now

@reecepbcups
Copy link
Member Author

I probably need to just redo this from scratch for a standard SDK v52 base template, with the cleanup from here. Then add Gordian in another PR which stays synced to tip

bc v0.52 b unmanageable

@reecepbcups
Copy link
Member Author

With https://github.com/gordian-engine now public, this needs a re-integration using the upstream gordian-core

@reecepbcups
Copy link
Member Author

v0.52 is ded

@reecepbcups reecepbcups deleted the reece/gordian-integration branch July 31, 2025 04:01
@reecepbcups reecepbcups restored the reece/gordian-integration branch July 31, 2025 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants