Skip to content

Conversation

@blindchaser
Copy link
Contributor

Describe your changes and provide context

Testing performed to validate your change

import (
"errors"
"fmt"
"runtime"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
"fmt"
"runtime"
"sync"
"unsafe"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
}

if calcRoot {
rootStart := time.Now()

Check warning

Code scanning / CodeQL

Calling the system time Warning test

Calling the system time may be a possible source of non-determinism
fmt.Printf("Applied %d entries in %s (%.2f K entries/s) across %d blocks (%.2f blocks/s). Root time: %s\n",
totalEntries,
applyDur,
float64(totalEntries)/applyDur.Seconds()/1000.0,

Check notice

Code scanning / CodeQL

Floating point arithmetic Note test

Floating point arithmetic operations are not associative and a possible source of non-determinism
fmt.Printf("Applied %d entries in %s (%.2f K entries/s) across %d blocks (%.2f blocks/s). Root time: %s\n",
totalEntries,
applyDur,
float64(totalEntries)/applyDur.Seconds()/1000.0,

Check notice

Code scanning / CodeQL

Floating point arithmetic Note test

Floating point arithmetic operations are not associative and a possible source of non-determinism
applyDur,
float64(totalEntries)/applyDur.Seconds()/1000.0,
blocks,
float64(blocks)/applyDur.Seconds(),

Check notice

Code scanning / CodeQL

Floating point arithmetic Note test

Floating point arithmetic operations are not associative and a possible source of non-determinism
func generateSyntheticKVs(n int, keySize int, valueSize int, seed int64) []utils.KeyValuePair {
out := make([]utils.KeyValuePair, n)
// Use math/rand for speed; seed optionally deterministic
r := mrand.New(mrand.NewSource(time.Now().UnixNano()))

Check warning

Code scanning / CodeQL

Calling the system time Warning test

Calling the system time may be a possible source of non-determinism
@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 57.83620% with 417 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.23%. Comparing base (4a62f83) to head (461f0a5).

Files with missing lines Patch % Lines
tools/cmd/seidb/benchmark/universal_accumulator.go 0.00% 132 Missing ⚠️
sc/universal_accumulator/engine.go 68.69% 57 Missing and 20 partials ⚠️
sc/universal_accumulator/snapshot.go 72.89% 41 Missing and 17 partials ⚠️
sc/universal_accumulator/proof.go 47.52% 36 Missing and 17 partials ⚠️
sc/universal_accumulator/client.go 66.01% 39 Missing and 13 partials ⚠️
sc/universal_accumulator/cgo_bridge.go 66.25% 18 Missing and 9 partials ⚠️
sc/universal_accumulator/witness.go 75.00% 10 Missing and 5 partials ⚠️
tools/utils/utils.go 0.00% 2 Missing ⚠️
tools/cmd/seidb/main.go 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (57.83%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project check has failed because the head coverage (57.23%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
- Coverage   63.60%   57.23%   -6.38%     
==========================================
  Files          28       59      +31     
  Lines        4047     7681    +3634     
==========================================
+ Hits         2574     4396    +1822     
- Misses       1173     2897    +1724     
- Partials      300      388      +88     
Files with missing lines Coverage Δ
sc/memiavl/filelock.go 53.84% <ø> (ø)
ss/pebbledb/db.go 57.26% <ø> (ø)
tools/cmd/seidb/main.go 0.00% <0.00%> (ø)
tools/utils/utils.go 0.00% <0.00%> (ø)
sc/universal_accumulator/witness.go 75.00% <75.00%> (ø)
sc/universal_accumulator/cgo_bridge.go 66.25% <66.25%> (ø)
sc/universal_accumulator/client.go 66.01% <66.01%> (ø)
sc/universal_accumulator/proof.go 47.52% <47.52%> (ø)
sc/universal_accumulator/snapshot.go 72.89% <72.89%> (ø)
sc/universal_accumulator/engine.go 68.69% <68.69%> (ø)
... and 1 more

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

func RandomShuffle(kvPairs []KeyValuePair) {
rand.Seed(time.Now().UnixNano())
rand.Shuffle(len(kvPairs), func(i, j int) {
r := rand.New(rand.NewSource(time.Now().UnixNano()))

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
@blindchaser blindchaser force-pushed the yiren/universal-acc branch 5 times, most recently from 2499be1 to 6ad357c Compare August 27, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants