Skip to content

Commit

Permalink
op-deployer: Update artifacts url (#12278)
Browse files Browse the repository at this point in the history
* op-deployer: Update artifacts url

* increase estimator multiples

* log transactions
  • Loading branch information
mslipper authored Oct 3, 2024
1 parent a83c375 commit f538497
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
10 changes: 5 additions & 5 deletions op-chain-ops/deployer/broadcaster/gas_estimator.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import (
)

var (
// baseFeePadFactor = 20% as a divisor
baseFeePadFactor = big.NewInt(5)
// tipMulFactor = 10 as a multiplier
tipMulFactor = big.NewInt(10)
// baseFeePadFactor = 50% as a divisor
baseFeePadFactor = big.NewInt(2)
// tipMulFactor = 20 as a multiplier
tipMulFactor = big.NewInt(20)
// dummyBlobFee is a dummy value for the blob fee. Since this gas estimator will never
// post blobs, it's just set to 1.
dummyBlobFee = big.NewInt(1)
)

// DeployerGasPriceEstimator is a custom gas price estimator for use with op-deployer.
// It pads the base fee by 20% and multiplies the suggested tip by 10.
// It pads the base fee by 50% and multiplies the suggested tip by 20.
func DeployerGasPriceEstimator(ctx context.Context, client txmgr.ETHBackend) (*big.Int, *big.Int, *big.Int, error) {
chainHead, err := client.HeaderByNumber(ctx, nil)
if err != nil {
Expand Down
18 changes: 6 additions & 12 deletions op-chain-ops/deployer/broadcaster/keyed.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ type KeyedBroadcaster struct {
}

type KeyedBroadcasterOpts struct {
Logger log.Logger
ChainID *big.Int
Client *ethclient.Client
Signer opcrypto.SignerFn
From common.Address
TXManagerLogger log.Logger
Logger log.Logger
ChainID *big.Int
Client *ethclient.Client
Signer opcrypto.SignerFn
From common.Address
}

func NewKeyedBroadcaster(cfg KeyedBroadcasterOpts) (*KeyedBroadcaster, error) {
Expand Down Expand Up @@ -70,14 +69,9 @@ func NewKeyedBroadcaster(cfg KeyedBroadcasterOpts) (*KeyedBroadcaster, error) {
mgrCfg.MinTipCap.Store(minTipCap)
mgrCfg.MinBaseFee.Store(minBaseFee)

txmLogger := log.NewLogger(log.DiscardHandler())
if cfg.TXManagerLogger != nil {
txmLogger = cfg.TXManagerLogger
}

mgr, err := txmgr.NewSimpleTxManagerFromConfig(
"transactor",
txmLogger,
cfg.Logger,
&metrics.NoopTxMetrics{},
mgrCfg,
)
Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/deployer/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/urfave/cli/v2"
)

var V160ArtifactsURL = state.MustParseArtifactsURL("https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-155f65e7dcbea1b7b3d37a0fc39cc8b6a1c03b6c5b677886ca2420e10e9c1ea6.tar.gz")
var V160ArtifactsURL = state.MustParseArtifactsURL("https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-ee07c78c3d8d4cd8f7a933c050f5afeebaa281b57b226cc6f092b19de2a8d61f.tar.gz")

type InitConfig struct {
L1ChainID uint64
Expand Down

0 comments on commit f538497

Please sign in to comment.