Skip to content

Commit

Permalink
Clean up code and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mininny committed Sep 26, 2024
1 parent e8692c5 commit 0caad5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 96 deletions.
74 changes: 0 additions & 74 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,80 +106,6 @@ jobs:
- "packages/contracts-bedrock/deployments/devnetL1"
- ".devnet"

pnpm-monorepo:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge
steps:
- checkout
- run:
name: Fetch submodules for asterisc
# This will also fetch monorepo's submodule.
# Therefore we do not have to call `make submodules` at monorepo root
command: git submodule update --init --recursive
- run:
name: Check L1 geth version
command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false)
working_directory: rvsol/lib/optimism
- restore_cache:
name: Restore PNPM Package Cache
keys:
- pnpm-packages-v2-{{ checksum "rvsol/lib/optimism/pnpm-lock.yaml" }}
- restore_cache:
name: Restore Go modules cache for monorepo
# this go mod cache will be populated from go-mod-download-monorepo step
key: gomod-{{ checksum "rvsol/lib/optimism/go.sum" }}
# Fetch node_modules into the pnpm store
# This will cache node_modules based on pnpm-lock so other steps can instantly install them with `pnpm install --prefer-offline`
# --prefer-offline installs node_modules instantly by just reading from cache if it exists rather than fetching from network
# when installing node_modules pnpm simply adds symlinks instead of copying the files which is why it is pretty much instant to run --prefer-offline
# this allows a caching strategy of only checking pnpm-lockfile so we don't have to keep it in sync with our packages
# For more information see https://pnpm.io/cli/fetch
- run:
name: Fetch dependencies
command: pnpm fetch --frozen-lockfile --prefer-offline
working_directory: rvsol/lib/optimism
- save_cache:
name: Save PNPM Package Cache
key: pnpm-packages-v2-{{ checksum "rvsol/lib/optimism/pnpm-lock.yaml" }}
paths:
- "rvsol/lib/optimism/node_modules"
- run:
name: Install dependencies
command: pnpm install:ci:offline
working_directory: rvsol/lib/optimism
- run:
name: print forge version
command: forge --version
working_directory: rvsol/lib/optimism
- run:
name: Build monorepo
environment:
FOUNDRY_PROFILE: ci
command: pnpm build
working_directory: rvsol/lib/optimism
- run:
name: Generate allocs
command: make devnet-allocs
working_directory: rvsol/lib/optimism
- persist_to_workspace:
root: rvsol/lib/optimism
paths:
- "packages/**/dist"
- "packages/contracts-bedrock/cache"
- "packages/contracts-bedrock/artifacts"
- "packages/contracts-bedrock/forge-artifacts"
- "packages/contracts-bedrock/tsconfig.tsbuildinfo"
- "packages/contracts-bedrock/tsconfig.build.tsbuildinfo"
- ".devnet/allocs-l1.json"
- ".devnet/allocs-l2-delta.json"
- ".devnet/allocs-l2-ecotone.json"
- ".devnet/allocs-l2-fjord.json"
- ".devnet/allocs-l2-granite.json"
- ".devnet/addresses.json"
- "packages/contracts-bedrock/deploy-config/devnetL1.json"
- "packages/contracts-bedrock/deployments/devnetL1"

go-mod-download-monorepo:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
Expand Down
9 changes: 5 additions & 4 deletions op-e2e/faultproofs/precompile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/ethereum-optimism/asterisc/rvgo/fast"
"github.com/ethereum-optimism/optimism/op-service/ioutil"

"math"
"math/big"
"path/filepath"
"testing"

"github.com/ethereum-optimism/asterisc/op-e2e/e2eutils/challenger"
"github.com/ethereum-optimism/asterisc/op-e2e/e2eutils/disputegame"
"github.com/ethereum-optimism/asterisc/rvgo/fast"
"github.com/ethereum-optimism/optimism/op-challenger/config"
"github.com/ethereum-optimism/optimism/op-challenger/game/fault/trace/utils"
"github.com/ethereum-optimism/optimism/op-challenger/game/fault/trace/vm"
"github.com/ethereum-optimism/optimism/op-challenger/metrics"
op_e2e "github.com/ethereum-optimism/optimism/op-e2e"
op_e2e_challenger "github.com/ethereum-optimism/optimism/op-e2e/e2eutils/challenger"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
op_e2e_faultproofs "github.com/ethereum-optimism/optimism/op-e2e/faultproofs"
"github.com/ethereum-optimism/optimism/op-e2e/system/e2esys"
"github.com/ethereum-optimism/optimism/op-e2e/system/helpers"

"github.com/ethereum-optimism/optimism/op-challenger/metrics"
"github.com/ethereum-optimism/optimism/op-service/ioutil"
"github.com/ethereum-optimism/optimism/op-service/testlog"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
Expand Down
18 changes: 0 additions & 18 deletions rvgo/test/evm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ type Contract struct {
} `json:"deployedBytecode"`
}

//func (c *Contract) SourceMap(sourcePaths []string) (*srcmap.SourceMap, error) {
// return srcmap.ParseSourceMap(sourcePaths, make(map[srcmap.SourceID]string), c.DeployedBytecode.Object, c.DeployedBytecode.SourceMap)
//}

type Contracts struct {
RISCV *Contract
Oracle *Contract
Expand Down Expand Up @@ -136,20 +132,6 @@ func testContracts(t require.TestingT) *Contracts {
}
}

//// nolint:unused
//func addTracer(t *testing.T, env *vm.EVM, addrs *Addresses, contracts *Contracts) {
// //env.Config.Tracer = logger.NewMarkdownLogger(&logger.Config{}, os.Stdout)
//
// a, err := contracts.RISCV.SourceMap([]string{"../../rvsol/src/RISCV.sol"})
// require.NoError(t, err)
// b, err := contracts.Oracle.SourceMap([]string{"../../rvsol/src/PreimageOracle.sol"})
// require.NoError(t, err)
// env.Config.Tracer = srcmap.NewSourceMapTracer(map[common.Address]*srcmap.SourceMap{
// addrs.RISCV: a,
// addrs.Oracle: b,
// }, os.Stdout)
//}

func stepEVM(t *testing.T, env *vm.EVM, wit *fast.StepWitness, addrs *Addresses, step uint64, revertCode []byte) (postState []byte, postHash common.Hash, gasUsed uint64) {
startingGas := uint64(30_000_000)

Expand Down

0 comments on commit 0caad5b

Please sign in to comment.