Skip to content

Commit

Permalink
Update espresso dev node docker file (#366)
Browse files Browse the repository at this point in the history
* Update espresso dev node docker file

* Remove unnecessary directory

* Remove unnecessary changes
  • Loading branch information
ImJeremyHe authored Dec 9, 2024
1 parent 0db72e5 commit bf99cff
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 363 deletions.
1 change: 1 addition & 0 deletions arbnode/inbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func NewTransactionStreamerForTest(t *testing.T, ownerAddress common.Address) (*
chainDb := rawdb.NewMemoryDatabase()
arbDb := rawdb.NewMemoryDatabase()
initReader := statetransfer.NewMemoryInitDataReader(&initData)

cacheConfig := core.DefaultCacheConfigWithScheme(env.GetTestStateScheme())
bc, err := gethexec.WriteOrTestBlockChain(chainDb, cacheConfig, initReader, chainConfig, arbostypes.TestInitMessage, gethexec.ConfigDefault.TxLookupLimit, 0)

Expand Down
3 changes: 0 additions & 3 deletions arbos/block_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ var L2ToL1TxEventID common.Hash
var EmitReedeemScheduledEvent func(*vm.EVM, uint64, uint64, [32]byte, [32]byte, common.Address, *big.Int, *big.Int) error
var EmitTicketCreatedEvent func(*vm.EVM, [32]byte) error

const NOT_EXPECTED_BUILDER_ERROR string = "This transaction is part of a block not built by the desired builder"

// A helper struct that implements String() by marshalling to JSON.
// This is useful for logging because it's lazy, so if the log level is too high to print the transaction,
// it doesn't waste compute marshalling the transaction when the result wouldn't be used.
Expand Down Expand Up @@ -154,7 +152,6 @@ func ProduceBlock(
}

hooks := NoopSequencingHooks()

return ProduceBlockAdvanced(
message.Header, txes, delayedMessagesRead, lastBlockHeader, statedb, chainContext, chainConfig, hooks, isMsgForPrefetch,
)
Expand Down
1 change: 0 additions & 1 deletion cmd/replay/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ func main() {
message := readMessage()

chainContext := WavmChainContext{}

newBlock, _, err = arbos.ProduceBlock(message.Message, message.DelayedMessagesRead, lastBlockHeader, statedb, chainContext, chainConfig, false)
if err != nil {
panic(err)
Expand Down
1 change: 0 additions & 1 deletion config/jwt.hex

This file was deleted.

49 changes: 0 additions & 49 deletions config/l2_chain_info.json

This file was deleted.

77 changes: 0 additions & 77 deletions config/sequencer_config.json

This file was deleted.

1 change: 0 additions & 1 deletion config/val_jwt.hex

This file was deleted.

19 changes: 0 additions & 19 deletions config/validation_node_config.json

This file was deleted.

84 changes: 0 additions & 84 deletions config/validator_config.json

This file was deleted.

2 changes: 0 additions & 2 deletions execution/gethexec/executionengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ func (s *ExecutionEngine) NextDelayedMessageNumber() (uint64, error) {

func MessageFromTxes(header *arbostypes.L1IncomingMessageHeader, txes types.Transactions, txErrors []error) (*arbostypes.L1IncomingMessage, error) {
var l2Message []byte

if len(txes) == 1 && txErrors[0] == nil {
txBytes, err := txes[0].MarshalBinary()
if err != nil {
Expand Down Expand Up @@ -474,7 +473,6 @@ func (s *ExecutionEngine) sequencerWrapper(sequencerFunc func() (*types.Block, e
attempts := 0
for {
s.createBlocksMutex.Lock()
log.Info("locking block mutex, attempting to sequence transactions")
block, err := sequencerFunc()
s.createBlocksMutex.Unlock()
if !errors.Is(err, execution.ErrSequencerInsertLockTaken) {
Expand Down
3 changes: 1 addition & 2 deletions execution/gethexec/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"github.com/ethereum/go-ethereum/params"
"reflect"
"sort"
"sync/atomic"
Expand All @@ -20,6 +19,7 @@ import (
"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/ethereum/go-ethereum/rpc"
"github.com/offchainlabs/nitro/arbos/arbostypes"
"github.com/offchainlabs/nitro/arbos/programs"
Expand Down Expand Up @@ -395,7 +395,6 @@ func (n *ExecutionNode) StopAndWait() {
if n.TxPublisher.Started() {
n.TxPublisher.StopAndWait()
}

n.Recorder.OrderlyShutdown()
if n.ParentChainReader != nil && n.ParentChainReader.Started() {
n.ParentChainReader.StopAndWait()
Expand Down
15 changes: 15 additions & 0 deletions execution/gethexec/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"math"
"math/big"
"runtime/debug"
"strconv"
"sync"
"sync/atomic"
"time"
Expand Down Expand Up @@ -93,6 +94,20 @@ func (c *SequencerConfig) Validate() error {
return fmt.Errorf("sequencer sender whitelist entry \"%v\" is not a valid address", address)
}
}
var err error
if c.ExpectedSurplusSoftThreshold != "default" {
if c.expectedSurplusSoftThreshold, err = strconv.Atoi(c.ExpectedSurplusSoftThreshold); err != nil {
return fmt.Errorf("invalid expected-surplus-soft-threshold value provided in batchposter config %w", err)
}
}
if c.ExpectedSurplusHardThreshold != "default" {
if c.expectedSurplusHardThreshold, err = strconv.Atoi(c.ExpectedSurplusHardThreshold); err != nil {
return fmt.Errorf("invalid expected-surplus-hard-threshold value provided in batchposter config %w", err)
}
}
if c.expectedSurplusSoftThreshold < c.expectedSurplusHardThreshold {
return errors.New("expected-surplus-soft-threshold cannot be lower than expected-surplus-hard-threshold")
}
if c.MaxTxDataSize > arbostypes.MaxL2MessageSize-50000 {
return errors.New("max-tx-data-size too large for MaxL2MessageSize")
}
Expand Down
1 change: 0 additions & 1 deletion system_tests/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ func (b *NodeBuilder) CheckConfig(t *testing.T) {
}

func (b *NodeBuilder) BuildL1(t *testing.T) {
log.Info("Building L1")
b.L1 = NewTestClient(b.ctx)
var l1StackConfig *node.Config
if b.useL1StackConfig {
Expand Down
7 changes: 7 additions & 0 deletions system_tests/espresso-e2e/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ services:
- ESPRESSO_SEQUENCER_API_PORT
- ESPRESSO_SEQUENCER_ETH_MNEMONIC
- ESPRESSO_SEQUENCER_L1_PROVIDER
- ESPRESSO_SEQUENCER_DATABASE_MAX_CONNECTIONS=25
- ESPRESSO_SEQUENCER_STORAGE_PATH=/data/espresso
- RUST_LOG=info
- RUST_LOG_FORMAT
volumes:
- espresso_storage:/data/espresso
extra_hosts:
- "host.docker.internal:host-gateway"

volumes:
espresso_storage:
Loading

0 comments on commit bf99cff

Please sign in to comment.