Skip to content

Commit

Permalink
Backport: arm64 docker container (#1709), exchange keeper tests and f…
Browse files Browse the repository at this point in the history
…ixes (#1713) and some readme updates (#1722, #1725) (#1727)

* Add arm64 to docker publish workflow (#1709)

* add arm64 to docker publish workflow

* add comments back to file

* Add changelog entry

* temp add of my branch

* remove test

* second attempt

* remove test

* add a fix and temp publish docker from branch

* better logic

* try setting arg another way

* remove ARCH arg from build, use uname from container to copy over correct wasm file

* remove temp wasm files

* Add arch check and error message for clarity

* remove custom branch from workflow

* test build platform

* remove cleveldb, check build archs

* remove branch

* Add Acknowledgement section to Oracle README. (#1722)

* Add Acknowledgement section.

* Add missing link.

---------

Co-authored-by: Ira Miller <72319+iramiller@users.noreply.github.com>

* Updates to readme from marketing (#1725)

* Dwedul/1699 exchange keeper tests (#1713)

* [1699]: Unit tests on params.

* [1699]: Unit tests on the flat fee getters.

* [1699]: Unit tests on the ratio fee getters and calculators.

* [1699]: Unit tests on the flat fee validators.

* [1699]: Unit tests on ValidateAskPrice.

* [1699]: Change TestSuite.ratio to use ParseFeeRatio.

* [1699]: Unit tests on ValidateBuyerSettlementFee.

* [1699]: Unit tests on UpdateFees.

* [1699]: Create Keeper.IsMarketKnown and tweak the comments on IsMarketActive.

* [1699]: Unit tests on IsMarketKnown and IsMarketActive.

* [1699]: Unit tests on UpdateMarketActive.

* [1699]: Unit tests 0on IsUserSettlementAllowed and UpdateUserSettlementAllowed.

* [1699]: Unit tests on HasPermission and each of the specific Can... permission checkers.

* [1699]: Fix getAccessGrants.

* [1699]: Unit tests on GetUserPermissions and GetAccessGrants.

* [1699]: Unit tests on UpdatePermissions.

* [1699]: Unit tests on GetReqAttrsAsk, GetReqAttrsBid, CanCreateAsk, and CanCreateBid.

* [1699]: Make NewEventMarketPermissionsUpdated just take in the admin as a string since that's what we've got it as when we want to create that event.

* [1699]: Make NewEventMarketReqAttrUpdated just take in the admin as a string since that's what we've got it as when we want to create that event.

* [1699]: Unit tests on UpdateReqAttrs.

* [1699]: Unit tests on GetMarketAccount.

* [1699]: Unit tests on GetMarketDetails.

* [1699]: Remove 'Calls' from the field names of the mock keeper ...Calls structs.

* [1699]: Update NewEventMarketDetailsUpdated to take in a string since that's what we've already got it as everywhere.

* [1699]: Update NewEventMarketActiveUpdated, NewEventMarketEnabled, and NewEventMarketDisabled to take in an updatedBy string (instead of AccAddress) since that's what we've already got it as anyway.

* [1699]: Change NewEventMarketWithdraw to take in withdrawnBy as a string since we don't need it as an addr anywhere.

* [1699]: Update NewEventMarketUserSettleUpdated, NewEventMarketUserSettleEnabled, and NewEventMarketUserSettleDisabled to take in updatedBy as a string.

* [1699]: Update exchange.NewEventOrderCancelled to take in cancelledBy as a string.

* [1699]: A little cleanup in TestTypedEventToEvent.

* [1699]: Unit tests on UpdateMarketDetails.

* [1699]: Change NewAccountResultsMap to NewAccountModifierMap and have NewAccount modify the provided account directly since that's how that func is used.

* [1699]: Unit tests on CreateMarket.

* [1699]: Unit tests on GetMarket and IterateMarkets.

* [1699]: A little cleanup in TestKeeper_CreateMarket since I have SetAccount update the GetAccount results in the mock account keeper.

* [1699]: Unit tests on GetMarketBrief.

* [1699]: Unit tests on WithdrawMarketFunds.

* [1699]: Unit tests on ValidateMarket.

* [1699]: Clean up the market unit tests by not passing the *TestSuite around needlessly.

* [1699] Unit tests on GetOrder.

* [1699]: Unit tests on GetOrderByExternalID.

* [1699]: Fix setOrderInStore to check the store correctly for an existing external id.

* [1699]: Add IsReqAttrMatch unit test case.

* [1699]: Unit tests on CreateAskOrder and CreateBidOrder.

* [1699]: Unit tests on CancelOrder.

* [1699]: Unit tests on SetOrderExternalID.

* [1699]: In parseOrderStoreKeyValue, include the failed order id when it's available.

* [1699]: Unit tests on IterateOrders.

* [1699]: Unit tests on IterateMarketOrders, IterateAddressOrders, and IterateAssetOrders.

* [1699]: In InitGenesis, ensure that the last order id is at least the largest order id, and include the hold error in the returned error.

* [1699]: Unit tests on InitGenesis and ExportGenesis.

* [1699]: Create expEvents using var instead of empty slice since assertEqualEvents doesn't care about nil vs empty. Call assertEqualEvents in TestKeeper_SetOrderExternalID.

* [1699]: Unit tests on FillBids.

* [1699]: Unit tests on FillAsks.

* [1699]: Unit tests on SettleOrders.

* [1699]: Take the stdlibCtx out of the TestSuite and delete the unused int and intStr methods. Replace assertErrorContents with assertErrorContentsf.

* [1699]: In OrderFeeCalc, return an error if the market does not exist.

* [1699]: Unit tests on the OrderFeeCalc query.

* [1699]: In GetOrderByExternalID, return an error if either the market is zero or no external id is given.

* [1699]: Unit tests on GetOrder and GetOrderByExternalID.

* [1699]: Fix the order index queries to properly get the orders.

* [1699]: Modify filteredPaginateAfterOrder with key to return a NextKey that's a hit instead of just the next key the iterator sees. This way, it matches the NextKey behavior when using Offset instead.

* [1699]: In getOrderIterator, for the reverse iterator, the 'start' orderID should be one more than the afterOrderID.

* [1699]: Unit tests on the GetMarketOrders query.

* [1699]: Include the invalid owner in the error from GetOwnerOrders.

* [1699]: Unit tests on the GetOwnerOrders query.

* [1699]: Unit tests on the GetAssetOrders query.

* [1699]: Add a unit test on each of the order iterator queries for a case when the page request is invalid.

* [1699]: Fix GetAllOrders.

* [1699]: Unit tests on GetAllOrders.

* [1699]: Change the querySetupFunc to not take in the context, and just do a swaparoo on the context in the test suite.

* [1699]: Set the address in the QueryGetMarketResponse.

* [1699]: Unit tests on the GetMarket query. Create requireCreateMarketUnmocked and use that everywhere in the query tests.

* [1699]: Unit tests on the GetAllMarkets query.

* [1699]: Unit tests on the Params query.

* [1699]: Unit tests on the ValidateCreateMarket query.

* [1699]: Unit tests on the ValidateMarket query.

* [1699]: Unit tests on the ValidateManageFees query.

* [1699]: Remove todo about discussing the DefaultDefaultSplit value. Best consensus was that 5% seems alright until we know better.

* [1699]: Comment change on the querySetupFunc definition.

* [1699]: Unit tests on the CreateAsk and CreateBid endpoints.

* [1699]: Unit tests on the CancelOrder endpoint.

* [1699]: change IsMarketActive to only return true if the market is both known and active.

* [1699]: Add saffron-rc2 no-op upgrade entry.

* [1699]: In FillBids, calculate the seller settlement ratio fee off the total price instead of each order individually.

* [1699]: Unit tests on FillBids. Extract the balance checking stuff so it's easier for several tests to use.

* [1699]: Unit tests on FillAsks.

* [1699]: Unit tests on the MarketSettle endpoint.

* [1699]: Fix error message from MarketSetOrderExternalID when admin doesn't have permission since they might not actually be uuids.

* [1699]: Unit tests on the MarketSetOrderExternalID endpoint.

* [1699] Unit tests on the MarketWithdraw endpoint.

* [1699]: Unit tests on the MarketUpdateDetails endpoint. Replace uses of requireCreateMarket in the msg_server_test file (with requireCreateMarketUnmocked).

* [1699]: Unit tests on the MarketUpdateEnabled and MarketUpdateUserSettle endpoints.

* [1699]: Unit tests on the MarketManagePermissions and MarketManageReqAttrs endpoints.

* [1699]: Unit tests on the GovCreateMarket, GovManageFees, and GovUpdateParams endpoints. All done with tests.

* [1699]: Mark v1.17.0-rc1 in the changelog.

* [1699]: Add changelog entry.

* [1699]: clean up some of the expected event creation stuff.

* [1699]: Move all the generic keeper test helper funcs to a new suite_test.go file as well as the TestSuite definition. Do a little cleanup to use those in a few places where it made sense.

* [1699]: Remove some unneeded things from the TestSuite.

* [1699]: Some comment clarifications.

* [1699]: Make TestSuite.badKey for changing a key into a bad version of it for the tests that want an incorrect key entry.

* [1699]: Do some of the market id comparisons as ints for better failure output.

* [1699]: Refactor grpc_query_test to be similar to msg_server_test with the typed test definitions and test cases.

* [1699]: Add some test cases to the ValidateManageFees query where everything in the msg is okay, but results in a bad market setup.

* [1699]: Underscore some unused followup func arguments in msg_server_test.

* [1699]: Create agCanOnly, agCanAllBut, and agCanEverything and use them in severl test cases where similar stuff was being done the hard way.

* [1699]: Clean up some of the follow-up args type defs.

* Mark v1.17.0-rc2 in the changelog and release notes.

* Undo the marking of v1.17.0-rc2 since we might have other stuff come in for it.

* Move the 1634 changelog entry up in the unlreleased section where it should be for now.

---------

Co-authored-by: Carlton Hanna <nullpointer0x00@gmail.com>
Co-authored-by: Matt Witkowski <mwitkowski@provenance.io>
Co-authored-by: Ira Miller <72319+iramiller@users.noreply.github.com>
Co-authored-by: AJ Webb <webbushka@gmail.com>
  • Loading branch information
5 people authored Nov 3, 2023
1 parent 5edcbb2 commit f84a50f
Show file tree
Hide file tree
Showing 31 changed files with 20,731 additions and 558 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5

# Set concurrency for this workflow to cancel in-progress jobs if retriggered.
# The github.ref is only available when triggered by a PR so fall back to github.run_id for other cases.
# The github.run_id is unique for each run, giving each such invocation it's own unique concurrency group.
Expand All @@ -17,21 +17,23 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Go mod vendor
run: |
go mod vendor
- name: Prepare
id: prep
run: |
Expand All @@ -56,24 +58,28 @@ jobs:
created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
echo "Setting output: created=$created"
echo "created=$created" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Publish to Docker Hub
uses: docker/build-push-action@v5
with:
context: .
target: run
build-args: |
VERSION=${{ steps.prep.outputs.version }}
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
file: docker/blockchain/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,27 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

* nothing
### Features

* Add the `saffron-rc2` upgrade and update `saffron` to create denom metadata for IBC markers [#1728](https://github.com/provenance-io/provenance/issues/1728).

### Improvements

* Wrote unit tests on the keeper methods [#1699](https://github.com/provenance-io/provenance/issues/1699).
* During `FillBids`, the seller settlement fee is now calculated on the total price instead of each order individually [#1699](https://github.com/provenance-io/provenance/issues/1699).
* In the `OrderFeeCalc` query, ensure the market exists [#1699](https://github.com/provenance-io/provenance/issues/1699).
* Add publishing of docker arm64 container builds [#1634](https://github.com/provenance-io/provenance/issues/1634)

### Bug Fixes

* During `InitGenesis`, ensure LastOrderId is at least the largest order id [#1699](https://github.com/provenance-io/provenance/issues/1699).
* Properly populate the permissions lists when reading access grants from state [#1699](https://github.com/provenance-io/provenance/issues/1699).
* Fixed the paginated order queries to properly look up orders [#1699](https://github.com/provenance-io/provenance/issues/1699).

### Full Commit History

* https://github.com/provenance-io/provenance/compare/v1.17.0-rc1...v1.17.0-rc2
* https://github.com/provenance-io/provenance/compare/v1.16.0...v1.17.0-rc2

---

Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,8 @@ vendor:

# Full build inside a docker container for a clean release build
docker-build: vendor
ifeq ($(UNAME_M),x86_64)
docker build --build-arg VERSION=$(VERSION) --build-arg ARCH=$(UNAME_M) -t provenance-io/blockchain . -f docker/blockchain/Dockerfile
else
docker build --build-arg VERSION=$(VERSION) --build-arg ARCH=aarch64 -t provenance-io/blockchain . -f docker/blockchain/Dockerfile
endif
docker build --build-arg VERSION=$(VERSION) -t provenance-io/blockchain . -f docker/blockchain/Dockerfile


# Quick build using local environment and go platform target options.
docker-build-local: vendor
Expand Down
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@

# Provenance Blockchain

[Provenance] is a distributed, proof of stake blockchain designed for the financial services industry.
[Provenance Blockchain][provenance] is an eco-friendly proof-of-stake (PoS) blockchain purpose built to modernize financial services, and the Provenance app is the core application for running a node in the network.

For more information about [Provenance Inc](https://provenance.io) visit https://provenance.io
Provenance Blockchain is open-source with purpose-built capabilities leveraging the [CometBFT](https://docs.cometbft.com) (formerly Tendermint) consensus engine and [Cosmos SDK][cosmos]. Combined, this complete financial services infrastructure makes it safer, easier, cheaper, and faster to build and manage financial products and services.


The Provenance app is the core blockchain application for running a node on the Provenance Network. The node
software is based on the open source [Tendermint](https://tendermint.com) consensus engine combined with the
[Cosmos SDK](https://cosmos.network) and custom modules to support apis for financial services. [Figure](https://figure.com)
is the first and primary user of the Provenance Blockchain.
For more information on the many TradFi institutions and Fintechs leveraging the Provenance Blockchain ecosystem, and to learn more about the Provenance Blockchain Foundation, visit [https://provenance.io][provenance].

## Status

Expand All @@ -24,7 +20,6 @@ is the first and primary user of the Provenance Blockchain.
[![LOC][loc-badge]][loc-report]
![Lint Status][lint-badge]


[license-badge]: https://img.shields.io/github/license/provenance-io/provenance.svg
[license-url]: https://github.com/provenance-io/provenance/blob/main/LICENSE
[release-badge]: https://img.shields.io/github/tag/provenance-io/provenance.svg
Expand All @@ -36,14 +31,12 @@ is the first and primary user of the Provenance Blockchain.
[loc-badge]: https://tokei.rs/b1/github/provenance-io/provenance
[loc-report]: https://github.com/provenance-io/provenance
[lint-badge]: https://github.com/provenance-io/provenance/workflows/Lint/badge.svg
[provenance]: https://provenance.io/#overview

The Provenance networks are based on work from the private [Figure Technologies](https://figure.com) blockchain launched in 2018.
[provenance]: https://provenance.io/
[cosmos]: https://cosmos.network/

## Quick Start

The Provenance Blockchain is based on Cosmos, the [sdk introduction](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/intro/00-overview.md)
is a useful starting point.
As the [Provenance Blockchain][provenance] and its core modules are based on the [Cosmos SDK][cosmos], [this introduction](https://docs.cosmos.network/main/learn/intro/overview) into Cosmos is a useful starting point.

Developers can use a local checkout and the make targets `make run` and `make localnet-start` to run a local development network.

Expand Down
56 changes: 56 additions & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app

import (
"fmt"
"strings"

icqtypes "github.com/strangelove-ventures/async-icq/v6/types"

Expand All @@ -11,15 +12,18 @@ import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"

attributekeeper "github.com/provenance-io/provenance/x/attribute/keeper"
attributetypes "github.com/provenance-io/provenance/x/attribute/types"
"github.com/provenance-io/provenance/x/exchange"
"github.com/provenance-io/provenance/x/hold"
ibchookstypes "github.com/provenance-io/provenance/x/ibchooks/types"
"github.com/provenance-io/provenance/x/marker/types"
msgfeetypes "github.com/provenance-io/provenance/x/msgfees/types"
oracletypes "github.com/provenance-io/provenance/x/oracle/types"
triggertypes "github.com/provenance-io/provenance/x/trigger/types"
Expand Down Expand Up @@ -120,6 +124,19 @@ var upgrades = map[string]appUpgrade{
},
Added: []string{icqtypes.ModuleName, oracletypes.ModuleName, ibchookstypes.StoreKey, hold.ModuleName, exchange.ModuleName},
},
"saffron-rc2": { // upgrade for v1.17.0-rc2
Handler: func(ctx sdk.Context, app *App, vm module.VersionMap) (module.VersionMap, error) {
var err error
vm, err = runModuleMigrations(ctx, app, vm)
if err != nil {
return nil, err
}

updateIbcMarkerDenomMetadata(ctx, app)

return vm, nil
},
},
"saffron": { // upgrade for v1.17.0,
Handler: func(ctx sdk.Context, app *App, vm module.VersionMap) (module.VersionMap, error) {
var err error
Expand All @@ -135,6 +152,7 @@ var upgrades = map[string]appUpgrade{
setupICQ(ctx, app)
updateMaxSupply(ctx, app)
setExchangeParams(ctx, app)
updateIbcMarkerDenomMetadata(ctx, app)

return vm, nil
},
Expand Down Expand Up @@ -360,3 +378,41 @@ func setExchangeParams(ctx sdk.Context, app *App) {
}
ctx.Logger().Info("Done ensuring exchange module params are set.")
}

// updateIbcMarkerDenomMetadata iterates markers and creates denom metadata for ibc markers
// TODO: Remove with the saffron handlers.
func updateIbcMarkerDenomMetadata(ctx sdk.Context, app *App) {
ctx.Logger().Info("Updating ibc marker denom metadata")
app.MarkerKeeper.IterateMarkers(ctx, func(record types.MarkerAccountI) bool {
if !strings.HasPrefix(record.GetDenom(), "ibc/") {
return false
}

hash, err := transfertypes.ParseHexHash(strings.TrimPrefix(record.GetDenom(), "ibc/"))
if err != nil {
ctx.Logger().Error(fmt.Sprintf("invalid denom trace hash: %s, error: %s", hash.String(), err))
return false
}
denomTrace, found := app.TransferKeeper.GetDenomTrace(ctx, hash)
if !found {
ctx.Logger().Error(fmt.Sprintf("trace not found: %s, error: %s", hash.String(), err))
return false
}

parts := strings.Split(denomTrace.Path, "/")
if len(parts) == 2 && parts[0] == "transfer" {
ctx.Logger().Info(fmt.Sprintf("Adding metadata to %s", record.GetDenom()))
chainID := app.Ics20MarkerHooks.GetChainID(ctx, parts[0], parts[1], app.IBCKeeper)
markerMetadata := banktypes.Metadata{
Base: record.GetDenom(),
Name: chainID + "/" + denomTrace.BaseDenom,
Display: chainID + "/" + denomTrace.BaseDenom,
Description: denomTrace.BaseDenom + " from " + chainID,
}
app.BankKeeper.SetDenomMetaData(ctx, markerMetadata)
}

return false
})
ctx.Logger().Info("Done updating ibc marker denom metadata")
}
14 changes: 14 additions & 0 deletions app/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,18 @@ func (s *UpgradeTestSuite) TestSaffronRC1() {
s.AssertUpgradeHandlerLogs("saffron-rc1", expInLog, nil)
}

func (s *UpgradeTestSuite) TestSaffronRC2() {
// Each part is (hopefully) tested thoroughly on its own.
// So for this test, just make sure there's log entries for each part being done.

expInLog := []string{
"INF Updating ibc marker denom metadata",
"INF Done updating ibc marker denom metadata",
}

s.AssertUpgradeHandlerLogs("saffron-rc2", expInLog, nil)
}

func (s *UpgradeTestSuite) TestSaffron() {
// Each part is (hopefully) tested thoroughly on its own.
// So for this test, just make sure there's log entries for each part being done.
Expand All @@ -445,6 +457,8 @@ func (s *UpgradeTestSuite) TestSaffron() {
"INF Updating MaxSupply marker param",
"INF Done updating MaxSupply marker param",
"INF Ensuring exchange module params are set.",
"INF Updating ibc marker denom metadata",
"INF Done updating ibc marker denom metadata",
}

s.AssertUpgradeHandlerLogs("saffron", expInLog, nil)
Expand Down
21 changes: 17 additions & 4 deletions docker/blockchain/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM golang:1.20-bullseye as build
ARG VERSION
ARG ARCH=x86_64

WORKDIR /go/src/github.com/provenance-io/provenance

Expand All @@ -23,21 +22,35 @@ COPY Makefile sims.mk ./

# Build and install provenanced
ENV VERSION=$VERSION
RUN make VERSION=${VERSION} WITH_CLEVELDB=true install
RUN ARCH=$(uname -m) && \
if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "aarch64" ]; then \
echo "Unsupported architecture (required: x86_64 or aarch64): $ARCH"; \
exit 1; \
fi && \
echo "Building and installing provenance for Arch: $ARCH"; \
make VERSION=${VERSION} install

###
FROM debian:bullseye-slim as run
ARG ARCH=x86_64
ENV LD_LIBRARY_PATH="/usr/local/lib"
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y curl jq libleveldb-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/


COPY --from=build /go/src/github.com/provenance-io/provenance/vendor/github.com/CosmWasm/wasmvm/internal/api/libwasmvm.$ARCH.so /usr/local/lib
COPY --from=build /go/src/github.com/provenance-io/provenance/vendor/github.com/CosmWasm/wasmvm/internal/api/libwasmvm.*.so /tmp
COPY --from=build /go/bin/provenanced /usr/bin/provenanced

RUN ARCH=$(uname -m) && \
if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "aarch64" ]; then \
echo "Unsupported architecture (required: x86_64 or aarch64): $ARCH"; \
exit 1; \
fi && \
cp /tmp/libwasmvm.$ARCH.so /usr/local/lib/. && \
rm /tmp/libwasmvm.*.so

ENV PIO_HOME=/home/provenance
WORKDIR /home/provenance

Expand Down
Loading

0 comments on commit f84a50f

Please sign in to comment.