Skip to content

MAT-373 Repackage to bor#6

Merged
mankenavenkatesh merged 3 commits into
masterfrom
repackage
Nov 15, 2019
Merged

MAT-373 Repackage to bor#6
mankenavenkatesh merged 3 commits into
masterfrom
repackage

Conversation

@jdkanani
Copy link
Copy Markdown
Contributor

No description provided.

@linear
Copy link
Copy Markdown

linear Bot commented Nov 12, 2019

@mankenavenkatesh mankenavenkatesh merged commit 455b93a into master Nov 15, 2019
@jdkanani jdkanani deleted the repackage branch November 18, 2019 06:58
jdkanani pushed a commit that referenced this pull request Mar 9, 2021
* internal/build: implement signify's signing func
* Add signify to the ci utility
* fix output file format
* Add unit test for signify
* holiman's + travis' feedback
* internal/build: verify signify's output
* crypto: move signify to common dir
* use go-minisign to verify binaries
* more holiman feedback
* crypto, ci: support minisign output
* only accept one-line trusted comments
* configurable untrusted comments
* code cleanup in tests
* revert to use ed25519 from the stdlib
* bug: fix for empty untrusted comments
* write timestamp as comment if trusted comment isn't present
* rename line checker to commentHasManyLines
* crypto: added signify fuzzer (#6)
* crypto: added signify fuzzer
* stuff
* crypto: updated signify fuzzer to fuzz comments
* crypto: repro signify crashes
* rebased fuzzer on build-signify branch
* hide fuzzer behind gofuzz build flag
* extract key data inside a single function
* don't treat \r as a newline
* travis: fix signing command line
* do not use an external binary in tests
* crypto: move signify to crypto/signify
* travis: fix formatting issue
* ci: fix linter build after package move

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
@claude claude Bot mentioned this pull request Jan 27, 2026
16 tasks
@claude claude Bot mentioned this pull request Apr 29, 2026
18 tasks
cffls added a commit to cffls/bor that referenced this pull request May 1, 2026
…rnal review

An external reviewer found six issues in V2's correctness/operability
surface. Fixes for each, plus targeted regression tests.

#1 (CRITICAL) — V2 swallowed ApplyMessage errors. applyMessage at
core/parallel_state_processor.go:735 ignored execErr when result==nil,
so a tx with a consensus-level error (bad nonce, intrinsic gas under-
flow, insufficient upfront gas, blob fork-gating violation, etc.)
settled as a zero-gas successful no-op. Serial returns the error and
aborts the block (state_processor.go:222). V2 now records execErr on
the PDB, the settle path skips the tx, and Process surfaces the error
to BlockChain so it can fall back to serial — same behaviour as the
panicked-PDB path. Test: TestV2StateProcessor_ApplyMessageErrorFailsBlock.

#2 (CRITICAL) — SelfDestruct not published to MVStore. FlushToMVStore
wrote nonces, storage, code, created, balance deltas, but never the
destructed set. Cross-tx readers saw destroyed accounts as still alive
with stale code/storage/nonce. Pre-EIP-6780 chains: tx B reading a
just-destroyed account got base-state values; SetStorageDirectWithOrigins
at settle time would resurrect the account. Fix: publish destructions
under SuicidePath (the same flag V1 already uses on its MVHashMap), and
gate Exist/GetCode/GetCodeHash/GetState/GetCommittedState/GetNonce on
priorDestructed so cross-tx reads return defaults. priorDestructed is
cached per-tx so the four getters share one MVStore lookup per address.
Test: TestPDB_CrossTxSelfDestructVisibility.

#3 (HIGH) — V2 receipts had zero BlockHash. buildV2Receipt didn't set
BlockHash and passed common.Hash{} to GetLogs. Receipt-trie consensus
was unaffected (BlockHash is not in the consensus encoding) but RPC
consumers got 0x000…0 for blockHash on V2-processed blocks. Thread
block.Hash() through ExecuteV2BlockSTM → newV2SettleFn → buildV2Receipt
and into GetLogs. Test: TestV2StateProcessor_ReceiptHasBlockHash.

#4 (HIGH) — V2 executor ignored cancellation. core/blockstm/v2_executor.go
had no context plumbing, so when serial won the parallel-vs-serial
race and BlockChain called cancel(), V2 ran to completion (~50–200ms)
before the import could continue; if V2 hung, the import couldn't
return. Add ctx.Context to ExecuteV2BlockSTM, plumb it through to the
dispatcher and validation loop, check at task-boundary and validation
boundaries. Updated the misleading "<1ms" comment in blockchain.go.
Test: TestExecuteV2BlockSTM_HonoursCancellation.

#5 (MEDIUM) — numWorkers <= 0 deadlocked the executor. The dispatcher
window collapsed to 0 and the very first task waited forever on an
execDone channel no worker would close (v2_executor.go:355). Clamp
to runtime.NumCPU() in NewV2StateProcessor with a comment explaining
the failure mode. Test: TestNewV2StateProcessor_ClampsNumWorkers.

0xPolygon#6 (LOW, comment-only) — Biased pathdb cache lock removal. The Has →
Set race exists but is benign because reader.Node hash-checks every
cache hit (Verkle-only noHashCheck doesn't apply to Bor). The previous
comment claimed "self-corrects on the next disk read" — actually it
self-corrects via the hash check in reader.go:72. Tightened the
comment.

Verified: ./core/, ./core/state/, ./core/blockstm/ tests pass; the V2
backbone TestV2BlockSTMAllBlocks passes (165s).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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