Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commented out MaxInputSize checks #190

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions op-batcher/batcher/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ func (bs *BatcherService) initChannelConfig(cfg *CLIConfig) error {
return fmt.Errorf("unknown data availability type: %v", cfg.DataAvailabilityType)
}

if bs.UsePlasma && cc.MaxFrameSize > plasma.MaxInputSize {
return fmt.Errorf("max frame size %d exceeds plasma max input size %d", cc.MaxFrameSize, plasma.MaxInputSize)
}
// if bs.UsePlasma && cc.MaxFrameSize > plasma.MaxInputSize {
// return fmt.Errorf("max frame size %d exceeds plasma max input size %d", cc.MaxFrameSize, plasma.MaxInputSize)
// }

cc.InitCompressorConfig(cfg.ApproxComprRatio, cfg.Compressor, cfg.CompressionAlgo)

Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/cmd/celo-migrate/ancients.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func migrateAncientsDb(oldDBPath, newDBPath string, batchSize, bufferSize uint64
return numAncientsNewBefore, numAncientsNewBefore, nil
}

log.Info("Ancient Block Migration Started", "process", "ancients", "startBlock", numAncientsNewBefore, "endBlock", numAncientsOld, "count", numAncientsOld-numAncientsNewBefore, "step", batchSize)
log.Info("Ancient Block Migration Started", "process", "ancients", "startBlock", numAncientsNewBefore, "endBlock", numAncientsOld-1, "count", numAncientsOld-numAncientsNewBefore, "step", batchSize)

g, ctx := errgroup.WithContext(context.Background())
readChan := make(chan RLPBlockRange, bufferSize)
Expand Down
7 changes: 4 additions & 3 deletions op-chain-ops/cmd/celo-migrate/non-ancients.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ func migrateNonAncientsDb(oldDbPath, newDbPath string, numAncients, batchSize ui
// get the last block number
hash := rawdb.ReadHeadHeaderHash(newDB)
lastBlock := *rawdb.ReadHeaderNumber(newDB, hash)
lastAncient := numAncients - 1

log.Info("Non-Ancient Block Migration Started", "process", "non-ancients", "startBlock", numAncients, "endBlock", lastBlock, "count", lastBlock-numAncients, "lastAncientBlock", numAncients)
log.Info("Non-Ancient Block Migration Started", "process", "non-ancients", "startBlock", numAncients, "endBlock", lastBlock, "count", lastBlock-lastAncient, "lastAncientBlock", lastAncient)

for i := numAncients; i <= lastBlock; i += batchSize {
numbersHash := rawdb.ReadAllHashesInRange(newDB, i, i+batchSize-1)
Expand Down Expand Up @@ -88,8 +89,8 @@ func migrateNonAncientsDb(oldDbPath, newDbPath string, numAncients, batchSize ui
}
}

if numAncients > 0 {
toBeRemoved := rawdb.ReadAllHashesInRange(newDB, 1, numAncients)
if lastAncient > 0 {
toBeRemoved := rawdb.ReadAllHashesInRange(newDB, 1, lastAncient)
log.Info("Removing frozen blocks", "process", "non-ancients", "count", len(toBeRemoved))
batch := newDB.NewBatch()
for _, numberHash := range toBeRemoved {
Expand Down
3 changes: 2 additions & 1 deletion op-node/rollup/derive/frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (
// Frames cannot be larger than 1 MB.
// Data transactions that carry frames are generally not larger than 128 KB due to L1 network conditions,
// but we leave space to grow larger anyway (gas limit allows for more data).
const MaxFrameLen = 1_000_000
// const MaxFrameLen = 1_000_000
const MaxFrameLen = 2_000_000

// Data Format
//
Expand Down
10 changes: 5 additions & 5 deletions op-node/rollup/derive/plasma_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ func (s *PlasmaDataSource) Next(ctx context.Context) (eth.Data, error) {
return nil, NewTemporaryError(fmt.Errorf("failed to fetch input data with comm %s from da service: %w", s.comm, err))
}
// inputs are limited to a max size to ensure they can be challenged in the DA contract.
if s.comm.CommitmentType() == plasma.Keccak256CommitmentType && len(data) > plasma.MaxInputSize {
s.log.Warn("input data exceeds max size", "size", len(data), "max", plasma.MaxInputSize)
s.comm = nil
return s.Next(ctx)
}
// if s.comm.CommitmentType() == plasma.Keccak256CommitmentType && len(data) > plasma.MaxInputSize {
// s.log.Warn("input data exceeds max size", "size", len(data), "max", plasma.MaxInputSize)
// s.comm = nil
// return s.Next(ctx)
// }
// reset the commitment so we can fetch the next one from the source at the next iteration.
s.comm = nil
return data, nil
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/semver-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
},
"src/universal/OptimismMintableERC20.sol": {
"initCodeHash": "0x9b18a1ae827de2c28d3b4f92d9fc718889f23f37fd973cf07ea31b93b8f71d87",
"sourceCodeHash": "0x9d5be3fd300151aae4722eb2f76c3ab0256adad0f4b8b2dec80bbeb2cd142ca1"
"sourceCodeHash": "0xd6bff526d242cb4f0fee0b22da38e51fa5a1de1896c6a9c332079f993b06b0da"
},
"src/universal/OptimismMintableERC20Factory.sol": {
"initCodeHash": "0xf433cfb2b9a65b29c1dd9b6a724bddd3c7bb64e49273492d5bd52e7cb424c4e2",
Expand Down
Loading
Loading