Skip to content
Open
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
2 changes: 1 addition & 1 deletion arbnode/seq_coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func (c *SeqCoordinator) deleteFinalizedMsgsFromRedis(ctx context.Context, final
deleteMsgsAndUpdateFinalizedMsgCount := func(keys []string) error {
if len(keys) > 0 {
// To support cases during init we delete keys from reverse (i.e lowest seq num first), so that even if deletion fails in one of the iterations
// next time deleteFinalizedMsgsFromRedis is called we dont miss undeleted messages, as exists is checked from higher seqnum to lower.
// next time deleteFinalizedMsgsFromRedis is called we don't miss undeleted messages, as exists is checked from higher seqnum to lower.
// In non-init cases it doesn't matter how we delete as we always try to delete from prevFinalized to finalized
batchDeleteCount := 1000
for i := len(keys); i > 0; i -= batchDeleteCount {
Expand Down
2 changes: 1 addition & 1 deletion arbos/programs/wasmstorehelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (p Programs) SaveActiveProgramToWasmStore(statedb *state.StateDB, codeHash
zeroGas := uint64(0)

// We know program is activated, so it must be in correct version and not use too much memory
// Empty program address is supplied because we dont have access to this during rebuilding of wasm store
// Empty program address is supplied because we don't have access to this during rebuilding of wasm store
moduleActivationMandatory := false
// recompile only missing targets
info, asmMap, err := activateProgramInternal(common.Address{}, codeHash, wasm, progParams.PageLimit, program.version, zeroArbosVersion, debugMode, &zeroGas, missingTargets, moduleActivationMandatory, GetAllowFallback())
Expand Down
2 changes: 1 addition & 1 deletion cmd/genericconf/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ type AuthRPCConfig struct {
func (a AuthRPCConfig) Apply(stackConf *node.Config) {
stackConf.AuthAddr = a.Addr
stackConf.AuthPort = a.Port
stackConf.AuthVirtualHosts = []string{} // dont allow http access
stackConf.AuthVirtualHosts = []string{} // don't allow http access
stackConf.JWTSecret = a.JwtSecret
stackConf.AuthModules = a.API
stackConf.AuthOrigins = a.Origins
Expand Down
2 changes: 1 addition & 1 deletion system_tests/bold_new_challenge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (s *incorrectBlockStateProvider) CollectMachineHashes(
honestHashes = append(honestHashes, s.evilMachineHash)
}
} else if uint64(cfg.BlockChallengeHeight) >= s.wrongAtBlockHeight {
panic(fmt.Sprintf("challenge occured at block height %v at or after wrongAtBlockHeight %v", cfg.BlockChallengeHeight, s.wrongAtBlockHeight))
panic(fmt.Sprintf("challenge occurred at block height %v at or after wrongAtBlockHeight %v", cfg.BlockChallengeHeight, s.wrongAtBlockHeight))
}
return honestHashes, nil
}
Expand Down
2 changes: 1 addition & 1 deletion system_tests/message_extraction_layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ func TestMessageExtractionLayer_TxStreamerHandleReorg(t *testing.T) {
// * Post a batch with L2 txs- this would include delayed message read corresponding to the index containing
// eth deposit tx- as that delayed message was sequenced
// * MEL will add the right delayed message at the corresponding index and send those txs to txStreamer
// * TxStreamer would detect a reorg as the previous delayed message's bytes wont match the new one's
// * TxStreamer would detect a reorg as the previous delayed message's bytes won't match the new one's
// * We verify that TxStreamer detected reorg
// * Later we verify that the balance is as expected since the eth deposit tx should be successful

Expand Down
22 changes: 11 additions & 11 deletions system_tests/program_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ func TestStylusPrecompileMethodsSimple(t *testing.T) {
ed, err := arbWasm.ExpiryDays(nil)
Require(t, err)
if ed != expectedExpiryDays {
t.Errorf("ExpiryDays from arbWasm precompile didnt match the value set by arbowner. have: %d, want: %d", ed, expectedExpiryDays)
t.Errorf("ExpiryDays from arbWasm precompile didn't match the value set by arbowner. have: %d, want: %d", ed, expectedExpiryDays)
}
ptl, err := arbWasm.ProgramTimeLeft(nil, programAddress)
Require(t, err)
Expand All @@ -1351,42 +1351,42 @@ func TestStylusPrecompileMethodsSimple(t *testing.T) {
bcs, err := arbWasm.BlockCacheSize(nil)
Require(t, err)
if bcs != 100 {
t.Errorf("BlockCacheSize from arbWasm precompile didnt match the value set by arbowner. have: %d, want: %d", bcs, 100)
t.Errorf("BlockCacheSize from arbWasm precompile didn't match the value set by arbowner. have: %d, want: %d", bcs, 100)
}

ensure(arbOwner.SetWasmFreePages(&ownerAuth, 3))
fp, err := arbWasm.FreePages(nil)
Require(t, err)
if fp != 3 {
t.Errorf("FreePages from arbWasm precompile didnt match the value set by arbowner. have: %d, want: %d", fp, 3)
t.Errorf("FreePages from arbWasm precompile didn't match the value set by arbowner. have: %d, want: %d", fp, 3)
}

ensure(arbOwner.SetWasmInitCostScalar(&ownerAuth, uint64(4)))
ics, err := arbWasm.InitCostScalar(nil)
Require(t, err)
if ics != uint64(4) {
t.Errorf("InitCostScalar from arbWasm precompile didnt match the value set by arbowner. have: %d, want: %d", ics, 4)
t.Errorf("InitCostScalar from arbWasm precompile didn't match the value set by arbowner. have: %d, want: %d", ics, 4)
}

ensure(arbOwner.SetInkPrice(&ownerAuth, uint32(5)))
ip, err := arbWasm.InkPrice(nil)
Require(t, err)
if ip != uint32(5) {
t.Errorf("InkPrice from arbWasm precompile didnt match the value set by arbowner. have: %d, want: %d", ip, 5)
t.Errorf("InkPrice from arbWasm precompile didn't match the value set by arbowner. have: %d, want: %d", ip, 5)
}

ensure(arbOwner.SetWasmKeepaliveDays(&ownerAuth, 0))
kad, err := arbWasm.KeepaliveDays(nil)
Require(t, err)
if kad != 0 {
t.Errorf("KeepaliveDays from arbWasm precompile didnt match the value set by arbowner. have: %d, want: 0", kad)
t.Errorf("KeepaliveDays from arbWasm precompile didn't match the value set by arbowner. have: %d, want: 0", kad)
}

ensure(arbOwner.SetWasmMaxStackDepth(&ownerAuth, uint32(6)))
msd, err := arbWasm.MaxStackDepth(nil)
Require(t, err)
if msd != uint32(6) {
t.Errorf("MaxStackDepth from arbWasm precompile didnt match the value set by arbowner. have: %d, want: %d", msd, 6)
t.Errorf("MaxStackDepth from arbWasm precompile didn't match the value set by arbowner. have: %d, want: %d", msd, 6)
}

// Setting low values of gas and cached parameters ensures when MinInitGas is called on ArbWasm precompile,
Expand All @@ -1395,24 +1395,24 @@ func TestStylusPrecompileMethodsSimple(t *testing.T) {
mig, err := arbWasm.MinInitGas(nil)
Require(t, err)
if mig.Gas != programs.MinInitGasUnits {
t.Errorf("MinInitGas from arbWasm precompile didnt match the Gas value set by arbowner. have: %d, want: %d", mig.Gas, programs.MinInitGasUnits)
t.Errorf("MinInitGas from arbWasm precompile didn't match the Gas value set by arbowner. have: %d, want: %d", mig.Gas, programs.MinInitGasUnits)
}
if mig.Cached != programs.MinCachedGasUnits {
t.Errorf("MinInitGas from arbWasm precompile didnt match the Cached value set by arbowner. have: %d, want: %d", mig.Cached, programs.MinCachedGasUnits)
t.Errorf("MinInitGas from arbWasm precompile didn't match the Cached value set by arbowner. have: %d, want: %d", mig.Cached, programs.MinCachedGasUnits)
}

ensure(arbOwner.SetWasmPageGas(&ownerAuth, 7))
pg, err := arbWasm.PageGas(nil)
Require(t, err)
if pg != 7 {
t.Errorf("PageGas from arbWasm precompile didnt match the value set by arbowner. have: %d, want: %d", pg, 7)
t.Errorf("PageGas from arbWasm precompile didn't match the value set by arbowner. have: %d, want: %d", pg, 7)
}

ensure(arbOwner.SetWasmPageLimit(&ownerAuth, 8))
pl, err := arbWasm.PageLimit(nil)
Require(t, err)
if pl != 8 {
t.Errorf("PageLimit from arbWasm precompile didnt match the value set by arbowner. have: %d, want: %d", pl, 8)
t.Errorf("PageLimit from arbWasm precompile didn't match the value set by arbowner. have: %d, want: %d", pl, 8)
}

// pageramp currently is initialPageRamp = 620674314 value in programs package
Expand Down
2 changes: 1 addition & 1 deletion system_tests/timeboost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ func TestTimeboostExpressLaneTransactionHandling(t *testing.T) {
t.Fatalf("unexpected error string returned: %s", failErr.Error())
}
}
checkFailErr("context deadline exceeded") // tx will be rejected with nonce too high error so wont appear in a block
checkFailErr("context deadline exceeded") // tx will be rejected with nonce too high error so won't appear in a block

wg.Add(1)
go func(w *sync.WaitGroup) {
Expand Down
Loading