Skip to content

Commit

Permalink
Merge pull request #460 from oasisprotocol/ptrus/feature/bump-oasis-core
Browse files Browse the repository at this point in the history
Update Oasis Core to 23.0.1
  • Loading branch information
ptrus authored Oct 20, 2023
2 parents daa18e5 + f300a1a commit 62dd6e1
Show file tree
Hide file tree
Showing 41 changed files with 1,028 additions and 588 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
ports:
- 5432:5432
env:
OASIS_CORE_VERSION: "22.2.11"
OASIS_CORE_VERSION: "23.0.1"
OASIS_NODE: ${{ github.workspace }}/oasis_core/oasis-node
OASIS_NET_RUNNER: ${{ github.workspace }}/oasis_core/oasis-net-runner
SAPPHIRE_PARATIME_VERSION: 0.6.4
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20.x"
go-version: "1.21.x"

- name: Install prerequisites
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.21.1"
- name: Install gitlint
run: |
python -m pip install gitlint
Expand All @@ -50,6 +50,6 @@ jobs:
- name: Lint Go
uses: golangci/golangci-lint-action@v3
with:
version: v1.50.1
version: v1.54.2
# Always run this step so that all linting errors can be seen at once.
if: always()
18 changes: 11 additions & 7 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
ports:
- 5432:5432
env:
OASIS_CORE_VERSION: "22.2.11"
OASIS_CORE_VERSION: "23.0.1"
OASIS_NODE: ${{ github.workspace }}/oasis_core/oasis-node
OASIS_NET_RUNNER: ${{ github.workspace }}/oasis_core/oasis-net-runner
EMERALD_PARATIME_VERSION: 10.0.0
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20.x"
go-version: "1.21.x"

- name: Install prerequisites
run: |
Expand Down Expand Up @@ -85,7 +85,9 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: oasis-node-logs
path: ${{ env.OASIS_NODE_DATADIR }}/**/*.log
path: |
${{ env.OASIS_NODE_DATADIR }}/**/*.log
${{ env.OASIS_NODE_DATADIR }}/fixture.json
- name: Upload to codecov.io
uses: codecov/codecov-action@v3.1.4
Expand All @@ -104,14 +106,14 @@ jobs:
ports:
- 5432:5432
env:
OASIS_CORE_VERSION: "22.2.11"
OASIS_CORE_VERSION: "23.0.1"
OASIS_NODE: ${{ github.workspace }}/oasis_core/oasis-node
OASIS_NET_RUNNER: ${{ github.workspace }}/oasis_core/oasis-net-runner
SAPPHIRE_PARATIME_VERSION: 0.6.4
GATEWAY__CHAIN_ID: 23293
GATEWAY__OASIS_RPCS: true
SAPPHIRE_PARATIME: ${{ github.workspace }}/oasis_core/sapphire-paratime
KEYMANAGER_ARTIFACT_URL: https://buildkite.com/organizations/oasisprotocol/pipelines/oasis-core-ci/builds/11152/jobs/0187e593-7d24-4821-890d-d8b4ffe4966b/artifacts/0187e595-fcc3-4a19-b70d-f42b520e03fa # Find this at https://buildkite.com/oasisprotocol/oasis-core-ci/builds?branch=stable%2F<...> under "Build runtimes".
KEYMANAGER_ARTIFACT_URL: https://buildkite.com/organizations/oasisprotocol/pipelines/oasis-core-ci/builds/12039/jobs/018b246a-3e49-4b0e-9d15-a9b7845dce55/artifacts/018b246c-e46c-437d-baa3-9ebd193a676c # Find this at https://buildkite.com/oasisprotocol/oasis-core-ci/builds?branch=stable%2F<...> under "Build runtimes".
KEYMANAGER_BINARY: ${{ github.workspace }}/oasis_core/simple-keymanager
OASIS_NODE_DATADIR: /tmp/eth-runtime-test
steps:
Expand All @@ -121,7 +123,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20.x"
go-version: "1.21.x"

- name: Install prerequisites
run: |
Expand Down Expand Up @@ -161,7 +163,9 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: oasis-node-logs-c10l
path: ${{ env.OASIS_NODE_DATADIR }}/**/*.log
path: |
${{ env.OASIS_NODE_DATADIR }}/**/*.log
${{ env.OASIS_NODE_DATADIR }}/fixture.json
- name: Upload to codecov.io
uses: codecov/codecov-action@v3.1.4
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20.x"
go-version: "1.21.x"

- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
Expand Down
27 changes: 25 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ linters:
- nakedret
- nestif
- noctx
- nolintlint
- prealloc
- rowserrcheck
- staticcheck
Expand All @@ -58,4 +57,28 @@ linters-settings:
check-shadowing: true
goimports:
# Put local imports after 3rd-party packages.
local-prefixes: github.com/oasisprotocol/oasis-web3-gateway
local-prefixes: github.com/oasisprotocol/
gosec:
excludes:
# https://github.com/securego/gosec#available-rules
- G402
- G404
depguard:
rules:
main:
files:
- $all
- "!**/oasis-deposit/*.go"
allow:
- $gostd
- github.com/oasisprotocol
- google.golang.org/grpc
- github.com/ethereum/go-ethereum
- github.com/stretchr/testify
- github.com/uptrace/bun
- github.com/gorilla
- github.com/prometheus
- github.com/fxamacker/
- github.com/knadh/koanf
- github.com/rs/cors
- github.com/spf13/cobra
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test:
fmt:
@$(ECHO) "$(CYAN)*** Running Go formatters...$(OFF)"
@gofumpt -w .
@goimports -w -local github.com/oasisprotocol/oasis-web3-gateway .
@goimports -w -local github.com/oasisprotocol .

# Lint code, commits and documentation.
lint-targets := lint-go lint-go-mod-tidy lint-git
Expand Down
32 changes: 7 additions & 25 deletions benchmarks/cmd/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ import (
cmdCommon "github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/common"
"github.com/oasisprotocol/oasis-core/go/oasis-test-runner/oasis"
registry "github.com/oasisprotocol/oasis-core/go/registry/api"
runtimeRegistry "github.com/oasisprotocol/oasis-core/go/runtime/registry"
"github.com/oasisprotocol/oasis-core/go/runtime/config"
"github.com/oasisprotocol/oasis-core/go/staking/api"
"github.com/oasisprotocol/oasis-core/go/worker/common/p2p"

"github.com/oasisprotocol/oasis-web3-gateway/benchmarks/util/keys"
)
Expand All @@ -41,25 +40,8 @@ func fixture() *oasis.NetworkFixture {
if err := runtimeID.UnmarshalHex(flagRuntimeID); err != nil {
cmdCommon.EarlyLogAndExit(err)
}
computeExtraArgs := []oasis.Argument{
{
Name: p2p.CfgP2PPeerOutboundQueueSize,
Values: []string{"100_000"},
},
{
Name: p2p.CfgP2PValidateQueueSize,
Values: []string{"100_000"},
},
{
Name: p2p.CfgP2PValidateConcurrency,
Values: []string{"100_000"},
},
{
Name: p2p.CfgP2PValidateThrottle,
Values: []string{"100_000"},
},
}

computeExtraArgs := []oasis.Argument{}
version, err := version.FromString(viper.GetString(cfgRuntimeVersion))
if err != nil {
cmdCommon.EarlyLogAndExit(err)
Expand Down Expand Up @@ -97,13 +79,13 @@ func fixture() *oasis.NetworkFixture {
},
},
Runtimes: []int{0},
RuntimeProvisioner: runtimeRegistry.RuntimeProvisionerUnconfined,
RuntimeProvisioner: config.RuntimeProvisionerUnconfined,
},
},
ComputeWorkers: []oasis.ComputeWorkerFixture{
{NodeFixture: oasis.NodeFixture{Name: "compute-0", ExtraArgs: computeExtraArgs}, Entity: 1, Runtimes: []int{0}, RuntimeProvisioner: runtimeRegistry.RuntimeProvisionerUnconfined},
{NodeFixture: oasis.NodeFixture{Name: "compute-1", ExtraArgs: computeExtraArgs}, Entity: 1, Runtimes: []int{0}, RuntimeProvisioner: runtimeRegistry.RuntimeProvisionerUnconfined},
{NodeFixture: oasis.NodeFixture{Name: "compute-2", ExtraArgs: computeExtraArgs}, Entity: 1, Runtimes: []int{0}, RuntimeProvisioner: runtimeRegistry.RuntimeProvisionerUnconfined},
{NodeFixture: oasis.NodeFixture{Name: "compute-0", ExtraArgs: computeExtraArgs}, Entity: 1, Runtimes: []int{0}, RuntimeProvisioner: config.RuntimeProvisionerUnconfined},
{NodeFixture: oasis.NodeFixture{Name: "compute-1", ExtraArgs: computeExtraArgs}, Entity: 1, Runtimes: []int{0}, RuntimeProvisioner: config.RuntimeProvisionerUnconfined},
{NodeFixture: oasis.NodeFixture{Name: "compute-2", ExtraArgs: computeExtraArgs}, Entity: 1, Runtimes: []int{0}, RuntimeProvisioner: config.RuntimeProvisionerUnconfined},
},
Seeds: []oasis.SeedFixture{{}},
Runtimes: []oasis.RuntimeFixture{
Expand Down Expand Up @@ -180,7 +162,7 @@ func stakingGenesis() *api.Genesis {
return &genesis
}

func genesisMain(cmd *cobra.Command, args []string) {
func genesisMain(cmd *cobra.Command, _ []string) {
f := fixture()
f.Network.StakingGenesis = stakingGenesis()
data, err := json.MarshalIndent(f, "", " ")
Expand Down
Loading

0 comments on commit 62dd6e1

Please sign in to comment.