From 2fc8cf110c138bdbe887623396834b622679153f Mon Sep 17 00:00:00 2001 From: Pepper Lebeck-Jobe Date: Tue, 12 Nov 2024 09:35:02 +0100 Subject: [PATCH] Add gci to the golangci-lint config This change also runs the gci linter against the repo to give us a "hard reset" on all of the package imports. Editor integrations: https://golangci-lint.run/welcome/integrations/ --- .golangci.yml | 8 ++++ arbcompress/native.go | 1 + arbnode/api.go | 1 + arbnode/dataposter/data_poster.go | 11 ++--- arbnode/dataposter/dataposter_test.go | 6 ++- arbnode/dataposter/dbstorage/storage.go | 1 + .../externalsignertest/externalsignertest.go | 1 + arbnode/dataposter/redis/redisstorage.go | 3 +- arbnode/dataposter/storage/storage.go | 1 + arbnode/dataposter/storage_test.go | 6 ++- arbnode/delayed_seq_reorg_test.go | 1 + arbnode/delayed_sequencer.go | 3 +- arbnode/inbox_reader.go | 3 +- arbnode/inbox_test.go | 17 ++++---- arbnode/inbox_tracker_test.go | 1 + arbnode/maintenance.go | 4 +- arbnode/message_pruner.go | 4 +- arbnode/message_pruner_test.go | 1 + arbnode/node.go | 1 + arbnode/redislock/redis.go | 6 ++- .../resourcemanager/resource_management.go | 3 +- arbnode/sequencer_inbox.go | 2 +- arbnode/sync_monitor.go | 4 +- arbnode/transaction_streamer.go | 3 +- arbos/activate_test.go | 1 + arbos/addressSet/addressSet.go | 1 + arbos/addressSet/addressSet_test.go | 5 ++- arbos/addressTable/addressTable.go | 1 + arbos/addressTable/addressTable_test.go | 1 + arbos/arbosState/arbosstate_test.go | 1 + arbos/arbosState/initialization_test.go | 1 + arbos/arbosState/initialize.go | 6 ++- arbos/arbostypes/messagewithmeta.go | 1 + arbos/block_processor.go | 12 +++--- arbos/blockhash/blockhash.go | 1 + arbos/blockhash/blockhash_test.go | 1 + arbos/burn/burn.go | 1 + arbos/extra_transaction_checks.go | 1 + arbos/incomingmessage_test.go | 1 + arbos/internal_tx.go | 7 ++-- arbos/l1pricing/batchPoster.go | 1 + arbos/l1pricing/batchPoster_test.go | 1 + arbos/l1pricing/l1PricingOldVersions.go | 1 + arbos/l1pricing/l1pricing.go | 14 +++---- arbos/l1pricing/l1pricing_test.go | 1 + arbos/l1pricing_test.go | 11 ++--- arbos/l2pricing/model.go | 1 + arbos/merkleAccumulator/merkleAccumulator.go | 1 + arbos/parse_l2.go | 1 + arbos/programs/api.go | 4 +- arbos/programs/native.go | 2 + arbos/programs/native_api.go | 2 + arbos/programs/params.go | 1 + arbos/programs/programs.go | 1 + arbos/programs/testcompile.go | 1 + arbos/queue_test.go | 1 - arbos/retryable_test.go | 10 ++--- arbos/retryables/retryable.go | 1 + arbos/storage/queue.go | 4 +- arbos/storage/storage.go | 1 + arbos/storage/storage_test.go | 1 + arbos/tx_processor.go | 18 ++++---- arbos/util/retryable_encoding_test.go | 9 ++-- arbos/util/storage_cache.go | 3 +- arbos/util/storage_cache_test.go | 4 +- arbos/util/tracing.go | 3 +- arbos/util/transfer.go | 4 +- arbos/util/util.go | 1 + arbstate/daprovider/reader.go | 1 + arbstate/inbox_fuzz_test.go | 1 + arbutil/hash_test.go | 3 +- blocks_reexecutor/blocks_reexecutor.go | 4 +- broadcastclient/broadcastclient.go | 1 + broadcaster/backlog/backlog.go | 1 + broadcaster/message/message.go | 1 + .../message/message_serialization_test.go | 1 + cmd/conf/chain.go | 3 +- cmd/conf/database.go | 3 +- cmd/conf/init.go | 3 +- .../data_availability_check.go | 4 +- cmd/datool/datool.go | 2 +- cmd/dbconv/dbconv/config.go | 3 +- cmd/dbconv/dbconv/dbconv.go | 1 + cmd/dbconv/main.go | 4 +- cmd/deploy/deploy.go | 12 +++--- cmd/genericconf/config.go | 3 +- cmd/genericconf/filehandler_test.go | 1 + cmd/genericconf/liveconfig.go | 1 + cmd/genericconf/logging.go | 3 +- cmd/genericconf/pprof.go | 1 - cmd/nitro-val/config.go | 5 ++- cmd/nitro/config_test.go | 6 +-- cmd/nitro/init.go | 1 + cmd/nitro/init_test.go | 4 +- cmd/pruning/pruning.go | 1 + cmd/replay/db.go | 1 + .../rediscoordinator/redis_coordinator.go | 3 +- .../seq-coordinator-manager.go | 6 ++- das/aggregator_test.go | 4 +- das/cache_storage_service.go | 7 ++-- das/chain_fetch_das.go | 4 +- das/das.go | 3 +- das/dasRpcClient.go | 5 ++- das/dasRpcServer.go | 1 - das/dastree/dastree.go | 1 + das/dastree/dastree_test.go | 1 + das/db_storage_service.go | 4 +- das/fallback_storage_service.go | 1 + das/fallback_storage_service_test.go | 1 + das/google_cloud_storage_service_test.go | 9 ++-- das/key_utils.go | 1 + das/local_file_storage_service.go | 6 ++- das/memory_backed_storage_service.go | 1 + das/panic_wrapper.go | 1 + das/reader_aggregator_strategies_test.go | 1 + das/redis_storage_service.go | 10 ++--- das/redis_storage_service_test.go | 1 + das/redundant_storage_service.go | 1 + das/restful_client.go | 1 + das/restful_server.go | 1 + das/rpc_aggregator.go | 7 ++-- das/rpc_test.go | 1 + das/s3_storage_service.go | 8 ++-- das/signature_verifier.go | 1 + das/simple_das_reader_aggregator.go | 4 +- das/storage_service.go | 1 + das/syncing_fallback_storage.go | 4 +- das/util.go | 1 + deploy/deploy.go | 1 + execution/gethexec/api.go | 1 + execution/gethexec/block_recorder.go | 4 +- execution/gethexec/blockchain.go | 1 + execution/gethexec/executionengine.go | 5 ++- execution/gethexec/forwarder.go | 5 ++- execution/gethexec/node.go | 4 +- execution/gethexec/sequencer.go | 11 ++--- execution/gethexec/stylus_tracer.go | 1 + execution/gethexec/sync_monitor.go | 3 +- execution/gethexec/tx_pre_checker.go | 4 +- execution/gethexec/wasmstorerebuilder.go | 1 + execution/interface.go | 1 + execution/nodeInterface/NodeInterface.go | 1 + execution/nodeInterface/NodeInterfaceDebug.go | 1 + execution/nodeInterface/virtual-contracts.go | 1 + gethhook/geth-hook.go | 1 + linters/linters.go | 3 +- precompiles/ArbAddressTable_test.go | 1 + precompiles/ArbAggregator_test.go | 1 + precompiles/ArbGasInfo.go | 1 + precompiles/ArbGasInfo_test.go | 1 + precompiles/ArbInfo.go | 1 + precompiles/ArbOwner.go | 6 +-- precompiles/ArbOwner_test.go | 5 ++- precompiles/ArbRetryableTx.go | 2 +- precompiles/ArbRetryableTx_test.go | 6 +-- precompiles/ArbSys.go | 1 + precompiles/ArbWasm.go | 1 + precompiles/precompile.go | 14 +++---- precompiles/precompile_test.go | 6 +-- precompiles/wrapper.go | 6 +-- pubsub/common.go | 3 +- pubsub/consumer.go | 6 ++- pubsub/producer.go | 8 ++-- pubsub/pubsub_test.go | 6 ++- relay/relay_stress_test.go | 1 + staker/block_challenge_backend.go | 1 + staker/block_validator.go | 4 +- staker/block_validator_schema.go | 1 + staker/challenge_manager.go | 1 + staker/challenge_test.go | 1 + staker/execution_challenge_bakend.go | 1 + staker/l1_validator.go | 10 ++--- staker/rollup_watcher.go | 8 ++-- staker/staker.go | 5 ++- staker/stateless_block_validator.go | 7 ++-- staker/validatorwallet/contract.go | 1 + staker/validatorwallet/eoa.go | 1 + staker/validatorwallet/noop.go | 1 + system_tests/aliasing_test.go | 1 + system_tests/batch_poster_test.go | 1 + system_tests/block_hash_test.go | 1 + system_tests/blocks_reexecutor_test.go | 1 + system_tests/bloom_test.go | 1 + system_tests/common_test.go | 42 +++++++++---------- system_tests/conditionaltx_test.go | 1 + system_tests/contract_tx_test.go | 1 + system_tests/db_conversion_test.go | 1 + system_tests/debugapi_test.go | 1 + system_tests/delayedinbox_test.go | 1 + system_tests/estimation_test.go | 1 + system_tests/forwarder_test.go | 2 + system_tests/infra_fee_test.go | 1 + system_tests/initialization_test.go | 1 + system_tests/log_subscription_test.go | 1 + system_tests/meaningless_reorg_test.go | 1 + system_tests/nodeinterface_test.go | 1 + system_tests/outbox_test.go | 1 + system_tests/precompile_doesnt_revert_test.go | 1 + system_tests/precompile_fuzz_test.go | 1 + system_tests/precompile_test.go | 1 + system_tests/program_gas_test.go | 1 + system_tests/program_norace_test.go | 1 + system_tests/program_recursive_test.go | 1 + system_tests/program_test.go | 1 + system_tests/pruning_test.go | 1 + system_tests/recreatestate_rpc_test.go | 1 + system_tests/retryable_test.go | 2 +- system_tests/seq_nonce_test.go | 1 + system_tests/seq_pause_test.go | 1 + system_tests/seq_reject_test.go | 1 + system_tests/seqcompensation_test.go | 1 + system_tests/seqfeed_test.go | 1 + system_tests/state_fuzz_test.go | 1 + system_tests/staterecovery_test.go | 1 + system_tests/stylus_trace_test.go | 4 +- system_tests/stylus_tracer_test.go | 4 +- system_tests/test_info.go | 6 +-- system_tests/triedb_race_test.go | 1 + system_tests/twonodeslong_test.go | 4 +- system_tests/unsupported_txtypes_test.go | 3 +- system_tests/validation_mock_test.go | 4 +- system_tests/wrap_transaction_test.go | 1 + util/arbmath/bits.go | 3 +- util/arbmath/math_test.go | 1 + util/contracts/address_verifier.go | 1 + util/dbutil/dbutil.go | 3 +- util/headerreader/blob_client.go | 5 ++- util/headerreader/blob_client_test.go | 3 +- util/headerreader/header_reader.go | 4 +- util/jsonapi/preimages_test.go | 1 + util/merkletree/merkleAccumulator_test.go | 1 + util/merkletree/merkleEventProof.go | 1 + util/merkletree/merkleEventProof_test.go | 1 + util/merkletree/merkleTree.go | 1 + util/redisutil/test_redis.go | 1 + util/rpcclient/rpcclient_test.go | 6 ++- util/sharedmetrics/sharedmetrics.go | 1 + util/signature/sign_verify.go | 4 +- util/stopwaiter/stopwaiter.go | 1 + util/stopwaiter/stopwaiter_test.go | 1 + util/testhelpers/testhelpers.go | 1 + validator/client/redis/producer.go | 6 ++- validator/client/validation_client.go | 16 ++++--- validator/execution_state.go | 1 + validator/interface.go | 1 + validator/server_api/json.go | 2 +- validator/server_arb/execution_run.go | 2 +- validator/server_arb/execution_run_test.go | 1 + validator/server_arb/machine.go | 2 + validator/server_arb/machine_loader.go | 1 + validator/server_arb/machine_test.go | 1 + validator/server_arb/mock_machine.go | 1 + validator/server_arb/nitro_machine.go | 2 + validator/server_arb/prover_interface.go | 2 + validator/server_arb/validator_spawner.go | 10 ++--- validator/server_common/machine_loader.go | 1 + validator/server_common/valrun.go | 1 + validator/server_jit/jit_machine.go | 1 + validator/server_jit/machine_loader.go | 1 + validator/server_jit/spawner.go | 3 +- validator/validation_entry.go | 1 + validator/valnode/redis/consumer.go | 4 +- validator/valnode/redis/consumer_test.go | 1 + validator/valnode/valnode.go | 5 ++- wavmio/stub.go | 1 + wsbroadcastserver/clientconnection.go | 9 ++-- wsbroadcastserver/connectionlimiter.go | 3 +- wsbroadcastserver/utils.go | 3 +- wsbroadcastserver/wsbroadcastserver.go | 1 + 269 files changed, 536 insertions(+), 273 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 0594670137..8e597f950a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,6 +16,7 @@ linters: enable: - asciicheck # check for non-ascii characters - errorlint # enure error wrapping is safely done + - gci # keep imports sorted deterministically - gocritic # check for certain simplifications - gofmt # ensure code is formatted - gosec # check for security concerns @@ -30,6 +31,13 @@ linters-settings: # check-type-assertions: true + gci: + sections: + - standard + - default + - prefix(github.com/ethereum/go-ethereum) + - prefix(github.com/offchainlabs) + gocritic: disabled-tags: - experimental diff --git a/arbcompress/native.go b/arbcompress/native.go index f7b8f0b8e0..943d21e89e 100644 --- a/arbcompress/native.go +++ b/arbcompress/native.go @@ -12,6 +12,7 @@ package arbcompress #include "arbitrator.h" */ import "C" + import ( "errors" "fmt" diff --git a/arbnode/api.go b/arbnode/api.go index 2dabd41bff..55dc92434f 100644 --- a/arbnode/api.go +++ b/arbnode/api.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/ethdb" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/staker" "github.com/offchainlabs/nitro/validator" diff --git a/arbnode/dataposter/data_poster.go b/arbnode/dataposter/data_poster.go index 0949d929e1..65d8f579fa 100644 --- a/arbnode/dataposter/data_poster.go +++ b/arbnode/dataposter/data_poster.go @@ -20,6 +20,10 @@ import ( "time" "github.com/Knetic/govaluate" + "github.com/holiman/uint256" + "github.com/redis/go-redis/v9" + "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -35,9 +39,10 @@ import ( "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/signer/core/apitypes" - "github.com/holiman/uint256" + "github.com/offchainlabs/nitro/arbnode/dataposter/dbstorage" "github.com/offchainlabs/nitro/arbnode/dataposter/noop" + redisstorage "github.com/offchainlabs/nitro/arbnode/dataposter/redis" "github.com/offchainlabs/nitro/arbnode/dataposter/slice" "github.com/offchainlabs/nitro/arbnode/dataposter/storage" "github.com/offchainlabs/nitro/util/arbmath" @@ -46,10 +51,6 @@ import ( "github.com/offchainlabs/nitro/util/rpcclient" "github.com/offchainlabs/nitro/util/signature" "github.com/offchainlabs/nitro/util/stopwaiter" - "github.com/redis/go-redis/v9" - "github.com/spf13/pflag" - - redisstorage "github.com/offchainlabs/nitro/arbnode/dataposter/redis" ) var ( diff --git a/arbnode/dataposter/dataposter_test.go b/arbnode/dataposter/dataposter_test.go index 7bf0f86e6f..dc5df1a6c4 100644 --- a/arbnode/dataposter/dataposter_test.go +++ b/arbnode/dataposter/dataposter_test.go @@ -9,6 +9,9 @@ import ( "time" "github.com/Knetic/govaluate" + "github.com/google/go-cmp/cmp" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -17,8 +20,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" - "github.com/google/go-cmp/cmp" - "github.com/holiman/uint256" + "github.com/offchainlabs/nitro/arbnode/dataposter/externalsignertest" "github.com/offchainlabs/nitro/util/arbmath" ) diff --git a/arbnode/dataposter/dbstorage/storage.go b/arbnode/dataposter/dbstorage/storage.go index 6a6cd3cfa4..88989cf757 100644 --- a/arbnode/dataposter/dbstorage/storage.go +++ b/arbnode/dataposter/dbstorage/storage.go @@ -11,6 +11,7 @@ import ( "strconv" "github.com/ethereum/go-ethereum/ethdb" + "github.com/offchainlabs/nitro/arbnode/dataposter/storage" "github.com/offchainlabs/nitro/util/dbutil" ) diff --git a/arbnode/dataposter/externalsignertest/externalsignertest.go b/arbnode/dataposter/externalsignertest/externalsignertest.go index 554defc764..51ccec1903 100644 --- a/arbnode/dataposter/externalsignertest/externalsignertest.go +++ b/arbnode/dataposter/externalsignertest/externalsignertest.go @@ -22,6 +22,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/signer/core/apitypes" + "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/arbnode/dataposter/redis/redisstorage.go b/arbnode/dataposter/redis/redisstorage.go index b54abf618b..364f9fc85c 100644 --- a/arbnode/dataposter/redis/redisstorage.go +++ b/arbnode/dataposter/redis/redisstorage.go @@ -9,9 +9,10 @@ import ( "errors" "fmt" + "github.com/redis/go-redis/v9" + "github.com/offchainlabs/nitro/arbnode/dataposter/storage" "github.com/offchainlabs/nitro/util/signature" - "github.com/redis/go-redis/v9" ) // Storage implements redis sorted set backed storage. It does not support diff --git a/arbnode/dataposter/storage/storage.go b/arbnode/dataposter/storage/storage.go index 8e5a7e1798..dfd4c2745c 100644 --- a/arbnode/dataposter/storage/storage.go +++ b/arbnode/dataposter/storage/storage.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" + "github.com/offchainlabs/nitro/arbutil" ) diff --git a/arbnode/dataposter/storage_test.go b/arbnode/dataposter/storage_test.go index c6316caea7..cd4e4babae 100644 --- a/arbnode/dataposter/storage_test.go +++ b/arbnode/dataposter/storage_test.go @@ -9,12 +9,14 @@ import ( "path" "testing" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" + "github.com/offchainlabs/nitro/arbnode/dataposter/dbstorage" "github.com/offchainlabs/nitro/arbnode/dataposter/redis" "github.com/offchainlabs/nitro/arbnode/dataposter/slice" diff --git a/arbnode/delayed_seq_reorg_test.go b/arbnode/delayed_seq_reorg_test.go index 699eb3e8f6..f821d71e63 100644 --- a/arbnode/delayed_seq_reorg_test.go +++ b/arbnode/delayed_seq_reorg_test.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/solgen/go/bridgegen" ) diff --git a/arbnode/delayed_sequencer.go b/arbnode/delayed_sequencer.go index b29a66dd05..abd24dbd12 100644 --- a/arbnode/delayed_sequencer.go +++ b/arbnode/delayed_sequencer.go @@ -10,10 +10,11 @@ import ( "math/big" "sync" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" - flag "github.com/spf13/pflag" "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/execution" diff --git a/arbnode/inbox_reader.go b/arbnode/inbox_reader.go index 14ca83ab13..50893ca392 100644 --- a/arbnode/inbox_reader.go +++ b/arbnode/inbox_reader.go @@ -13,10 +13,11 @@ import ( "sync/atomic" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" - flag "github.com/spf13/pflag" "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/arbnode/inbox_test.go b/arbnode/inbox_test.go index e588ef399b..32023877b7 100644 --- a/arbnode/inbox_test.go +++ b/arbnode/inbox_test.go @@ -11,23 +11,22 @@ import ( "testing" "time" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/rawdb" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethdb" + "github.com/ethereum/go-ethereum/params" + + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbos/l2pricing" "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/execution/gethexec" "github.com/offchainlabs/nitro/statetransfer" - "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/util/testhelpers" "github.com/offchainlabs/nitro/util/testhelpers/env" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/rawdb" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/params" - "github.com/offchainlabs/nitro/arbos" ) type execClientWrapper struct { diff --git a/arbnode/inbox_tracker_test.go b/arbnode/inbox_tracker_test.go index 582b334aee..82d380b03c 100644 --- a/arbnode/inbox_tracker_test.go +++ b/arbnode/inbox_tracker_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/core/rawdb" + "github.com/offchainlabs/nitro/util/containers" ) diff --git a/arbnode/maintenance.go b/arbnode/maintenance.go index 7397229c2e..5e4e56b577 100644 --- a/arbnode/maintenance.go +++ b/arbnode/maintenance.go @@ -10,12 +10,14 @@ import ( "strings" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbnode/redislock" "github.com/offchainlabs/nitro/execution" "github.com/offchainlabs/nitro/util/stopwaiter" - flag "github.com/spf13/pflag" ) // Regularly runs db compaction if configured diff --git a/arbnode/message_pruner.go b/arbnode/message_pruner.go index b249bd886c..840a15f328 100644 --- a/arbnode/message_pruner.go +++ b/arbnode/message_pruner.go @@ -11,14 +11,14 @@ import ( "sync" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/stopwaiter" "github.com/offchainlabs/nitro/validator" - - flag "github.com/spf13/pflag" ) type MessagePruner struct { diff --git a/arbnode/message_pruner_test.go b/arbnode/message_pruner_test.go index e64bb4f838..8e6b744430 100644 --- a/arbnode/message_pruner_test.go +++ b/arbnode/message_pruner_test.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" + "github.com/offchainlabs/nitro/arbutil" ) diff --git a/arbnode/node.go b/arbnode/node.go index c5b3bbe071..77562817dd 100644 --- a/arbnode/node.go +++ b/arbnode/node.go @@ -24,6 +24,7 @@ import ( "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbnode/dataposter" "github.com/offchainlabs/nitro/arbnode/dataposter/storage" "github.com/offchainlabs/nitro/arbnode/resourcemanager" diff --git a/arbnode/redislock/redis.go b/arbnode/redislock/redis.go index de9508323a..075ff60c09 100644 --- a/arbnode/redislock/redis.go +++ b/arbnode/redislock/redis.go @@ -11,10 +11,12 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/log" - "github.com/offchainlabs/nitro/util/stopwaiter" "github.com/redis/go-redis/v9" flag "github.com/spf13/pflag" + + "github.com/ethereum/go-ethereum/log" + + "github.com/offchainlabs/nitro/util/stopwaiter" ) type Simple struct { diff --git a/arbnode/resourcemanager/resource_management.go b/arbnode/resourcemanager/resource_management.go index 249b689443..462b38c578 100644 --- a/arbnode/resourcemanager/resource_management.go +++ b/arbnode/resourcemanager/resource_management.go @@ -14,10 +14,11 @@ import ( "strings" "time" + "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/node" - "github.com/spf13/pflag" ) var ( diff --git a/arbnode/sequencer_inbox.go b/arbnode/sequencer_inbox.go index 81146ed46e..4643ae6d84 100644 --- a/arbnode/sequencer_inbox.go +++ b/arbnode/sequencer_inbox.go @@ -16,9 +16,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/arbutil" - "github.com/offchainlabs/nitro/solgen/go/bridgegen" ) diff --git a/arbnode/sync_monitor.go b/arbnode/sync_monitor.go index 5ab1ede2d6..629068c4fb 100644 --- a/arbnode/sync_monitor.go +++ b/arbnode/sync_monitor.go @@ -5,10 +5,12 @@ import ( "sync" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/stopwaiter" - flag "github.com/spf13/pflag" ) type SyncMonitor struct { diff --git a/arbnode/transaction_streamer.go b/arbnode/transaction_streamer.go index 38b1c003db..1a961ebd3f 100644 --- a/arbnode/transaction_streamer.go +++ b/arbnode/transaction_streamer.go @@ -8,6 +8,7 @@ import ( "context" "encoding/binary" "encoding/json" + "errors" "fmt" "math/big" "reflect" @@ -17,8 +18,6 @@ import ( "testing" "time" - "errors" - flag "github.com/spf13/pflag" "github.com/ethereum/go-ethereum/common" diff --git a/arbos/activate_test.go b/arbos/activate_test.go index a89a38639a..b723c37aa6 100644 --- a/arbos/activate_test.go +++ b/arbos/activate_test.go @@ -9,6 +9,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/programs" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/arbos/addressSet/addressSet.go b/arbos/addressSet/addressSet.go index 156f36e7e7..4bb87e614d 100644 --- a/arbos/addressSet/addressSet.go +++ b/arbos/addressSet/addressSet.go @@ -9,6 +9,7 @@ import ( "errors" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/arbos/util" ) diff --git a/arbos/addressSet/addressSet_test.go b/arbos/addressSet/addressSet_test.go index d32e07a546..4997359dcf 100644 --- a/arbos/addressSet/addressSet_test.go +++ b/arbos/addressSet/addressSet_test.go @@ -8,13 +8,14 @@ import ( "math/rand" "testing" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/params" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/arbos/util" diff --git a/arbos/addressTable/addressTable.go b/arbos/addressTable/addressTable.go index 6ae271060d..608883c34d 100644 --- a/arbos/addressTable/addressTable.go +++ b/arbos/addressTable/addressTable.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rlp" + "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/arbos/util" ) diff --git a/arbos/addressTable/addressTable_test.go b/arbos/addressTable/addressTable_test.go index 6b06ed3406..873d5a4d1c 100644 --- a/arbos/addressTable/addressTable_test.go +++ b/arbos/addressTable/addressTable_test.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/util/testhelpers" diff --git a/arbos/arbosState/arbosstate_test.go b/arbos/arbosState/arbosstate_test.go index ef63c23386..440598991c 100644 --- a/arbos/arbosState/arbosstate_test.go +++ b/arbos/arbosState/arbosstate_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/arbos/util" diff --git a/arbos/arbosState/initialization_test.go b/arbos/arbosState/initialization_test.go index 697a41e4fd..5154606e3d 100644 --- a/arbos/arbosState/initialization_test.go +++ b/arbos/arbosState/initialization_test.go @@ -14,6 +14,7 @@ import ( "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/statetransfer" diff --git a/arbos/arbosState/initialize.go b/arbos/arbosState/initialize.go index 7ea2938c74..29cb75b758 100644 --- a/arbos/arbosState/initialize.go +++ b/arbos/arbosState/initialize.go @@ -5,21 +5,23 @@ package arbosState import ( "errors" - "github.com/ethereum/go-ethereum/core/tracing" "math/big" "regexp" "sort" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/trie" - "github.com/holiman/uint256" + "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/l2pricing" diff --git a/arbos/arbostypes/messagewithmeta.go b/arbos/arbostypes/messagewithmeta.go index 79b7c4f9d2..a3bc167526 100644 --- a/arbos/arbostypes/messagewithmeta.go +++ b/arbos/arbostypes/messagewithmeta.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rlp" + "github.com/offchainlabs/nitro/arbutil" ) diff --git a/arbos/block_processor.go b/arbos/block_processor.go index 19fc36b351..e654531880 100644 --- a/arbos/block_processor.go +++ b/arbos/block_processor.go @@ -10,12 +10,6 @@ import ( "math" "math/big" - "github.com/offchainlabs/nitro/arbos/arbosState" - "github.com/offchainlabs/nitro/arbos/arbostypes" - "github.com/offchainlabs/nitro/arbos/l2pricing" - "github.com/offchainlabs/nitro/arbos/util" - "github.com/offchainlabs/nitro/util/arbmath" - "github.com/ethereum/go-ethereum/arbitrum_types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" @@ -25,6 +19,12 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/trie" + + "github.com/offchainlabs/nitro/arbos/arbosState" + "github.com/offchainlabs/nitro/arbos/arbostypes" + "github.com/offchainlabs/nitro/arbos/l2pricing" + "github.com/offchainlabs/nitro/arbos/util" + "github.com/offchainlabs/nitro/util/arbmath" ) // set by the precompile module, to avoid a package dependence cycle diff --git a/arbos/blockhash/blockhash.go b/arbos/blockhash/blockhash.go index 34c907207c..ff29bbca9a 100644 --- a/arbos/blockhash/blockhash.go +++ b/arbos/blockhash/blockhash.go @@ -8,6 +8,7 @@ import ( "errors" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbos/storage" ) diff --git a/arbos/blockhash/blockhash_test.go b/arbos/blockhash/blockhash_test.go index bf3ee5ee11..c7cc04d966 100644 --- a/arbos/blockhash/blockhash_test.go +++ b/arbos/blockhash/blockhash_test.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/util/testhelpers" diff --git a/arbos/burn/burn.go b/arbos/burn/burn.go index 7d30ad12ec..c94f6bec2f 100644 --- a/arbos/burn/burn.go +++ b/arbos/burn/burn.go @@ -7,6 +7,7 @@ import ( "fmt" glog "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbos/util" ) diff --git a/arbos/extra_transaction_checks.go b/arbos/extra_transaction_checks.go index 0f970c9925..480058cb0f 100644 --- a/arbos/extra_transaction_checks.go +++ b/arbos/extra_transaction_checks.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/arbosState" ) diff --git a/arbos/incomingmessage_test.go b/arbos/incomingmessage_test.go index 2933f6a719..22aba05bce 100644 --- a/arbos/incomingmessage_test.go +++ b/arbos/incomingmessage_test.go @@ -9,6 +9,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbos/arbostypes" ) diff --git a/arbos/internal_tx.go b/arbos/internal_tx.go index 9832ac8005..64dede6290 100644 --- a/arbos/internal_tx.go +++ b/arbos/internal_tx.go @@ -8,15 +8,14 @@ import ( "fmt" "math/big" - "github.com/offchainlabs/nitro/util/arbmath" - - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/util" + "github.com/offchainlabs/nitro/util/arbmath" ) func InternalTxStartBlock( diff --git a/arbos/l1pricing/batchPoster.go b/arbos/l1pricing/batchPoster.go index a3428c441c..5975e95d0f 100644 --- a/arbos/l1pricing/batchPoster.go +++ b/arbos/l1pricing/batchPoster.go @@ -9,6 +9,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbos/addressSet" "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/arbos/l1pricing/batchPoster_test.go b/arbos/l1pricing/batchPoster_test.go index 4e9b8565c0..3263ffca81 100644 --- a/arbos/l1pricing/batchPoster_test.go +++ b/arbos/l1pricing/batchPoster_test.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/storage" ) diff --git a/arbos/l1pricing/l1PricingOldVersions.go b/arbos/l1pricing/l1PricingOldVersions.go index 821d743e7d..1377351af3 100644 --- a/arbos/l1pricing/l1PricingOldVersions.go +++ b/arbos/l1pricing/l1PricingOldVersions.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" + "github.com/offchainlabs/nitro/arbos/util" am "github.com/offchainlabs/nitro/util/arbmath" ) diff --git a/arbos/l1pricing/l1pricing.go b/arbos/l1pricing/l1pricing.go index 392bf36d37..34ab6ed523 100644 --- a/arbos/l1pricing/l1pricing.go +++ b/arbos/l1pricing/l1pricing.go @@ -10,20 +10,18 @@ import ( "math/big" "sync/atomic" - "github.com/ethereum/go-ethereum/crypto" - + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" "github.com/offchainlabs/nitro/arbcompress" - "github.com/offchainlabs/nitro/util/arbmath" - am "github.com/offchainlabs/nitro/util/arbmath" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/arbos/util" + "github.com/offchainlabs/nitro/util/arbmath" + am "github.com/offchainlabs/nitro/util/arbmath" ) type L1PricingState struct { diff --git a/arbos/l1pricing/l1pricing_test.go b/arbos/l1pricing/l1pricing_test.go index b301c94257..b842c26db7 100644 --- a/arbos/l1pricing/l1pricing_test.go +++ b/arbos/l1pricing/l1pricing_test.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/storage" ) diff --git a/arbos/l1pricing_test.go b/arbos/l1pricing_test.go index 6de69db1de..da5f577c5b 100644 --- a/arbos/l1pricing_test.go +++ b/arbos/l1pricing_test.go @@ -4,22 +4,23 @@ package arbos import ( - "github.com/ethereum/go-ethereum/core/tracing" "math/big" "testing" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/vm" - "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/arbosState" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/l1pricing" "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/util/arbmath" - - "github.com/ethereum/go-ethereum/params" - "github.com/offchainlabs/nitro/arbos/burn" ) type l1PricingTest struct { diff --git a/arbos/l2pricing/model.go b/arbos/l2pricing/model.go index 476effa8aa..367e8b6e1a 100644 --- a/arbos/l2pricing/model.go +++ b/arbos/l2pricing/model.go @@ -7,6 +7,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/util/arbmath" ) diff --git a/arbos/merkleAccumulator/merkleAccumulator.go b/arbos/merkleAccumulator/merkleAccumulator.go index e62303e5fd..0d51602c02 100644 --- a/arbos/merkleAccumulator/merkleAccumulator.go +++ b/arbos/merkleAccumulator/merkleAccumulator.go @@ -6,6 +6,7 @@ package merkleAccumulator import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/util/arbmath" ) diff --git a/arbos/parse_l2.go b/arbos/parse_l2.go index 06722e4063..cd926f47bf 100644 --- a/arbos/parse_l2.go +++ b/arbos/parse_l2.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/arbos/programs/api.go b/arbos/programs/api.go index 5ec8c97207..d8f12ffbd3 100644 --- a/arbos/programs/api.go +++ b/arbos/programs/api.go @@ -4,12 +4,14 @@ package programs import ( + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" + "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/util/arbmath" am "github.com/offchainlabs/nitro/util/arbmath" diff --git a/arbos/programs/native.go b/arbos/programs/native.go index 725b302ac0..f162704995 100644 --- a/arbos/programs/native.go +++ b/arbos/programs/native.go @@ -18,6 +18,7 @@ typedef uint64_t u64; typedef size_t usize; */ import "C" + import ( "errors" "fmt" @@ -30,6 +31,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/arbutil" diff --git a/arbos/programs/native_api.go b/arbos/programs/native_api.go index 6cecb8ef63..ab15800ef9 100644 --- a/arbos/programs/native_api.go +++ b/arbos/programs/native_api.go @@ -22,6 +22,7 @@ void handleReqWrap(usize api, u32 req_type, RustSlice *data, u64 *out_cost, GoSl } */ import "C" + import ( "runtime" "sync" @@ -29,6 +30,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/arbutil" ) diff --git a/arbos/programs/params.go b/arbos/programs/params.go index a0b8acd95c..9b219737d9 100644 --- a/arbos/programs/params.go +++ b/arbos/programs/params.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/arbos/util" am "github.com/offchainlabs/nitro/util/arbmath" diff --git a/arbos/programs/programs.go b/arbos/programs/programs.go index 06ff4137da..06ba6ead8c 100644 --- a/arbos/programs/programs.go +++ b/arbos/programs/programs.go @@ -14,6 +14,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" gethParams "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbcompress" "github.com/offchainlabs/nitro/arbos/addressSet" "github.com/offchainlabs/nitro/arbos/storage" diff --git a/arbos/programs/testcompile.go b/arbos/programs/testcompile.go index 615b0f3f72..8a4e38444a 100644 --- a/arbos/programs/testcompile.go +++ b/arbos/programs/testcompile.go @@ -20,6 +20,7 @@ typedef size_t usize; void handleReqWrap(usize api, u32 req_type, RustSlice *data, u64 *out_cost, GoSliceData *out_result, GoSliceData *out_raw_data); */ import "C" + import ( "fmt" "os" diff --git a/arbos/queue_test.go b/arbos/queue_test.go index ff993a233f..75d60b82c3 100644 --- a/arbos/queue_test.go +++ b/arbos/queue_test.go @@ -7,7 +7,6 @@ import ( "testing" "github.com/offchainlabs/nitro/arbos/arbosState" - "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/arbos/util" ) diff --git a/arbos/retryable_test.go b/arbos/retryable_test.go index 2eccaea6c2..b2989de331 100644 --- a/arbos/retryable_test.go +++ b/arbos/retryable_test.go @@ -9,17 +9,17 @@ import ( "testing" "time" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/retryables" "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/util/colors" "github.com/offchainlabs/nitro/util/testhelpers" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/params" ) func TestOpenNonexistentRetryable(t *testing.T) { diff --git a/arbos/retryables/retryable.go b/arbos/retryables/retryable.go index 5938244782..23ba2458ff 100644 --- a/arbos/retryables/retryable.go +++ b/arbos/retryables/retryable.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/arbos/storage/queue.go b/arbos/storage/queue.go index 9c02dc1ee7..3c852a5743 100644 --- a/arbos/storage/queue.go +++ b/arbos/storage/queue.go @@ -4,9 +4,9 @@ package storage import ( - "github.com/offchainlabs/nitro/arbos/util" - "github.com/ethereum/go-ethereum/common" + + "github.com/offchainlabs/nitro/arbos/util" ) type Queue struct { diff --git a/arbos/storage/storage.go b/arbos/storage/storage.go index bc16491af0..63db8ee928 100644 --- a/arbos/storage/storage.go +++ b/arbos/storage/storage.go @@ -21,6 +21,7 @@ import ( "github.com/ethereum/go-ethereum/triedb" "github.com/ethereum/go-ethereum/triedb/hashdb" "github.com/ethereum/go-ethereum/triedb/pathdb" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/arbos/storage/storage_test.go b/arbos/storage/storage_test.go index b2e8bdb2ea..dd2c40b8f0 100644 --- a/arbos/storage/storage_test.go +++ b/arbos/storage/storage_test.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/util/arbmath" ) diff --git a/arbos/tx_processor.go b/arbos/tx_processor.go index e05368dea7..aec08b15b5 100644 --- a/arbos/tx_processor.go +++ b/arbos/tx_processor.go @@ -9,22 +9,20 @@ import ( "math/big" "github.com/holiman/uint256" - "github.com/offchainlabs/nitro/arbos/l1pricing" - - "github.com/offchainlabs/nitro/arbos/util" - "github.com/offchainlabs/nitro/util/arbmath" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" + glog "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" - "github.com/offchainlabs/nitro/arbos/retryables" "github.com/offchainlabs/nitro/arbos/arbosState" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/vm" - glog "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbos/l1pricing" + "github.com/offchainlabs/nitro/arbos/retryables" + "github.com/offchainlabs/nitro/arbos/util" + "github.com/offchainlabs/nitro/util/arbmath" ) var arbosAddress = types.ArbosAddress diff --git a/arbos/util/retryable_encoding_test.go b/arbos/util/retryable_encoding_test.go index d7a5480138..b74983ed0b 100644 --- a/arbos/util/retryable_encoding_test.go +++ b/arbos/util/retryable_encoding_test.go @@ -10,16 +10,15 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/solgen/go/precompilesgen" "github.com/offchainlabs/nitro/util/testhelpers" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" ) func TestRetryableEncoding(t *testing.T) { diff --git a/arbos/util/storage_cache.go b/arbos/util/storage_cache.go index 9573d1ffc7..a9be5fe870 100644 --- a/arbos/util/storage_cache.go +++ b/arbos/util/storage_cache.go @@ -4,8 +4,9 @@ package util import ( - "github.com/ethereum/go-ethereum/common" "slices" + + "github.com/ethereum/go-ethereum/common" ) type storageCacheEntry struct { diff --git a/arbos/util/storage_cache_test.go b/arbos/util/storage_cache_test.go index 9fd452851d..0ba2c5285e 100644 --- a/arbos/util/storage_cache_test.go +++ b/arbos/util/storage_cache_test.go @@ -7,8 +7,10 @@ import ( "slices" "testing" - "github.com/ethereum/go-ethereum/common" "github.com/google/go-cmp/cmp" + + "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/arbos/util/tracing.go b/arbos/util/tracing.go index fb39460d44..f092d32c2d 100644 --- a/arbos/util/tracing.go +++ b/arbos/util/tracing.go @@ -7,11 +7,12 @@ import ( "encoding/binary" "math/big" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" - "github.com/holiman/uint256" ) type TracingScenario uint64 diff --git a/arbos/util/transfer.go b/arbos/util/transfer.go index ed5e07c8cf..37437e01f6 100644 --- a/arbos/util/transfer.go +++ b/arbos/util/transfer.go @@ -9,11 +9,13 @@ import ( "fmt" "math/big" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" - "github.com/holiman/uint256" + "github.com/offchainlabs/nitro/util/arbmath" ) diff --git a/arbos/util/util.go b/arbos/util/util.go index 69d90171a0..abb7135757 100644 --- a/arbos/util/util.go +++ b/arbos/util/util.go @@ -14,6 +14,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/solgen/go/precompilesgen" pgen "github.com/offchainlabs/nitro/solgen/go/precompilesgen" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/arbstate/daprovider/reader.go b/arbstate/daprovider/reader.go index 488b156454..e2fd884340 100644 --- a/arbstate/daprovider/reader.go +++ b/arbstate/daprovider/reader.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/blobs" ) diff --git a/arbstate/inbox_fuzz_test.go b/arbstate/inbox_fuzz_test.go index 5ede321810..5a77b7e298 100644 --- a/arbstate/inbox_fuzz_test.go +++ b/arbstate/inbox_fuzz_test.go @@ -10,6 +10,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbstate/daprovider" ) diff --git a/arbutil/hash_test.go b/arbutil/hash_test.go index 2b93353d08..4b39bf328e 100644 --- a/arbutil/hash_test.go +++ b/arbutil/hash_test.go @@ -4,8 +4,9 @@ import ( "bytes" "testing" - "github.com/ethereum/go-ethereum/common" "github.com/google/go-cmp/cmp" + + "github.com/ethereum/go-ethereum/common" ) func TestSlotAddress(t *testing.T) { diff --git a/blocks_reexecutor/blocks_reexecutor.go b/blocks_reexecutor/blocks_reexecutor.go index 5a883e5d42..d074457626 100644 --- a/blocks_reexecutor/blocks_reexecutor.go +++ b/blocks_reexecutor/blocks_reexecutor.go @@ -9,6 +9,8 @@ import ( "strings" "sync" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/arbitrum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" @@ -19,9 +21,9 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/triedb" "github.com/ethereum/go-ethereum/triedb/hashdb" + "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/util/stopwaiter" - flag "github.com/spf13/pflag" ) type Config struct { diff --git a/broadcastclient/broadcastclient.go b/broadcastclient/broadcastclient.go index 4e97ca8cd0..ac684902e4 100644 --- a/broadcastclient/broadcastclient.go +++ b/broadcastclient/broadcastclient.go @@ -25,6 +25,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" + "github.com/offchainlabs/nitro/arbutil" m "github.com/offchainlabs/nitro/broadcaster/message" "github.com/offchainlabs/nitro/util/contracts" diff --git a/broadcaster/backlog/backlog.go b/broadcaster/backlog/backlog.go index b7b935fb7a..685789a33d 100644 --- a/broadcaster/backlog/backlog.go +++ b/broadcaster/backlog/backlog.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" + m "github.com/offchainlabs/nitro/broadcaster/message" "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/util/containers" diff --git a/broadcaster/message/message.go b/broadcaster/message/message.go index 1e26e6da5e..f2439912f8 100644 --- a/broadcaster/message/message.go +++ b/broadcaster/message/message.go @@ -2,6 +2,7 @@ package message import ( "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbutil" ) diff --git a/broadcaster/message/message_serialization_test.go b/broadcaster/message/message_serialization_test.go index 1d8c10e388..5fb9d55dda 100644 --- a/broadcaster/message/message_serialization_test.go +++ b/broadcaster/message/message_serialization_test.go @@ -10,6 +10,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbos/arbostypes" ) diff --git a/cmd/conf/chain.go b/cmd/conf/chain.go index 28b06aad2b..435246e357 100644 --- a/cmd/conf/chain.go +++ b/cmd/conf/chain.go @@ -6,10 +6,11 @@ package conf import ( "time" + flag "github.com/spf13/pflag" + "github.com/offchainlabs/nitro/cmd/genericconf" "github.com/offchainlabs/nitro/util/headerreader" "github.com/offchainlabs/nitro/util/rpcclient" - flag "github.com/spf13/pflag" ) type ParentChainConfig struct { diff --git a/cmd/conf/database.go b/cmd/conf/database.go index af18bacd57..8857b615f3 100644 --- a/cmd/conf/database.go +++ b/cmd/conf/database.go @@ -12,8 +12,9 @@ import ( "runtime" "time" - "github.com/ethereum/go-ethereum/ethdb/pebble" flag "github.com/spf13/pflag" + + "github.com/ethereum/go-ethereum/ethdb/pebble" ) type PersistentConfig struct { diff --git a/cmd/conf/init.go b/cmd/conf/init.go index 8e4e9a8892..cd2b6c8805 100644 --- a/cmd/conf/init.go +++ b/cmd/conf/init.go @@ -6,8 +6,9 @@ import ( "strings" "time" - "github.com/ethereum/go-ethereum/log" "github.com/spf13/pflag" + + "github.com/ethereum/go-ethereum/log" ) type InitConfig struct { diff --git a/cmd/dataavailability/data_availability_check.go b/cmd/dataavailability/data_availability_check.go index d80c0475bf..e961215925 100644 --- a/cmd/dataavailability/data_availability_check.go +++ b/cmd/dataavailability/data_availability_check.go @@ -13,6 +13,8 @@ import ( "syscall" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -27,8 +29,6 @@ import ( "github.com/offchainlabs/nitro/solgen/go/bridgegen" "github.com/offchainlabs/nitro/util/metricsutil" "github.com/offchainlabs/nitro/util/stopwaiter" - - flag "github.com/spf13/pflag" ) // Data availability check is done to as to make sure that the data that is being stored by DAS is available at all time. diff --git a/cmd/datool/datool.go b/cmd/datool/datool.go index f791d8cbc4..06f94dc952 100644 --- a/cmd/datool/datool.go +++ b/cmd/datool/datool.go @@ -22,10 +22,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/cmd/genericconf" "github.com/offchainlabs/nitro/cmd/util" - "github.com/offchainlabs/nitro/cmd/util/confighelpers" "github.com/offchainlabs/nitro/das" "github.com/offchainlabs/nitro/das/dastree" diff --git a/cmd/dbconv/dbconv/config.go b/cmd/dbconv/dbconv/config.go index 917f34261d..fdebda2d54 100644 --- a/cmd/dbconv/dbconv/config.go +++ b/cmd/dbconv/dbconv/config.go @@ -4,9 +4,10 @@ import ( "errors" "fmt" + flag "github.com/spf13/pflag" + "github.com/offchainlabs/nitro/cmd/conf" "github.com/offchainlabs/nitro/cmd/genericconf" - flag "github.com/spf13/pflag" ) type DBConfig struct { diff --git a/cmd/dbconv/dbconv/dbconv.go b/cmd/dbconv/dbconv/dbconv.go index 6a97df31c0..fdba1907c2 100644 --- a/cmd/dbconv/dbconv/dbconv.go +++ b/cmd/dbconv/dbconv/dbconv.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/dbutil" ) diff --git a/cmd/dbconv/main.go b/cmd/dbconv/main.go index 2d61c96552..f5aaced40b 100644 --- a/cmd/dbconv/main.go +++ b/cmd/dbconv/main.go @@ -6,13 +6,15 @@ import ( "os" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/metrics/exp" + "github.com/offchainlabs/nitro/cmd/dbconv/dbconv" "github.com/offchainlabs/nitro/cmd/genericconf" "github.com/offchainlabs/nitro/cmd/util/confighelpers" - flag "github.com/spf13/pflag" ) func parseDBConv(args []string) (*dbconv.DBConvConfig, error) { diff --git a/cmd/deploy/deploy.go b/cmd/deploy/deploy.go index c70ceb1d94..a597799b06 100644 --- a/cmd/deploy/deploy.go +++ b/cmd/deploy/deploy.go @@ -14,20 +14,20 @@ import ( "strings" "time" - "github.com/offchainlabs/nitro/cmd/chaininfo" - "github.com/offchainlabs/nitro/cmd/genericconf" - "github.com/offchainlabs/nitro/solgen/go/precompilesgen" - "github.com/offchainlabs/nitro/util/headerreader" - "github.com/offchainlabs/nitro/validator/server_common" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbnode" + "github.com/offchainlabs/nitro/cmd/chaininfo" + "github.com/offchainlabs/nitro/cmd/genericconf" "github.com/offchainlabs/nitro/cmd/util" deploycode "github.com/offchainlabs/nitro/deploy" + "github.com/offchainlabs/nitro/solgen/go/precompilesgen" + "github.com/offchainlabs/nitro/util/headerreader" + "github.com/offchainlabs/nitro/validator/server_common" ) func main() { diff --git a/cmd/genericconf/config.go b/cmd/genericconf/config.go index 7c0c5034b3..408ba9a552 100644 --- a/cmd/genericconf/config.go +++ b/cmd/genericconf/config.go @@ -9,9 +9,10 @@ import ( "log/slog" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" - flag "github.com/spf13/pflag" ) type ConfConfig struct { diff --git a/cmd/genericconf/filehandler_test.go b/cmd/genericconf/filehandler_test.go index daa9ed397c..291ea76442 100644 --- a/cmd/genericconf/filehandler_test.go +++ b/cmd/genericconf/filehandler_test.go @@ -12,6 +12,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/cmd/genericconf/liveconfig.go b/cmd/genericconf/liveconfig.go index 1054140e9e..f256fe6612 100644 --- a/cmd/genericconf/liveconfig.go +++ b/cmd/genericconf/liveconfig.go @@ -9,6 +9,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/stopwaiter" ) diff --git a/cmd/genericconf/logging.go b/cmd/genericconf/logging.go index fa45953278..4cdaa5f3e8 100644 --- a/cmd/genericconf/logging.go +++ b/cmd/genericconf/logging.go @@ -8,8 +8,9 @@ import ( "os" "sync" - "github.com/ethereum/go-ethereum/log" "gopkg.in/natefinch/lumberjack.v2" + + "github.com/ethereum/go-ethereum/log" ) var globalFileLoggerFactory = fileLoggerFactory{} diff --git a/cmd/genericconf/pprof.go b/cmd/genericconf/pprof.go index 9fd3a6f2a4..0bde03decd 100644 --- a/cmd/genericconf/pprof.go +++ b/cmd/genericconf/pprof.go @@ -3,7 +3,6 @@ package genericconf import ( "fmt" "net/http" - // Blank import pprof registers its HTTP handlers. _ "net/http/pprof" // #nosec G108 diff --git a/cmd/nitro-val/config.go b/cmd/nitro-val/config.go index 2adbe5e9aa..bca83277b3 100644 --- a/cmd/nitro-val/config.go +++ b/cmd/nitro-val/config.go @@ -2,19 +2,20 @@ package main import ( "fmt" - "reflect" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/nat" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/cmd/conf" "github.com/offchainlabs/nitro/cmd/genericconf" "github.com/offchainlabs/nitro/util/colors" "github.com/offchainlabs/nitro/validator/valnode" - flag "github.com/spf13/pflag" ) type ValidationNodeConfig struct { diff --git a/cmd/nitro/config_test.go b/cmd/nitro/config_test.go index 9626893083..ef41d704f1 100644 --- a/cmd/nitro/config_test.go +++ b/cmd/nitro/config_test.go @@ -14,14 +14,14 @@ import ( "testing" "time" + "github.com/r3labs/diff/v3" + flag "github.com/spf13/pflag" + "github.com/offchainlabs/nitro/cmd/genericconf" "github.com/offchainlabs/nitro/cmd/util/confighelpers" "github.com/offchainlabs/nitro/das" "github.com/offchainlabs/nitro/util/colors" "github.com/offchainlabs/nitro/util/testhelpers" - - "github.com/r3labs/diff/v3" - flag "github.com/spf13/pflag" ) func TestEmptyCliConfig(t *testing.T) { diff --git a/cmd/nitro/init.go b/cmd/nitro/init.go index d4794f9fee..eb6d7df6fc 100644 --- a/cmd/nitro/init.go +++ b/cmd/nitro/init.go @@ -25,6 +25,7 @@ import ( "github.com/cavaliergopher/grab/v3" "github.com/codeclysm/extract/v3" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" diff --git a/cmd/nitro/init_test.go b/cmd/nitro/init_test.go index 48d969f053..8e7afe369d 100644 --- a/cmd/nitro/init_test.go +++ b/cmd/nitro/init_test.go @@ -23,11 +23,13 @@ import ( "testing" "time" + "github.com/google/go-cmp/cmp" + "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/node" - "github.com/google/go-cmp/cmp" + "github.com/offchainlabs/nitro/arbnode" "github.com/offchainlabs/nitro/cmd/chaininfo" "github.com/offchainlabs/nitro/cmd/conf" diff --git a/cmd/pruning/pruning.go b/cmd/pruning/pruning.go index 0755f5ff9e..e89c79bc89 100644 --- a/cmd/pruning/pruning.go +++ b/cmd/pruning/pruning.go @@ -20,6 +20,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbnode" "github.com/offchainlabs/nitro/arbnode/dataposter/storage" "github.com/offchainlabs/nitro/arbutil" diff --git a/cmd/replay/db.go b/cmd/replay/db.go index 7147c48f75..3dc9f15da0 100644 --- a/cmd/replay/db.go +++ b/cmd/replay/db.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/wavmio" ) diff --git a/cmd/seq-coordinator-manager/rediscoordinator/redis_coordinator.go b/cmd/seq-coordinator-manager/rediscoordinator/redis_coordinator.go index b897b23252..b6b5342ca2 100644 --- a/cmd/seq-coordinator-manager/rediscoordinator/redis_coordinator.go +++ b/cmd/seq-coordinator-manager/rediscoordinator/redis_coordinator.go @@ -5,8 +5,9 @@ import ( "errors" "strings" - "github.com/offchainlabs/nitro/util/redisutil" "github.com/redis/go-redis/v9" + + "github.com/offchainlabs/nitro/util/redisutil" ) // RedisCoordinator builds upon RedisCoordinator of redisutil with additional functionality diff --git a/cmd/seq-coordinator-manager/seq-coordinator-manager.go b/cmd/seq-coordinator-manager/seq-coordinator-manager.go index 43d90441ef..7b5dc68699 100644 --- a/cmd/seq-coordinator-manager/seq-coordinator-manager.go +++ b/cmd/seq-coordinator-manager/seq-coordinator-manager.go @@ -7,11 +7,13 @@ import ( "strconv" "github.com/enescakir/emoji" - "github.com/ethereum/go-ethereum/log" "github.com/gdamore/tcell/v2" + "github.com/rivo/tview" + + "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/cmd/seq-coordinator-manager/rediscoordinator" "github.com/offchainlabs/nitro/util/redisutil" - "github.com/rivo/tview" ) // Tview diff --git a/das/aggregator_test.go b/das/aggregator_test.go index 4bc209513e..217315eef0 100644 --- a/das/aggregator_test.go +++ b/das/aggregator_test.go @@ -16,10 +16,10 @@ import ( "testing" "time" + "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/blsSignatures" - - "github.com/ethereum/go-ethereum/log" ) func TestDAS_BasicAggregationLocal(t *testing.T) { diff --git a/das/cache_storage_service.go b/das/cache_storage_service.go index 439ccda086..0ba20ac55b 100644 --- a/das/cache_storage_service.go +++ b/das/cache_storage_service.go @@ -7,14 +7,15 @@ import ( "context" "fmt" - "github.com/offchainlabs/nitro/arbstate/daprovider" - "github.com/offchainlabs/nitro/das/dastree" - "github.com/offchainlabs/nitro/util/pretty" flag "github.com/spf13/pflag" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/lru" "github.com/ethereum/go-ethereum/log" + + "github.com/offchainlabs/nitro/arbstate/daprovider" + "github.com/offchainlabs/nitro/das/dastree" + "github.com/offchainlabs/nitro/util/pretty" ) type CacheConfig struct { diff --git a/das/chain_fetch_das.go b/das/chain_fetch_das.go index 4de6c981cf..34b10d45ec 100644 --- a/das/chain_fetch_das.go +++ b/das/chain_fetch_das.go @@ -8,14 +8,14 @@ import ( "errors" "sync" - "github.com/offchainlabs/nitro/util/pretty" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/das/dastree" "github.com/offchainlabs/nitro/solgen/go/bridgegen" + "github.com/offchainlabs/nitro/util/pretty" ) type syncedKeysetCache struct { diff --git a/das/das.go b/das/das.go index 0b03c05ad6..e870761ac2 100644 --- a/das/das.go +++ b/das/das.go @@ -10,10 +10,11 @@ import ( "math" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" - flag "github.com/spf13/pflag" "github.com/offchainlabs/nitro/arbstate/daprovider" ) diff --git a/das/dasRpcClient.go b/das/dasRpcClient.go index d6e2c389c9..3ea6c4e2c6 100644 --- a/das/dasRpcClient.go +++ b/das/dasRpcClient.go @@ -9,13 +9,14 @@ import ( "strings" "time" + "golang.org/x/sync/errgroup" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" - "golang.org/x/sync/errgroup" - "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/blsSignatures" "github.com/offchainlabs/nitro/util/pretty" diff --git a/das/dasRpcServer.go b/das/dasRpcServer.go index bb1be0384e..adddf26571 100644 --- a/das/dasRpcServer.go +++ b/das/dasRpcServer.go @@ -17,7 +17,6 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/rpc" "github.com/offchainlabs/nitro/blsSignatures" diff --git a/das/dastree/dastree.go b/das/dastree/dastree.go index 2bcbccaae3..29a6b2495c 100644 --- a/das/dastree/dastree.go +++ b/das/dastree/dastree.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/arbmath" ) diff --git a/das/dastree/dastree_test.go b/das/dastree/dastree_test.go index 4d24c9ae98..b24d6ce69b 100644 --- a/das/dastree/dastree_test.go +++ b/das/dastree/dastree_test.go @@ -9,6 +9,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/colors" "github.com/offchainlabs/nitro/util/pretty" diff --git a/das/db_storage_service.go b/das/db_storage_service.go index 74bf12b927..0e38505a13 100644 --- a/das/db_storage_service.go +++ b/das/db_storage_service.go @@ -14,13 +14,15 @@ import ( "time" badger "github.com/dgraph-io/badger/v4" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/das/dastree" "github.com/offchainlabs/nitro/util/pretty" "github.com/offchainlabs/nitro/util/stopwaiter" - flag "github.com/spf13/pflag" ) type LocalDBStorageConfig struct { diff --git a/das/fallback_storage_service.go b/das/fallback_storage_service.go index 0a451678d0..64bc3c2a7a 100644 --- a/das/fallback_storage_service.go +++ b/das/fallback_storage_service.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/das/dastree" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/das/fallback_storage_service_test.go b/das/fallback_storage_service_test.go index b73df31624..4c7c0351e9 100644 --- a/das/fallback_storage_service_test.go +++ b/das/fallback_storage_service_test.go @@ -10,6 +10,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common/math" + "github.com/offchainlabs/nitro/das/dastree" ) diff --git a/das/google_cloud_storage_service_test.go b/das/google_cloud_storage_service_test.go index 799d999bad..94d6f3ee44 100644 --- a/das/google_cloud_storage_service_test.go +++ b/das/google_cloud_storage_service_test.go @@ -2,13 +2,16 @@ package das import ( "bytes" - googlestorage "cloud.google.com/go/storage" "context" "errors" - "github.com/ethereum/go-ethereum/common" - "github.com/offchainlabs/nitro/das/dastree" "testing" "time" + + googlestorage "cloud.google.com/go/storage" + + "github.com/ethereum/go-ethereum/common" + + "github.com/offchainlabs/nitro/das/dastree" ) type mockGCSClient struct { diff --git a/das/key_utils.go b/das/key_utils.go index 33f29788b6..0262e7f666 100644 --- a/das/key_utils.go +++ b/das/key_utils.go @@ -11,6 +11,7 @@ import ( "os" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/blsSignatures" ) diff --git a/das/local_file_storage_service.go b/das/local_file_storage_service.go index 5e64c34b10..71c98c7879 100644 --- a/das/local_file_storage_service.go +++ b/das/local_file_storage_service.go @@ -20,14 +20,16 @@ import ( "syscall" "time" + flag "github.com/spf13/pflag" + "golang.org/x/sys/unix" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/das/dastree" "github.com/offchainlabs/nitro/util/pretty" "github.com/offchainlabs/nitro/util/stopwaiter" - flag "github.com/spf13/pflag" - "golang.org/x/sys/unix" ) type LocalFileStorageConfig struct { diff --git a/das/memory_backed_storage_service.go b/das/memory_backed_storage_service.go index c013b501b9..8a2df28902 100644 --- a/das/memory_backed_storage_service.go +++ b/das/memory_backed_storage_service.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/das/dastree" ) diff --git a/das/panic_wrapper.go b/das/panic_wrapper.go index 3530cb651d..4729792c33 100644 --- a/das/panic_wrapper.go +++ b/das/panic_wrapper.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" ) diff --git a/das/reader_aggregator_strategies_test.go b/das/reader_aggregator_strategies_test.go index cdb85b25e9..3e7e40fd5d 100644 --- a/das/reader_aggregator_strategies_test.go +++ b/das/reader_aggregator_strategies_test.go @@ -11,6 +11,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbstate/daprovider" ) diff --git a/das/redis_storage_service.go b/das/redis_storage_service.go index e57240992c..cdd18ea974 100644 --- a/das/redis_storage_service.go +++ b/das/redis_storage_service.go @@ -10,17 +10,17 @@ import ( "fmt" "time" + "github.com/redis/go-redis/v9" + flag "github.com/spf13/pflag" "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/das/dastree" "github.com/offchainlabs/nitro/util/pretty" "github.com/offchainlabs/nitro/util/redisutil" - "github.com/redis/go-redis/v9" - flag "github.com/spf13/pflag" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" ) type RedisConfig struct { diff --git a/das/redis_storage_service_test.go b/das/redis_storage_service_test.go index 77d3e8cd0f..41ca6bac90 100644 --- a/das/redis_storage_service_test.go +++ b/das/redis_storage_service_test.go @@ -11,6 +11,7 @@ import ( "time" "github.com/alicebob/miniredis/v2" + "github.com/offchainlabs/nitro/das/dastree" ) diff --git a/das/redundant_storage_service.go b/das/redundant_storage_service.go index 3158d28076..85274188d6 100644 --- a/das/redundant_storage_service.go +++ b/das/redundant_storage_service.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/util/pretty" ) diff --git a/das/restful_client.go b/das/restful_client.go index b65426e7cd..3004ea1b59 100644 --- a/das/restful_client.go +++ b/das/restful_client.go @@ -14,6 +14,7 @@ import ( "strings" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/das/dastree" ) diff --git a/das/restful_server.go b/das/restful_server.go index b1607729e2..6c5e2ec453 100644 --- a/das/restful_server.go +++ b/das/restful_server.go @@ -17,6 +17,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/cmd/genericconf" "github.com/offchainlabs/nitro/util/pretty" diff --git a/das/rpc_aggregator.go b/das/rpc_aggregator.go index 9cf481e015..916637aac6 100644 --- a/das/rpc_aggregator.go +++ b/das/rpc_aggregator.go @@ -14,14 +14,15 @@ import ( "github.com/knadh/koanf" "github.com/knadh/koanf/providers/confmap" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/blsSignatures" "github.com/offchainlabs/nitro/solgen/go/bridgegen" "github.com/offchainlabs/nitro/util/metricsutil" "github.com/offchainlabs/nitro/util/signature" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethclient" ) type BackendConfig struct { diff --git a/das/rpc_test.go b/das/rpc_test.go index 370ec0a872..ebc4b736d5 100644 --- a/das/rpc_test.go +++ b/das/rpc_test.go @@ -14,6 +14,7 @@ import ( "time" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/blsSignatures" "github.com/offchainlabs/nitro/cmd/genericconf" "github.com/offchainlabs/nitro/util/signature" diff --git a/das/s3_storage_service.go b/das/s3_storage_service.go index d251f12214..4c0dcaf5a3 100644 --- a/das/s3_storage_service.go +++ b/das/s3_storage_service.go @@ -16,14 +16,14 @@ import ( "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/feature/s3/manager" "github.com/aws/aws-sdk-go-v2/service/s3" - "github.com/offchainlabs/nitro/arbstate/daprovider" - "github.com/offchainlabs/nitro/das/dastree" - "github.com/offchainlabs/nitro/util/pretty" + flag "github.com/spf13/pflag" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" - flag "github.com/spf13/pflag" + "github.com/offchainlabs/nitro/arbstate/daprovider" + "github.com/offchainlabs/nitro/das/dastree" + "github.com/offchainlabs/nitro/util/pretty" ) type S3Uploader interface { diff --git a/das/signature_verifier.go b/das/signature_verifier.go index 0aa42bceb6..453b2fe305 100644 --- a/das/signature_verifier.go +++ b/das/signature_verifier.go @@ -11,6 +11,7 @@ import ( "os" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/solgen/go/bridgegen" "github.com/offchainlabs/nitro/util/contracts" ) diff --git a/das/simple_das_reader_aggregator.go b/das/simple_das_reader_aggregator.go index f45c56afe0..ff28d6a22a 100644 --- a/das/simple_das_reader_aggregator.go +++ b/das/simple_das_reader_aggregator.go @@ -12,13 +12,15 @@ import ( "sync" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/das/dastree" "github.com/offchainlabs/nitro/util/pretty" "github.com/offchainlabs/nitro/util/stopwaiter" - flag "github.com/spf13/pflag" ) // Most of the time we will use the SimpleDASReaderAggregator only to aggregate diff --git a/das/storage_service.go b/das/storage_service.go index b7526077e9..925bbb520a 100644 --- a/das/storage_service.go +++ b/das/storage_service.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/offchainlabs/nitro/arbstate/daprovider" ) diff --git a/das/syncing_fallback_storage.go b/das/syncing_fallback_storage.go index 0670a29c73..1aec2b7328 100644 --- a/das/syncing_fallback_storage.go +++ b/das/syncing_fallback_storage.go @@ -12,6 +12,8 @@ import ( "sync" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -19,13 +21,13 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/solgen/go/bridgegen" "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/util/headerreader" "github.com/offchainlabs/nitro/util/stopwaiter" - flag "github.com/spf13/pflag" ) var sequencerInboxABI *abi.ABI diff --git a/das/util.go b/das/util.go index 114e075e79..cd300175bb 100644 --- a/das/util.go +++ b/das/util.go @@ -7,6 +7,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/util/pretty" ) diff --git a/deploy/deploy.go b/deploy/deploy.go index bb4b2e6594..2738373c72 100644 --- a/deploy/deploy.go +++ b/deploy/deploy.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/cmd/chaininfo" "github.com/offchainlabs/nitro/solgen/go/bridgegen" "github.com/offchainlabs/nitro/solgen/go/challengegen" diff --git a/execution/gethexec/api.go b/execution/gethexec/api.go index 4fa60693d5..713d1496f9 100644 --- a/execution/gethexec/api.go +++ b/execution/gethexec/api.go @@ -18,6 +18,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/retryables" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/execution/gethexec/block_recorder.go b/execution/gethexec/block_recorder.go index 6f30e16e5c..2e3d51fec9 100644 --- a/execution/gethexec/block_recorder.go +++ b/execution/gethexec/block_recorder.go @@ -6,18 +6,20 @@ import ( "sync" "testing" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/arbitrum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/execution" - flag "github.com/spf13/pflag" ) // BlockRecorder uses a separate statedatabase from the blockchain. diff --git a/execution/gethexec/blockchain.go b/execution/gethexec/blockchain.go index fda8f49093..53b494a3c2 100644 --- a/execution/gethexec/blockchain.go +++ b/execution/gethexec/blockchain.go @@ -18,6 +18,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/arbostypes" diff --git a/execution/gethexec/executionengine.go b/execution/gethexec/executionengine.go index 6571672b71..cae2c5fb0c 100644 --- a/execution/gethexec/executionengine.go +++ b/execution/gethexec/executionengine.go @@ -12,6 +12,7 @@ package gethexec #include "arbitrator.h" */ import "C" + import ( "bytes" "context" @@ -26,6 +27,8 @@ import ( "testing" "time" + "github.com/google/uuid" + "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/state" @@ -33,7 +36,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/params" - "github.com/google/uuid" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/arbostypes" diff --git a/execution/gethexec/forwarder.go b/execution/gethexec/forwarder.go index cdb4f394e5..8e64508e6c 100644 --- a/execution/gethexec/forwarder.go +++ b/execution/gethexec/forwarder.go @@ -14,8 +14,6 @@ import ( "sync/atomic" "time" - "github.com/offchainlabs/nitro/util/redisutil" - "github.com/offchainlabs/nitro/util/stopwaiter" flag "github.com/spf13/pflag" "github.com/ethereum/go-ethereum/arbitrum" @@ -24,6 +22,9 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rpc" + + "github.com/offchainlabs/nitro/util/redisutil" + "github.com/offchainlabs/nitro/util/stopwaiter" ) type ForwarderConfig struct { diff --git a/execution/gethexec/node.go b/execution/gethexec/node.go index 499a13164e..11d173a21e 100644 --- a/execution/gethexec/node.go +++ b/execution/gethexec/node.go @@ -9,6 +9,8 @@ import ( "sync/atomic" "testing" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/arbitrum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" @@ -21,6 +23,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbos/programs" "github.com/offchainlabs/nitro/arbutil" @@ -28,7 +31,6 @@ import ( "github.com/offchainlabs/nitro/solgen/go/precompilesgen" "github.com/offchainlabs/nitro/util/dbutil" "github.com/offchainlabs/nitro/util/headerreader" - flag "github.com/spf13/pflag" ) type StylusTargetConfig struct { diff --git a/execution/gethexec/sequencer.go b/execution/gethexec/sequencer.go index cc98c7930f..92d440e8cb 100644 --- a/execution/gethexec/sequencer.go +++ b/execution/gethexec/sequencer.go @@ -15,11 +15,6 @@ import ( "sync/atomic" "time" - "github.com/offchainlabs/nitro/arbutil" - "github.com/offchainlabs/nitro/execution" - "github.com/offchainlabs/nitro/util/arbmath" - "github.com/offchainlabs/nitro/util/containers" - "github.com/offchainlabs/nitro/util/headerreader" flag "github.com/spf13/pflag" "github.com/ethereum/go-ethereum/arbitrum" @@ -34,10 +29,16 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbos/l1pricing" + "github.com/offchainlabs/nitro/arbutil" + "github.com/offchainlabs/nitro/execution" + "github.com/offchainlabs/nitro/util/arbmath" + "github.com/offchainlabs/nitro/util/containers" + "github.com/offchainlabs/nitro/util/headerreader" "github.com/offchainlabs/nitro/util/stopwaiter" ) diff --git a/execution/gethexec/stylus_tracer.go b/execution/gethexec/stylus_tracer.go index cb4e858048..8a024941d3 100644 --- a/execution/gethexec/stylus_tracer.go +++ b/execution/gethexec/stylus_tracer.go @@ -17,6 +17,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/containers" ) diff --git a/execution/gethexec/sync_monitor.go b/execution/gethexec/sync_monitor.go index 86949c7767..7f04b2ee4a 100644 --- a/execution/gethexec/sync_monitor.go +++ b/execution/gethexec/sync_monitor.go @@ -3,9 +3,10 @@ package gethexec import ( "context" - "github.com/offchainlabs/nitro/execution" "github.com/pkg/errors" flag "github.com/spf13/pflag" + + "github.com/offchainlabs/nitro/execution" ) type SyncMonitorConfig struct { diff --git a/execution/gethexec/tx_pre_checker.go b/execution/gethexec/tx_pre_checker.go index e0ae330148..e7ef20bae9 100644 --- a/execution/gethexec/tx_pre_checker.go +++ b/execution/gethexec/tx_pre_checker.go @@ -8,6 +8,8 @@ import ( "fmt" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/arbitrum_types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" @@ -15,11 +17,11 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/l1pricing" "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/util/headerreader" - flag "github.com/spf13/pflag" ) var ( diff --git a/execution/gethexec/wasmstorerebuilder.go b/execution/gethexec/wasmstorerebuilder.go index e3eb8e9268..b40a7cd128 100644 --- a/execution/gethexec/wasmstorerebuilder.go +++ b/execution/gethexec/wasmstorerebuilder.go @@ -17,6 +17,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" + "github.com/offchainlabs/nitro/arbos/arbosState" ) diff --git a/execution/interface.go b/execution/interface.go index 2a3d79c697..c0aa71c146 100644 --- a/execution/interface.go +++ b/execution/interface.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" + "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbutil" ) diff --git a/execution/nodeInterface/NodeInterface.go b/execution/nodeInterface/NodeInterface.go index 00da1ba4b6..3b8719b07d 100644 --- a/execution/nodeInterface/NodeInterface.go +++ b/execution/nodeInterface/NodeInterface.go @@ -21,6 +21,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/l1pricing" "github.com/offchainlabs/nitro/arbos/retryables" diff --git a/execution/nodeInterface/NodeInterfaceDebug.go b/execution/nodeInterface/NodeInterfaceDebug.go index ae9c157ce4..7066bf2ed2 100644 --- a/execution/nodeInterface/NodeInterfaceDebug.go +++ b/execution/nodeInterface/NodeInterfaceDebug.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/solgen/go/node_interfacegen" ) diff --git a/execution/nodeInterface/virtual-contracts.go b/execution/nodeInterface/virtual-contracts.go index 86382870b7..5b9f4b3474 100644 --- a/execution/nodeInterface/virtual-contracts.go +++ b/execution/nodeInterface/virtual-contracts.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/l1pricing" diff --git a/gethhook/geth-hook.go b/gethhook/geth-hook.go index 776e8cc452..3ad275b352 100644 --- a/gethhook/geth-hook.go +++ b/gethhook/geth-hook.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/precompiles" ) diff --git a/linters/linters.go b/linters/linters.go index a6c9f6d55e..8d2807c0b2 100644 --- a/linters/linters.go +++ b/linters/linters.go @@ -1,11 +1,12 @@ package main import ( + "golang.org/x/tools/go/analysis/multichecker" + "github.com/offchainlabs/nitro/linters/koanf" "github.com/offchainlabs/nitro/linters/pointercheck" "github.com/offchainlabs/nitro/linters/rightshift" "github.com/offchainlabs/nitro/linters/structinit" - "golang.org/x/tools/go/analysis/multichecker" ) func main() { diff --git a/precompiles/ArbAddressTable_test.go b/precompiles/ArbAddressTable_test.go index 62ce177480..9aeddadf71 100644 --- a/precompiles/ArbAddressTable_test.go +++ b/precompiles/ArbAddressTable_test.go @@ -13,6 +13,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/util/testhelpers" diff --git a/precompiles/ArbAggregator_test.go b/precompiles/ArbAggregator_test.go index 879fc737e4..eb72f12f25 100644 --- a/precompiles/ArbAggregator_test.go +++ b/precompiles/ArbAggregator_test.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbos/l1pricing" ) diff --git a/precompiles/ArbGasInfo.go b/precompiles/ArbGasInfo.go index b41dfda8a2..8d916926f3 100644 --- a/precompiles/ArbGasInfo.go +++ b/precompiles/ArbGasInfo.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/l1pricing" "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/precompiles/ArbGasInfo_test.go b/precompiles/ArbGasInfo_test.go index 260d7b3cef..76489c3c9a 100644 --- a/precompiles/ArbGasInfo_test.go +++ b/precompiles/ArbGasInfo_test.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/storage" diff --git a/precompiles/ArbInfo.go b/precompiles/ArbInfo.go index 9f8cf34532..60e23ffb6e 100644 --- a/precompiles/ArbInfo.go +++ b/precompiles/ArbInfo.go @@ -5,6 +5,7 @@ package precompiles import ( "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/util/arbmath" ) diff --git a/precompiles/ArbOwner.go b/precompiles/ArbOwner.go index 8b87445e0e..90a7b4ccc2 100644 --- a/precompiles/ArbOwner.go +++ b/precompiles/ArbOwner.go @@ -10,13 +10,13 @@ import ( "fmt" "math/big" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/l1pricing" "github.com/offchainlabs/nitro/arbos/programs" "github.com/offchainlabs/nitro/util/arbmath" am "github.com/offchainlabs/nitro/util/arbmath" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/params" ) // ArbOwner precompile provides owners with tools for managing the rollup. diff --git a/precompiles/ArbOwner_test.go b/precompiles/ArbOwner_test.go index fe995c6b32..73252c0763 100644 --- a/precompiles/ArbOwner_test.go +++ b/precompiles/ArbOwner_test.go @@ -6,16 +6,17 @@ package precompiles import ( "bytes" "encoding/json" - "github.com/ethereum/go-ethereum/core/tracing" "math/big" "testing" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/burn" diff --git a/precompiles/ArbRetryableTx.go b/precompiles/ArbRetryableTx.go index d925499180..49cc9a3264 100644 --- a/precompiles/ArbRetryableTx.go +++ b/precompiles/ArbRetryableTx.go @@ -9,8 +9,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/retryables" "github.com/offchainlabs/nitro/arbos/storage" "github.com/offchainlabs/nitro/arbos/util" diff --git a/precompiles/ArbRetryableTx_test.go b/precompiles/ArbRetryableTx_test.go index 47450299ce..d5b93640c9 100644 --- a/precompiles/ArbRetryableTx_test.go +++ b/precompiles/ArbRetryableTx_test.go @@ -7,12 +7,12 @@ import ( "math/big" "testing" - "github.com/offchainlabs/nitro/arbos" - "github.com/offchainlabs/nitro/arbos/storage" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/vm" + + "github.com/offchainlabs/nitro/arbos" + "github.com/offchainlabs/nitro/arbos/storage" templates "github.com/offchainlabs/nitro/solgen/go/precompilesgen" ) diff --git a/precompiles/ArbSys.go b/precompiles/ArbSys.go index 689d3b18de..04cde46ebe 100644 --- a/precompiles/ArbSys.go +++ b/precompiles/ArbSys.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" + "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/util/merkletree" diff --git a/precompiles/ArbWasm.go b/precompiles/ArbWasm.go index bc24c8a6e8..eecca35ce6 100644 --- a/precompiles/ArbWasm.go +++ b/precompiles/ArbWasm.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" gethparams "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/programs" "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/precompiles/precompile.go b/precompiles/precompile.go index 9a356c5a8e..5b5376a4ca 100644 --- a/precompiles/precompile.go +++ b/precompiles/precompile.go @@ -14,13 +14,6 @@ import ( "strings" "unicode" - "github.com/offchainlabs/nitro/arbos" - "github.com/offchainlabs/nitro/arbos/arbosState" - "github.com/offchainlabs/nitro/arbos/programs" - "github.com/offchainlabs/nitro/arbos/util" - pgen "github.com/offchainlabs/nitro/solgen/go/precompilesgen" - "github.com/offchainlabs/nitro/util/arbmath" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -30,6 +23,13 @@ import ( "github.com/ethereum/go-ethereum/log" glog "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + + "github.com/offchainlabs/nitro/arbos" + "github.com/offchainlabs/nitro/arbos/arbosState" + "github.com/offchainlabs/nitro/arbos/programs" + "github.com/offchainlabs/nitro/arbos/util" + pgen "github.com/offchainlabs/nitro/solgen/go/precompilesgen" + "github.com/offchainlabs/nitro/util/arbmath" ) type ArbosPrecompile interface { diff --git a/precompiles/precompile_test.go b/precompiles/precompile_test.go index 18b33714aa..c8b8a46b96 100644 --- a/precompiles/precompile_test.go +++ b/precompiles/precompile_test.go @@ -10,12 +10,12 @@ import ( "os" "testing" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/storage" templates "github.com/offchainlabs/nitro/solgen/go/precompilesgen" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/precompiles/wrapper.go b/precompiles/wrapper.go index b9363c40a2..edc079fc5b 100644 --- a/precompiles/wrapper.go +++ b/precompiles/wrapper.go @@ -7,12 +7,12 @@ import ( "errors" "math/big" - "github.com/offchainlabs/nitro/arbos/arbosState" - "github.com/offchainlabs/nitro/arbos/util" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" + + "github.com/offchainlabs/nitro/arbos/arbosState" + "github.com/offchainlabs/nitro/arbos/util" ) // DebugPrecompile is a precompile wrapper for those not allowed in production diff --git a/pubsub/common.go b/pubsub/common.go index ad36b6e622..a4fc141bb5 100644 --- a/pubsub/common.go +++ b/pubsub/common.go @@ -5,8 +5,9 @@ import ( "fmt" "strings" - "github.com/ethereum/go-ethereum/log" "github.com/redis/go-redis/v9" + + "github.com/ethereum/go-ethereum/log" ) func ResultKeyFor(streamName, id string) string { return fmt.Sprintf("%s.%s", streamName, id) } diff --git a/pubsub/consumer.go b/pubsub/consumer.go index 391042bd7e..3f28749473 100644 --- a/pubsub/consumer.go +++ b/pubsub/consumer.go @@ -10,11 +10,13 @@ import ( "strconv" "time" - "github.com/ethereum/go-ethereum/log" "github.com/google/uuid" - "github.com/offchainlabs/nitro/util/stopwaiter" "github.com/redis/go-redis/v9" "github.com/spf13/pflag" + + "github.com/ethereum/go-ethereum/log" + + "github.com/offchainlabs/nitro/util/stopwaiter" ) type ConsumerConfig struct { diff --git a/pubsub/producer.go b/pubsub/producer.go index 722c145a09..5aaca77aa7 100644 --- a/pubsub/producer.go +++ b/pubsub/producer.go @@ -18,12 +18,14 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/log" "github.com/google/uuid" - "github.com/offchainlabs/nitro/util/containers" - "github.com/offchainlabs/nitro/util/stopwaiter" "github.com/redis/go-redis/v9" "github.com/spf13/pflag" + + "github.com/ethereum/go-ethereum/log" + + "github.com/offchainlabs/nitro/util/containers" + "github.com/offchainlabs/nitro/util/stopwaiter" ) const ( diff --git a/pubsub/pubsub_test.go b/pubsub/pubsub_test.go index 8bd1aed25d..c82a35e0b8 100644 --- a/pubsub/pubsub_test.go +++ b/pubsub/pubsub_test.go @@ -9,12 +9,14 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/log" "github.com/google/go-cmp/cmp" "github.com/google/uuid" + "github.com/redis/go-redis/v9" + + "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/containers" "github.com/offchainlabs/nitro/util/redisutil" - "github.com/redis/go-redis/v9" ) var ( diff --git a/relay/relay_stress_test.go b/relay/relay_stress_test.go index 575a77ee6f..93ba510193 100644 --- a/relay/relay_stress_test.go +++ b/relay/relay_stress_test.go @@ -7,6 +7,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/broadcastclient" diff --git a/staker/block_challenge_backend.go b/staker/block_challenge_backend.go index 0dd89865bd..a8a6e917a2 100644 --- a/staker/block_challenge_backend.go +++ b/staker/block_challenge_backend.go @@ -13,6 +13,7 @@ import ( "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/solgen/go/challengegen" "github.com/offchainlabs/nitro/validator" diff --git a/staker/block_validator.go b/staker/block_validator.go index 5a1f123693..0a1a38ba17 100644 --- a/staker/block_validator.go +++ b/staker/block_validator.go @@ -16,12 +16,15 @@ import ( "testing" "time" + "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/rlp" + "github.com/offchainlabs/nitro/arbnode/resourcemanager" "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/containers" @@ -31,7 +34,6 @@ import ( "github.com/offchainlabs/nitro/validator/client/redis" "github.com/offchainlabs/nitro/validator/inputs" "github.com/offchainlabs/nitro/validator/server_api" - "github.com/spf13/pflag" ) var ( diff --git a/staker/block_validator_schema.go b/staker/block_validator_schema.go index f6eb39f015..330116dda0 100644 --- a/staker/block_validator_schema.go +++ b/staker/block_validator_schema.go @@ -5,6 +5,7 @@ package staker import ( "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/validator" ) diff --git a/staker/challenge_manager.go b/staker/challenge_manager.go index 27cb92a5c7..96e496acf8 100644 --- a/staker/challenge_manager.go +++ b/staker/challenge_manager.go @@ -19,6 +19,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/solgen/go/challengegen" "github.com/offchainlabs/nitro/validator" diff --git a/staker/challenge_test.go b/staker/challenge_test.go index 33f1644c63..ede1295a13 100644 --- a/staker/challenge_test.go +++ b/staker/challenge_test.go @@ -20,6 +20,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/solgen/go/mocksgen" "github.com/offchainlabs/nitro/solgen/go/ospgen" "github.com/offchainlabs/nitro/validator" diff --git a/staker/execution_challenge_bakend.go b/staker/execution_challenge_bakend.go index 8ab60efced..6616d8f8c1 100644 --- a/staker/execution_challenge_bakend.go +++ b/staker/execution_challenge_bakend.go @@ -7,6 +7,7 @@ import ( "context" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/validator" ) diff --git a/staker/l1_validator.go b/staker/l1_validator.go index 5b0c211324..8ee05dda22 100644 --- a/staker/l1_validator.go +++ b/staker/l1_validator.go @@ -10,19 +10,19 @@ import ( "math/big" "time" - "github.com/offchainlabs/nitro/staker/txbuilder" - "github.com/offchainlabs/nitro/util/arbmath" - "github.com/offchainlabs/nitro/util/headerreader" - "github.com/offchainlabs/nitro/validator" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/solgen/go/rollupgen" + "github.com/offchainlabs/nitro/staker/txbuilder" + "github.com/offchainlabs/nitro/util/arbmath" + "github.com/offchainlabs/nitro/util/headerreader" + "github.com/offchainlabs/nitro/validator" ) type ConfirmType uint8 diff --git a/staker/rollup_watcher.go b/staker/rollup_watcher.go index 4d7db52322..8b27e544b1 100644 --- a/staker/rollup_watcher.go +++ b/staker/rollup_watcher.go @@ -13,17 +13,17 @@ import ( "strings" "sync/atomic" + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/solgen/go/rollupgen" "github.com/offchainlabs/nitro/util/headerreader" - - "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/core/types" ) var rollupInitializedID common.Hash diff --git a/staker/staker.go b/staker/staker.go index 45e6f6f551..c5f9c1cd65 100644 --- a/staker/staker.go +++ b/staker/staker.go @@ -12,6 +12,9 @@ import ( "strings" "time" + "github.com/google/btree" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -19,8 +22,6 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/rpc" - "github.com/google/btree" - flag "github.com/spf13/pflag" "github.com/offchainlabs/nitro/arbnode/dataposter" "github.com/offchainlabs/nitro/arbutil" diff --git a/staker/stateless_block_validator.go b/staker/stateless_block_validator.go index d9c9c5446b..bb25a38f5d 100644 --- a/staker/stateless_block_validator.go +++ b/staker/stateless_block_validator.go @@ -9,23 +9,22 @@ import ( "fmt" "testing" - "github.com/offchainlabs/nitro/arbstate/daprovider" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/arbostypes" + "github.com/offchainlabs/nitro/arbstate/daprovider" "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/execution" "github.com/offchainlabs/nitro/util/rpcclient" "github.com/offchainlabs/nitro/validator" + validatorclient "github.com/offchainlabs/nitro/validator/client" "github.com/offchainlabs/nitro/validator/client/redis" "github.com/offchainlabs/nitro/validator/server_api" - - validatorclient "github.com/offchainlabs/nitro/validator/client" ) type StatelessBlockValidator struct { diff --git a/staker/validatorwallet/contract.go b/staker/validatorwallet/contract.go index 3202d58569..4d4f8288ef 100644 --- a/staker/validatorwallet/contract.go +++ b/staker/validatorwallet/contract.go @@ -19,6 +19,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbnode/dataposter" "github.com/offchainlabs/nitro/solgen/go/rollupgen" "github.com/offchainlabs/nitro/staker/txbuilder" diff --git a/staker/validatorwallet/eoa.go b/staker/validatorwallet/eoa.go index 7c7f472579..870a959152 100644 --- a/staker/validatorwallet/eoa.go +++ b/staker/validatorwallet/eoa.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" + "github.com/offchainlabs/nitro/arbnode/dataposter" "github.com/offchainlabs/nitro/solgen/go/challengegen" "github.com/offchainlabs/nitro/solgen/go/rollupgen" diff --git a/staker/validatorwallet/noop.go b/staker/validatorwallet/noop.go index fec39ac2b1..24c7280811 100644 --- a/staker/validatorwallet/noop.go +++ b/staker/validatorwallet/noop.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" + "github.com/offchainlabs/nitro/arbnode/dataposter" "github.com/offchainlabs/nitro/staker/txbuilder" ) diff --git a/system_tests/aliasing_test.go b/system_tests/aliasing_test.go index 60a89468a5..e6c9dab45f 100644 --- a/system_tests/aliasing_test.go +++ b/system_tests/aliasing_test.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/solgen/go/mocksgen" "github.com/offchainlabs/nitro/solgen/go/precompilesgen" diff --git a/system_tests/batch_poster_test.go b/system_tests/batch_poster_test.go index 0ec03e84c4..39d7fa576c 100644 --- a/system_tests/batch_poster_test.go +++ b/system_tests/batch_poster_test.go @@ -13,6 +13,7 @@ import ( "time" "github.com/andybalholm/brotli" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/system_tests/block_hash_test.go b/system_tests/block_hash_test.go index b437f3dad9..454b4359ad 100644 --- a/system_tests/block_hash_test.go +++ b/system_tests/block_hash_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/offchainlabs/nitro/solgen/go/mocksgen" ) diff --git a/system_tests/blocks_reexecutor_test.go b/system_tests/blocks_reexecutor_test.go index 1a97919e66..e9ef5a2260 100644 --- a/system_tests/blocks_reexecutor_test.go +++ b/system_tests/blocks_reexecutor_test.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" + blocksreexecutor "github.com/offchainlabs/nitro/blocks_reexecutor" ) diff --git a/system_tests/bloom_test.go b/system_tests/bloom_test.go index 68fb7c3add..df6c549dda 100644 --- a/system_tests/bloom_test.go +++ b/system_tests/bloom_test.go @@ -17,6 +17,7 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/solgen/go/mocksgen" ) diff --git a/system_tests/common_test.go b/system_tests/common_test.go index 9d491f522b..b8e7befcc5 100644 --- a/system_tests/common_test.go +++ b/system_tests/common_test.go @@ -22,27 +22,6 @@ import ( "testing" "time" - "github.com/offchainlabs/nitro/arbos" - "github.com/offchainlabs/nitro/arbos/arbostypes" - "github.com/offchainlabs/nitro/arbos/util" - "github.com/offchainlabs/nitro/arbstate/daprovider" - "github.com/offchainlabs/nitro/arbutil" - "github.com/offchainlabs/nitro/blsSignatures" - "github.com/offchainlabs/nitro/cmd/chaininfo" - "github.com/offchainlabs/nitro/cmd/conf" - "github.com/offchainlabs/nitro/cmd/genericconf" - "github.com/offchainlabs/nitro/das" - "github.com/offchainlabs/nitro/deploy" - "github.com/offchainlabs/nitro/execution/gethexec" - "github.com/offchainlabs/nitro/util/arbmath" - "github.com/offchainlabs/nitro/util/headerreader" - "github.com/offchainlabs/nitro/util/redisutil" - "github.com/offchainlabs/nitro/util/signature" - "github.com/offchainlabs/nitro/validator/inputs" - "github.com/offchainlabs/nitro/validator/server_api" - "github.com/offchainlabs/nitro/validator/server_common" - "github.com/offchainlabs/nitro/validator/valnode" - rediscons "github.com/offchainlabs/nitro/validator/valnode/redis" "github.com/redis/go-redis/v9" "github.com/ethereum/go-ethereum" @@ -73,15 +52,36 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/offchainlabs/nitro/arbnode" + "github.com/offchainlabs/nitro/arbos" + "github.com/offchainlabs/nitro/arbos/arbostypes" + "github.com/offchainlabs/nitro/arbos/util" + "github.com/offchainlabs/nitro/arbstate/daprovider" + "github.com/offchainlabs/nitro/arbutil" + "github.com/offchainlabs/nitro/blsSignatures" + "github.com/offchainlabs/nitro/cmd/chaininfo" + "github.com/offchainlabs/nitro/cmd/conf" + "github.com/offchainlabs/nitro/cmd/genericconf" + "github.com/offchainlabs/nitro/das" + "github.com/offchainlabs/nitro/deploy" + "github.com/offchainlabs/nitro/execution/gethexec" _ "github.com/offchainlabs/nitro/execution/nodeInterface" "github.com/offchainlabs/nitro/solgen/go/bridgegen" "github.com/offchainlabs/nitro/solgen/go/mocksgen" "github.com/offchainlabs/nitro/solgen/go/precompilesgen" "github.com/offchainlabs/nitro/solgen/go/upgrade_executorgen" "github.com/offchainlabs/nitro/statetransfer" + "github.com/offchainlabs/nitro/util/arbmath" + "github.com/offchainlabs/nitro/util/headerreader" + "github.com/offchainlabs/nitro/util/redisutil" + "github.com/offchainlabs/nitro/util/signature" "github.com/offchainlabs/nitro/util/testhelpers" "github.com/offchainlabs/nitro/util/testhelpers/env" "github.com/offchainlabs/nitro/util/testhelpers/github" + "github.com/offchainlabs/nitro/validator/inputs" + "github.com/offchainlabs/nitro/validator/server_api" + "github.com/offchainlabs/nitro/validator/server_common" + "github.com/offchainlabs/nitro/validator/valnode" + rediscons "github.com/offchainlabs/nitro/validator/valnode/redis" ) type info = *BlockchainTestInfo diff --git a/system_tests/conditionaltx_test.go b/system_tests/conditionaltx_test.go index 286060e666..2d9140ffcd 100644 --- a/system_tests/conditionaltx_test.go +++ b/system_tests/conditionaltx_test.go @@ -21,6 +21,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/execution/gethexec" "github.com/offchainlabs/nitro/solgen/go/mocksgen" ) diff --git a/system_tests/contract_tx_test.go b/system_tests/contract_tx_test.go index c1ef840c43..157028c6c1 100644 --- a/system_tests/contract_tx_test.go +++ b/system_tests/contract_tx_test.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/system_tests/db_conversion_test.go b/system_tests/db_conversion_test.go index aca28262cb..d19629fade 100644 --- a/system_tests/db_conversion_test.go +++ b/system_tests/db_conversion_test.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/trie" + "github.com/offchainlabs/nitro/cmd/dbconv/dbconv" "github.com/offchainlabs/nitro/util/arbmath" ) diff --git a/system_tests/debugapi_test.go b/system_tests/debugapi_test.go index eb2bcd095d..6be79ed4c9 100644 --- a/system_tests/debugapi_test.go +++ b/system_tests/debugapi_test.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/solgen/go/precompilesgen" ) diff --git a/system_tests/delayedinbox_test.go b/system_tests/delayedinbox_test.go index ca3e7b5999..346b0fbc2f 100644 --- a/system_tests/delayedinbox_test.go +++ b/system_tests/delayedinbox_test.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/solgen/go/bridgegen" ) diff --git a/system_tests/estimation_test.go b/system_tests/estimation_test.go index 6285702342..e489b1864e 100644 --- a/system_tests/estimation_test.go +++ b/system_tests/estimation_test.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/eth/gasestimator" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/solgen/go/mocksgen" "github.com/offchainlabs/nitro/solgen/go/node_interfacegen" diff --git a/system_tests/forwarder_test.go b/system_tests/forwarder_test.go index 6a1d1c68d8..843668454d 100644 --- a/system_tests/forwarder_test.go +++ b/system_tests/forwarder_test.go @@ -15,7 +15,9 @@ import ( "time" "github.com/alicebob/miniredis/v2" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/offchainlabs/nitro/arbnode" "github.com/offchainlabs/nitro/util/redisutil" ) diff --git a/system_tests/infra_fee_test.go b/system_tests/infra_fee_test.go index 9366fc204e..2e03eb0815 100644 --- a/system_tests/infra_fee_test.go +++ b/system_tests/infra_fee_test.go @@ -13,6 +13,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbos/l2pricing" "github.com/offchainlabs/nitro/solgen/go/precompilesgen" "github.com/offchainlabs/nitro/util/arbmath" diff --git a/system_tests/initialization_test.go b/system_tests/initialization_test.go index 17e020e6ab..467882c802 100644 --- a/system_tests/initialization_test.go +++ b/system_tests/initialization_test.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/statetransfer" "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/system_tests/log_subscription_test.go b/system_tests/log_subscription_test.go index e4402533a6..4d38ea6e9c 100644 --- a/system_tests/log_subscription_test.go +++ b/system_tests/log_subscription_test.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/solgen/go/precompilesgen" ) diff --git a/system_tests/meaningless_reorg_test.go b/system_tests/meaningless_reorg_test.go index 06a5d3d2b3..350b21a6cf 100644 --- a/system_tests/meaningless_reorg_test.go +++ b/system_tests/meaningless_reorg_test.go @@ -10,6 +10,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/solgen/go/bridgegen" ) diff --git a/system_tests/nodeinterface_test.go b/system_tests/nodeinterface_test.go index 927dc1b630..5c32dcf20f 100644 --- a/system_tests/nodeinterface_test.go +++ b/system_tests/nodeinterface_test.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/solgen/go/node_interfacegen" ) diff --git a/system_tests/outbox_test.go b/system_tests/outbox_test.go index 25c52396f9..ea6dc2be8b 100644 --- a/system_tests/outbox_test.go +++ b/system_tests/outbox_test.go @@ -18,6 +18,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/gethhook" "github.com/offchainlabs/nitro/solgen/go/node_interfacegen" "github.com/offchainlabs/nitro/solgen/go/precompilesgen" diff --git a/system_tests/precompile_doesnt_revert_test.go b/system_tests/precompile_doesnt_revert_test.go index e6751d347d..dca5d6d539 100644 --- a/system_tests/precompile_doesnt_revert_test.go +++ b/system_tests/precompile_doesnt_revert_test.go @@ -14,6 +14,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/l1pricing" "github.com/offchainlabs/nitro/solgen/go/precompilesgen" ) diff --git a/system_tests/precompile_fuzz_test.go b/system_tests/precompile_fuzz_test.go index 8ab133cf58..5d0ecd1785 100644 --- a/system_tests/precompile_fuzz_test.go +++ b/system_tests/precompile_fuzz_test.go @@ -13,6 +13,7 @@ import ( "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos/arbosState" "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbos/burn" diff --git a/system_tests/precompile_test.go b/system_tests/precompile_test.go index 9d5737c249..8821add864 100644 --- a/system_tests/precompile_test.go +++ b/system_tests/precompile_test.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/l1pricing" "github.com/offchainlabs/nitro/solgen/go/mocksgen" diff --git a/system_tests/program_gas_test.go b/system_tests/program_gas_test.go index 10a371532d..e924b224b2 100644 --- a/system_tests/program_gas_test.go +++ b/system_tests/program_gas_test.go @@ -16,6 +16,7 @@ import ( "github.com/ethereum/go-ethereum/eth/tracers/logger" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/execution/gethexec" "github.com/offchainlabs/nitro/solgen/go/mocksgen" diff --git a/system_tests/program_norace_test.go b/system_tests/program_norace_test.go index 56b2046716..b1e5af8395 100644 --- a/system_tests/program_norace_test.go +++ b/system_tests/program_norace_test.go @@ -16,6 +16,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/solgen/go/mocksgen" diff --git a/system_tests/program_recursive_test.go b/system_tests/program_recursive_test.go index e928f9f3aa..ca726c684d 100644 --- a/system_tests/program_recursive_test.go +++ b/system_tests/program_recursive_test.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbnode" "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/solgen/go/mocksgen" diff --git a/system_tests/program_test.go b/system_tests/program_test.go index ea4ccddd03..29cdc14281 100644 --- a/system_tests/program_test.go +++ b/system_tests/program_test.go @@ -30,6 +30,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbcompress" "github.com/offchainlabs/nitro/arbos/programs" "github.com/offchainlabs/nitro/arbos/util" diff --git a/system_tests/pruning_test.go b/system_tests/pruning_test.go index 90ac3c6909..f49ed8ddcf 100644 --- a/system_tests/pruning_test.go +++ b/system_tests/pruning_test.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/trie" + "github.com/offchainlabs/nitro/cmd/conf" "github.com/offchainlabs/nitro/cmd/pruning" "github.com/offchainlabs/nitro/execution/gethexec" diff --git a/system_tests/recreatestate_rpc_test.go b/system_tests/recreatestate_rpc_test.go index 22329a1be5..dc1356347c 100644 --- a/system_tests/recreatestate_rpc_test.go +++ b/system_tests/recreatestate_rpc_test.go @@ -21,6 +21,7 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/trie" + "github.com/offchainlabs/nitro/execution/gethexec" "github.com/offchainlabs/nitro/util" ) diff --git a/system_tests/retryable_test.go b/system_tests/retryable_test.go index 89446e3c4b..af5f8bf57c 100644 --- a/system_tests/retryable_test.go +++ b/system_tests/retryable_test.go @@ -16,13 +16,13 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth/gasestimator" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbnode" "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbos/l2pricing" "github.com/offchainlabs/nitro/arbos/retryables" "github.com/offchainlabs/nitro/arbos/util" - "github.com/offchainlabs/nitro/solgen/go/bridgegen" "github.com/offchainlabs/nitro/solgen/go/mocksgen" "github.com/offchainlabs/nitro/solgen/go/node_interfacegen" diff --git a/system_tests/seq_nonce_test.go b/system_tests/seq_nonce_test.go index c099563e29..7486b8a4ae 100644 --- a/system_tests/seq_nonce_test.go +++ b/system_tests/seq_nonce_test.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" + "github.com/offchainlabs/nitro/util/arbmath" ) diff --git a/system_tests/seq_pause_test.go b/system_tests/seq_pause_test.go index 6ce464d8da..c867a98271 100644 --- a/system_tests/seq_pause_test.go +++ b/system_tests/seq_pause_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/execution/gethexec" ) diff --git a/system_tests/seq_reject_test.go b/system_tests/seq_reject_test.go index 2dbdba6804..6b229b3b63 100644 --- a/system_tests/seq_reject_test.go +++ b/system_tests/seq_reject_test.go @@ -17,6 +17,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/solgen/go/mocksgen" "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/util/colors" diff --git a/system_tests/seqcompensation_test.go b/system_tests/seqcompensation_test.go index 156ced6bfc..41133b8a42 100644 --- a/system_tests/seqcompensation_test.go +++ b/system_tests/seqcompensation_test.go @@ -10,6 +10,7 @@ import ( "time" "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/arbos/l1pricing" ) diff --git a/system_tests/seqfeed_test.go b/system_tests/seqfeed_test.go index 21f0755225..f57f43e621 100644 --- a/system_tests/seqfeed_test.go +++ b/system_tests/seqfeed_test.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbnode" "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbos/l1pricing" diff --git a/system_tests/state_fuzz_test.go b/system_tests/state_fuzz_test.go index c8312350e6..6969a902ab 100644 --- a/system_tests/state_fuzz_test.go +++ b/system_tests/state_fuzz_test.go @@ -20,6 +20,7 @@ import ( "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" + "github.com/offchainlabs/nitro/arbcompress" "github.com/offchainlabs/nitro/arbos" "github.com/offchainlabs/nitro/arbos/arbosState" diff --git a/system_tests/staterecovery_test.go b/system_tests/staterecovery_test.go index 42faee7e0d..d5ed3fcd33 100644 --- a/system_tests/staterecovery_test.go +++ b/system_tests/staterecovery_test.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/trie" + "github.com/offchainlabs/nitro/cmd/conf" "github.com/offchainlabs/nitro/cmd/staterecovery" "github.com/offchainlabs/nitro/execution/gethexec" diff --git a/system_tests/stylus_trace_test.go b/system_tests/stylus_trace_test.go index 52039df460..fe5de21dad 100644 --- a/system_tests/stylus_trace_test.go +++ b/system_tests/stylus_trace_test.go @@ -10,12 +10,14 @@ import ( "math/big" "testing" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth/tracers/logger" - "github.com/holiman/uint256" + "github.com/offchainlabs/nitro/arbos/util" "github.com/offchainlabs/nitro/solgen/go/mocksgen" "github.com/offchainlabs/nitro/solgen/go/precompilesgen" diff --git a/system_tests/stylus_tracer_test.go b/system_tests/stylus_tracer_test.go index 7fda39f04e..b833d7df17 100644 --- a/system_tests/stylus_tracer_test.go +++ b/system_tests/stylus_tracer_test.go @@ -7,9 +7,11 @@ import ( "encoding/binary" "testing" + "github.com/google/go-cmp/cmp" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - "github.com/google/go-cmp/cmp" + "github.com/offchainlabs/nitro/execution/gethexec" "github.com/offchainlabs/nitro/solgen/go/mocksgen" "github.com/offchainlabs/nitro/util/containers" diff --git a/system_tests/test_info.go b/system_tests/test_info.go index 6313e392ca..105d491006 100644 --- a/system_tests/test_info.go +++ b/system_tests/test_info.go @@ -11,16 +11,16 @@ import ( "sync/atomic" "testing" - "github.com/offchainlabs/nitro/arbos/l2pricing" - "github.com/offchainlabs/nitro/util" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + + "github.com/offchainlabs/nitro/arbos/l2pricing" "github.com/offchainlabs/nitro/statetransfer" + "github.com/offchainlabs/nitro/util" ) var simulatedChainID = big.NewInt(1337) diff --git a/system_tests/triedb_race_test.go b/system_tests/triedb_race_test.go index 7828cf386d..78a7258aea 100644 --- a/system_tests/triedb_race_test.go +++ b/system_tests/triedb_race_test.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/system_tests/twonodeslong_test.go b/system_tests/twonodeslong_test.go index 60707b83fb..5791661b16 100644 --- a/system_tests/twonodeslong_test.go +++ b/system_tests/twonodeslong_test.go @@ -14,10 +14,10 @@ import ( "testing" "time" + "github.com/ethereum/go-ethereum/core/types" + "github.com/offchainlabs/nitro/arbos/l2pricing" "github.com/offchainlabs/nitro/arbutil" - - "github.com/ethereum/go-ethereum/core/types" ) func testTwoNodesLong(t *testing.T, dasModeStr string) { diff --git a/system_tests/unsupported_txtypes_test.go b/system_tests/unsupported_txtypes_test.go index a228cb2454..6e92243c85 100644 --- a/system_tests/unsupported_txtypes_test.go +++ b/system_tests/unsupported_txtypes_test.go @@ -13,10 +13,11 @@ import ( "math/big" "testing" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) func TestBlobAndInternalTxsReject(t *testing.T) { diff --git a/system_tests/validation_mock_test.go b/system_tests/validation_mock_test.go index 912b48ea6a..ad19203093 100644 --- a/system_tests/validation_mock_test.go +++ b/system_tests/validation_mock_test.go @@ -13,6 +13,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbnode" "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbutil" @@ -21,11 +22,10 @@ import ( "github.com/offchainlabs/nitro/util/containers" "github.com/offchainlabs/nitro/util/rpcclient" "github.com/offchainlabs/nitro/validator" + validatorclient "github.com/offchainlabs/nitro/validator/client" "github.com/offchainlabs/nitro/validator/server_api" "github.com/offchainlabs/nitro/validator/server_arb" "github.com/offchainlabs/nitro/validator/valnode" - - validatorclient "github.com/offchainlabs/nitro/validator/client" ) type mockSpawner struct { diff --git a/system_tests/wrap_transaction_test.go b/system_tests/wrap_transaction_test.go index 36052fb2db..dd68c25d6a 100644 --- a/system_tests/wrap_transaction_test.go +++ b/system_tests/wrap_transaction_test.go @@ -18,6 +18,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/solgen/go/precompilesgen" "github.com/offchainlabs/nitro/util/headerreader" diff --git a/util/arbmath/bits.go b/util/arbmath/bits.go index 1b91e2755a..501ef9787e 100644 --- a/util/arbmath/bits.go +++ b/util/arbmath/bits.go @@ -6,8 +6,9 @@ package arbmath import ( "encoding/binary" - "github.com/ethereum/go-ethereum/common" "github.com/holiman/uint256" + + "github.com/ethereum/go-ethereum/common" ) type bytes32 = common.Hash diff --git a/util/arbmath/math_test.go b/util/arbmath/math_test.go index 3660f3657e..befa7813e1 100644 --- a/util/arbmath/math_test.go +++ b/util/arbmath/math_test.go @@ -11,6 +11,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/util/contracts/address_verifier.go b/util/contracts/address_verifier.go index eb2f862210..66686e9dc8 100644 --- a/util/contracts/address_verifier.go +++ b/util/contracts/address_verifier.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/solgen/go/bridgegen" ) diff --git a/util/dbutil/dbutil.go b/util/dbutil/dbutil.go index 6573c5742c..28a57025e9 100644 --- a/util/dbutil/dbutil.go +++ b/util/dbutil/dbutil.go @@ -10,9 +10,10 @@ import ( "regexp" "github.com/cockroachdb/pebble" + "github.com/syndtr/goleveldb/leveldb" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb/memorydb" - "github.com/syndtr/goleveldb/leveldb" ) func IsErrNotFound(err error) bool { diff --git a/util/headerreader/blob_client.go b/util/headerreader/blob_client.go index fbdb4335a0..0c92ff2e85 100644 --- a/util/headerreader/blob_client.go +++ b/util/headerreader/blob_client.go @@ -15,16 +15,17 @@ import ( "path" "time" + "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto/kzg4844" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/blobs" "github.com/offchainlabs/nitro/util/jsonapi" "github.com/offchainlabs/nitro/util/pretty" - - "github.com/spf13/pflag" ) type BlobClient struct { diff --git a/util/headerreader/blob_client_test.go b/util/headerreader/blob_client_test.go index 9735899daa..52c22e434a 100644 --- a/util/headerreader/blob_client_test.go +++ b/util/headerreader/blob_client_test.go @@ -11,8 +11,9 @@ import ( "reflect" "testing" - "github.com/offchainlabs/nitro/util/testhelpers" "github.com/r3labs/diff/v3" + + "github.com/offchainlabs/nitro/util/testhelpers" ) func TestSaveBlobsToDisk(t *testing.T) { diff --git a/util/headerreader/header_reader.go b/util/headerreader/header_reader.go index 98f778dee8..f8e3bc6cd6 100644 --- a/util/headerreader/header_reader.go +++ b/util/headerreader/header_reader.go @@ -12,6 +12,8 @@ import ( "sync" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -19,9 +21,9 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/stopwaiter" - flag "github.com/spf13/pflag" ) // A regexp matching "execution reverted" errors returned from the parent chain RPC. diff --git a/util/jsonapi/preimages_test.go b/util/jsonapi/preimages_test.go index 3074a1e698..5b699df5fe 100644 --- a/util/jsonapi/preimages_test.go +++ b/util/jsonapi/preimages_test.go @@ -10,6 +10,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/util/merkletree/merkleAccumulator_test.go b/util/merkletree/merkleAccumulator_test.go index d26f0244d3..95e1862b7a 100644 --- a/util/merkletree/merkleAccumulator_test.go +++ b/util/merkletree/merkleAccumulator_test.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbos/merkleAccumulator" ) diff --git a/util/merkletree/merkleEventProof.go b/util/merkletree/merkleEventProof.go index 130249cc3f..cab85dbefe 100644 --- a/util/merkletree/merkleEventProof.go +++ b/util/merkletree/merkleEventProof.go @@ -5,6 +5,7 @@ package merkletree import ( "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbos/merkleAccumulator" ) diff --git a/util/merkletree/merkleEventProof_test.go b/util/merkletree/merkleEventProof_test.go index 6af8479190..c0c8e777cb 100644 --- a/util/merkletree/merkleEventProof_test.go +++ b/util/merkletree/merkleEventProof_test.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbos/burn" "github.com/offchainlabs/nitro/arbos/merkleAccumulator" "github.com/offchainlabs/nitro/arbos/storage" diff --git a/util/merkletree/merkleTree.go b/util/merkletree/merkleTree.go index fffa9bcabc..9cf7b485d9 100644 --- a/util/merkletree/merkleTree.go +++ b/util/merkletree/merkleTree.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/arbos/util" ) diff --git a/util/redisutil/test_redis.go b/util/redisutil/test_redis.go index 6d493b1546..9cabfc23d6 100644 --- a/util/redisutil/test_redis.go +++ b/util/redisutil/test_redis.go @@ -10,6 +10,7 @@ import ( "testing" "github.com/alicebob/miniredis/v2" + "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/util/rpcclient/rpcclient_test.go b/util/rpcclient/rpcclient_test.go index 1a7da54774..f711747b70 100644 --- a/util/rpcclient/rpcclient_test.go +++ b/util/rpcclient/rpcclient_test.go @@ -9,10 +9,12 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/node" - "github.com/ethereum/go-ethereum/rpc" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" + + "github.com/ethereum/go-ethereum/node" + "github.com/ethereum/go-ethereum/rpc" + "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/util/sharedmetrics/sharedmetrics.go b/util/sharedmetrics/sharedmetrics.go index 9b4b3609bc..1df34d4d54 100644 --- a/util/sharedmetrics/sharedmetrics.go +++ b/util/sharedmetrics/sharedmetrics.go @@ -2,6 +2,7 @@ package sharedmetrics import ( "github.com/ethereum/go-ethereum/metrics" + "github.com/offchainlabs/nitro/arbutil" ) diff --git a/util/signature/sign_verify.go b/util/signature/sign_verify.go index 5ed852bfbc..f222860d8b 100644 --- a/util/signature/sign_verify.go +++ b/util/signature/sign_verify.go @@ -4,9 +4,11 @@ import ( "context" "errors" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/util/contracts" - flag "github.com/spf13/pflag" ) type SignVerify struct { diff --git a/util/stopwaiter/stopwaiter.go b/util/stopwaiter/stopwaiter.go index 1e70e328eb..993768dd85 100644 --- a/util/stopwaiter/stopwaiter.go +++ b/util/stopwaiter/stopwaiter.go @@ -13,6 +13,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/containers" ) diff --git a/util/stopwaiter/stopwaiter_test.go b/util/stopwaiter/stopwaiter_test.go index 5319927887..c561e1f43b 100644 --- a/util/stopwaiter/stopwaiter_test.go +++ b/util/stopwaiter/stopwaiter_test.go @@ -9,6 +9,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/util/testhelpers/testhelpers.go b/util/testhelpers/testhelpers.go index 557d45808a..7f3e63a811 100644 --- a/util/testhelpers/testhelpers.go +++ b/util/testhelpers/testhelpers.go @@ -18,6 +18,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/colors" ) diff --git a/validator/client/redis/producer.go b/validator/client/redis/producer.go index c5726ffe8b..4bfb721f59 100644 --- a/validator/client/redis/producer.go +++ b/validator/client/redis/producer.go @@ -5,10 +5,14 @@ import ( "fmt" "sync/atomic" + "github.com/redis/go-redis/v9" + "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/pubsub" "github.com/offchainlabs/nitro/util/containers" "github.com/offchainlabs/nitro/util/redisutil" @@ -16,8 +20,6 @@ import ( "github.com/offchainlabs/nitro/validator" "github.com/offchainlabs/nitro/validator/server_api" "github.com/offchainlabs/nitro/validator/server_common" - "github.com/redis/go-redis/v9" - "github.com/spf13/pflag" ) type ValidationClientConfig struct { diff --git a/validator/client/validation_client.go b/validator/client/validation_client.go index 934362f00a..0a6555121e 100644 --- a/validator/client/validation_client.go +++ b/validator/client/validation_client.go @@ -11,21 +11,19 @@ import ( "sync/atomic" "time" - "github.com/offchainlabs/nitro/validator" - - "github.com/offchainlabs/nitro/util/containers" - "github.com/offchainlabs/nitro/util/rpcclient" - "github.com/offchainlabs/nitro/util/stopwaiter" - - "github.com/offchainlabs/nitro/validator/server_api" - "github.com/offchainlabs/nitro/validator/server_common" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" + + "github.com/offchainlabs/nitro/util/containers" + "github.com/offchainlabs/nitro/util/rpcclient" + "github.com/offchainlabs/nitro/util/stopwaiter" + "github.com/offchainlabs/nitro/validator" + "github.com/offchainlabs/nitro/validator/server_api" + "github.com/offchainlabs/nitro/validator/server_common" ) type ValidationClient struct { diff --git a/validator/execution_state.go b/validator/execution_state.go index 092fbe2908..b9cea8ec3b 100644 --- a/validator/execution_state.go +++ b/validator/execution_state.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/offchainlabs/nitro/solgen/go/challengegen" "github.com/offchainlabs/nitro/solgen/go/rollupgen" ) diff --git a/validator/interface.go b/validator/interface.go index 9fb831ca0d..bfccaefcfa 100644 --- a/validator/interface.go +++ b/validator/interface.go @@ -5,6 +5,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethdb" + "github.com/offchainlabs/nitro/util/containers" ) diff --git a/validator/server_api/json.go b/validator/server_api/json.go index 8dfbc8446a..f56493cd92 100644 --- a/validator/server_api/json.go +++ b/validator/server_api/json.go @@ -11,9 +11,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethdb" + "github.com/offchainlabs/nitro/arbcompress" "github.com/offchainlabs/nitro/arbutil" - "github.com/offchainlabs/nitro/util/jsonapi" "github.com/offchainlabs/nitro/validator" ) diff --git a/validator/server_arb/execution_run.go b/validator/server_arb/execution_run.go index d29a88d34d..270ace3180 100644 --- a/validator/server_arb/execution_run.go +++ b/validator/server_arb/execution_run.go @@ -11,8 +11,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/containers" "github.com/offchainlabs/nitro/util/stopwaiter" "github.com/offchainlabs/nitro/validator" diff --git a/validator/server_arb/execution_run_test.go b/validator/server_arb/execution_run_test.go index 479db58515..1f8e9625c1 100644 --- a/validator/server_arb/execution_run_test.go +++ b/validator/server_arb/execution_run_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/validator" ) diff --git a/validator/server_arb/machine.go b/validator/server_arb/machine.go index f882fe65a6..c429fa6101 100644 --- a/validator/server_arb/machine.go +++ b/validator/server_arb/machine.go @@ -10,6 +10,7 @@ package server_arb ResolvedPreimage preimageResolverC(size_t context, uint8_t preimageType, const uint8_t* hash); */ import "C" + import ( "context" "errors" @@ -21,6 +22,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/util/containers" diff --git a/validator/server_arb/machine_loader.go b/validator/server_arb/machine_loader.go index 13cf0f2403..8c9d37e174 100644 --- a/validator/server_arb/machine_loader.go +++ b/validator/server_arb/machine_loader.go @@ -4,6 +4,7 @@ import ( "context" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/validator/server_common" ) diff --git a/validator/server_arb/machine_test.go b/validator/server_arb/machine_test.go index e3ffb28b42..008d757889 100644 --- a/validator/server_arb/machine_test.go +++ b/validator/server_arb/machine_test.go @@ -11,6 +11,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/validator/server_arb/mock_machine.go b/validator/server_arb/mock_machine.go index 3cf0f9f771..00512d1d77 100644 --- a/validator/server_arb/mock_machine.go +++ b/validator/server_arb/mock_machine.go @@ -7,6 +7,7 @@ import ( "context" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/validator" ) diff --git a/validator/server_arb/nitro_machine.go b/validator/server_arb/nitro_machine.go index 926b1e8930..a2f7de3153 100644 --- a/validator/server_arb/nitro_machine.go +++ b/validator/server_arb/nitro_machine.go @@ -9,6 +9,7 @@ package server_arb #include */ import "C" + import ( "context" "errors" @@ -19,6 +20,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/validator/server_common" ) diff --git a/validator/server_arb/prover_interface.go b/validator/server_arb/prover_interface.go index 3010d2138d..8479a8aa8f 100644 --- a/validator/server_arb/prover_interface.go +++ b/validator/server_arb/prover_interface.go @@ -22,10 +22,12 @@ void AddToStringList(char** list, int index, char* val) { } */ import "C" + import ( "unsafe" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/validator" ) diff --git a/validator/server_arb/validator_spawner.go b/validator/server_arb/validator_spawner.go index 07971e2ba5..bb7fbcf97d 100644 --- a/validator/server_arb/validator_spawner.go +++ b/validator/server_arb/validator_spawner.go @@ -10,18 +10,18 @@ import ( "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/util/containers" "github.com/offchainlabs/nitro/util/stopwaiter" "github.com/offchainlabs/nitro/validator" "github.com/offchainlabs/nitro/validator/server_common" "github.com/offchainlabs/nitro/validator/valnode/redis" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/rawdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/metrics" ) var arbitratorValidationSteps = metrics.NewRegisteredHistogram("arbitrator/validation/steps", nil, metrics.NewBoundedHistogramSample()) diff --git a/validator/server_common/machine_loader.go b/validator/server_common/machine_loader.go index f4633ebedf..e86589b657 100644 --- a/validator/server_common/machine_loader.go +++ b/validator/server_common/machine_loader.go @@ -5,6 +5,7 @@ import ( "sync" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/util/containers" ) diff --git a/validator/server_common/valrun.go b/validator/server_common/valrun.go index 8486664008..9a2a6cb414 100644 --- a/validator/server_common/valrun.go +++ b/validator/server_common/valrun.go @@ -2,6 +2,7 @@ package server_common import ( "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/util/containers" "github.com/offchainlabs/nitro/validator" ) diff --git a/validator/server_jit/jit_machine.go b/validator/server_jit/jit_machine.go index 0748101277..dc7657441e 100644 --- a/validator/server_jit/jit_machine.go +++ b/validator/server_jit/jit_machine.go @@ -19,6 +19,7 @@ import ( "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" + "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/validator" ) diff --git a/validator/server_jit/machine_loader.go b/validator/server_jit/machine_loader.go index 3d8b01367f..a4ccede324 100644 --- a/validator/server_jit/machine_loader.go +++ b/validator/server_jit/machine_loader.go @@ -10,6 +10,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/offchainlabs/nitro/validator/server_common" ) diff --git a/validator/server_jit/spawner.go b/validator/server_jit/spawner.go index f30b6e181a..91b1e818f0 100644 --- a/validator/server_jit/spawner.go +++ b/validator/server_jit/spawner.go @@ -3,11 +3,12 @@ package server_jit import ( "context" "fmt" - flag "github.com/spf13/pflag" "runtime" "sync/atomic" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" diff --git a/validator/validation_entry.go b/validator/validation_entry.go index 4ec6919d3b..555a4c76c7 100644 --- a/validator/validation_entry.go +++ b/validator/validation_entry.go @@ -3,6 +3,7 @@ package validator import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethdb" + "github.com/offchainlabs/nitro/arbutil" ) diff --git a/validator/valnode/redis/consumer.go b/validator/valnode/redis/consumer.go index 4392a3c91e..93b3eddd3f 100644 --- a/validator/valnode/redis/consumer.go +++ b/validator/valnode/redis/consumer.go @@ -6,14 +6,16 @@ import ( "runtime" "time" + "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/pubsub" "github.com/offchainlabs/nitro/util/redisutil" "github.com/offchainlabs/nitro/util/stopwaiter" "github.com/offchainlabs/nitro/validator" "github.com/offchainlabs/nitro/validator/server_api" - "github.com/spf13/pflag" ) // ValidationServer implements consumer for the requests originated from diff --git a/validator/valnode/redis/consumer_test.go b/validator/valnode/redis/consumer_test.go index 0ebd697f16..595aecc9ca 100644 --- a/validator/valnode/redis/consumer_test.go +++ b/validator/valnode/redis/consumer_test.go @@ -6,6 +6,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/util/redisutil" "github.com/offchainlabs/nitro/util/testhelpers" ) diff --git a/validator/valnode/valnode.go b/validator/valnode/valnode.go index 972e11189d..e2f4f79bef 100644 --- a/validator/valnode/valnode.go +++ b/validator/valnode/valnode.go @@ -3,17 +3,18 @@ package valnode import ( "context" - "github.com/offchainlabs/nitro/validator" + "github.com/spf13/pflag" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" + + "github.com/offchainlabs/nitro/validator" "github.com/offchainlabs/nitro/validator/server_api" "github.com/offchainlabs/nitro/validator/server_arb" "github.com/offchainlabs/nitro/validator/server_common" "github.com/offchainlabs/nitro/validator/server_jit" "github.com/offchainlabs/nitro/validator/valnode/redis" - "github.com/spf13/pflag" ) type WasmConfig struct { diff --git a/wavmio/stub.go b/wavmio/stub.go index 0c82506ff3..01031860e9 100644 --- a/wavmio/stub.go +++ b/wavmio/stub.go @@ -17,6 +17,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbutil" ) diff --git a/wsbroadcastserver/clientconnection.go b/wsbroadcastserver/clientconnection.go index 00ae0f0dcf..2585452db7 100644 --- a/wsbroadcastserver/clientconnection.go +++ b/wsbroadcastserver/clientconnection.go @@ -13,14 +13,15 @@ import ( "sync/atomic" "time" + "github.com/gobwas/ws" + "github.com/gobwas/ws/wsflate" + "github.com/mailru/easygo/netpoll" + "github.com/ethereum/go-ethereum/log" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/broadcaster/backlog" m "github.com/offchainlabs/nitro/broadcaster/message" - - "github.com/gobwas/ws" - "github.com/gobwas/ws/wsflate" - "github.com/mailru/easygo/netpoll" "github.com/offchainlabs/nitro/util/stopwaiter" ) diff --git a/wsbroadcastserver/connectionlimiter.go b/wsbroadcastserver/connectionlimiter.go index e483eb545e..d086fc074e 100644 --- a/wsbroadcastserver/connectionlimiter.go +++ b/wsbroadcastserver/connectionlimiter.go @@ -8,9 +8,10 @@ import ( "sync" "time" + flag "github.com/spf13/pflag" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" - flag "github.com/spf13/pflag" ) var ( diff --git a/wsbroadcastserver/utils.go b/wsbroadcastserver/utils.go index 9df1d7d9ca..1e72915047 100644 --- a/wsbroadcastserver/utils.go +++ b/wsbroadcastserver/utils.go @@ -12,10 +12,11 @@ import ( "strings" "time" - "github.com/ethereum/go-ethereum/log" "github.com/gobwas/ws" "github.com/gobwas/ws/wsflate" "github.com/gobwas/ws/wsutil" + + "github.com/ethereum/go-ethereum/log" ) func init() { diff --git a/wsbroadcastserver/wsbroadcastserver.go b/wsbroadcastserver/wsbroadcastserver.go index ee21cbaae3..da9420a527 100644 --- a/wsbroadcastserver/wsbroadcastserver.go +++ b/wsbroadcastserver/wsbroadcastserver.go @@ -24,6 +24,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" + "github.com/offchainlabs/nitro/arbutil" "github.com/offchainlabs/nitro/broadcaster/backlog" m "github.com/offchainlabs/nitro/broadcaster/message"