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

fix(submission): fix counting and time #969

Merged
merged 78 commits into from
Jul 22, 2024

Conversation

danwt
Copy link
Contributor

@danwt danwt commented Jul 18, 2024

PR Standards

Opening a pull request should be able to meet the following requirements

--

PR naming convention: https://hackmd.io/@nZpxHZ0CT7O5ngTp0TP9mg/HJP_jrm7A


Close #963, #968, #973

<-- Briefly describe the content of this pull request -->

For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • confirmed all author checklist items have been addressed

After reviewer approval:

  • In case targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@@ -139,10 +133,10 @@
return nil, nil, fmt.Errorf("load block: height: %d: %w: %w", newHeight, err, ErrNonRecoverable)
} else {
// limit to the max block data, so we don't create a block that is too big to fit in a batch
maxBlockDataSize := uint64(float64(m.Conf.BlockBatchMaxSizeBytes) * types.MaxBlockSizeAdjustment)
maxBlockDataSize := uint64(float64(m.Conf.BatchMaxSizeBytes) * types.MaxBlockSizeAdjustment)

Check notice

Code scanning / CodeQL

Floating point arithmetic Note

Floating point arithmetic operations are not associative and a possible source of non-determinism
Comment on lines +181 to +184
go func() {
err := eg.Wait()
m.logger.Info("Block manager err group finished.", "err", err)
}()

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
uevent.MustPublish(ctx, m.Pubsub, evt, events.HealthStatusList)

m.logger.Info("Resumed block production.")
timeLastSubmission = time.Now()

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
@danwt danwt marked this pull request as ready for review July 19, 2024 15:51
@danwt danwt requested a review from zale144 July 19, 2024 15:53
utils/channel/funcs.go Show resolved Hide resolved
utils/event/funcs.go Outdated Show resolved Hide resolved
block/submit.go Outdated Show resolved Hide resolved
block/submit.go Show resolved Hide resolved
block/submit.go Outdated Show resolved Hide resolved
block/manager.go Outdated Show resolved Hide resolved
block/submit.go Show resolved Hide resolved
block/submit.go Outdated Show resolved Hide resolved
block/submit.go Outdated Show resolved Hide resolved
block/submit.go Outdated Show resolved Hide resolved
block/submit.go Outdated Show resolved Hide resolved
block/submit.go Show resolved Hide resolved
block/submit.go Outdated Show resolved Hide resolved
types/batch.go Outdated Show resolved Hide resolved
block/submit.go Show resolved Hide resolved
block/submit.go Show resolved Hide resolved
if err != nil {
return fmt.Errorf("create and submit batch: %w", err)
}
timeLastSubmission = time.Now()

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
@danwt danwt requested review from omritoptix and mtsitrin July 22, 2024 10:08
Comment on lines +162 to +164
go func() {
bytesProducedC <- nBytes
}()

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
@omritoptix omritoptix merged commit 242acb7 into main Jul 22, 2024
6 checks passed
@omritoptix omritoptix deleted the danwt/963-fix-production-loop-0001 branch July 22, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In AccumulatedDataLoop miscounting - do not assume batches are all BlockBatchMaxSizeBytes size
4 participants