Fix miner forced-tx deadlock (foundry-rs#14453)#502
Conversation
* ci(tempo): re-enable devnet steps and run testnet on PRs Amp-Thread-ID: https://ampcode.com/threads/T-019dd305-c099-7742-8682-0d22798eaac7 Co-authored-by: Amp <amp@ampcode.com> * disable devnet again, down as part of migration * leave note --------- Co-authored-by: Amp <amp@ampcode.com>
* feat: immutable releases
- Remove mutable tag triggers (stable, rc, rc-*) from release workflow;
only v*.*.* semver tags trigger releases now
- Remove mutable 'nightly' GitHub release overwrite; each nightly gets
its own immutable nightly-{SHA} release only
- Delete move-tag.js; stop force-moving the nightly tag to HEAD
- Docker: stop tagging :nightly and :latest; use immutable
:nightly-{short-sha} and :v*.*.* tags instead
- foundryup: resolve 'latest' and 'nightly' channels via GitHub API
to find the actual immutable release tags
- foundryup: 'stable' is a silent alias for 'latest'
- Simplify prune-prereleases.js filter (no mutable nightly to protect)
- Bump foundryup installer version to 1.8.0
Amp-Thread-ID: https://ampcode.com/threads/T-019dbf9e-5115-77b9-a177-1af9d30af00c
Co-authored-by: Amp <amp@ampcode.com>
* fix: address immutable release gaps
- Docker: derive tags from inputs.tag_name directly, fixing
workflow_call nightly mis-tagging
- Remove release pruning entirely (immutable means permanent)
- Delete prune-prereleases.js and cleanup job from release.yml
- Remove force: true from create-tag.js (invalid for createRef)
Amp-Thread-ID: https://ampcode.com/threads/T-019dbf9e-5115-77b9-a177-1af9d30af00c
Co-authored-by: Amp <amp@ampcode.com>
* fix: use /releases/latest endpoint for stable channel resolution
Avoids pagination issue where 50+ nightlies could push the latest
stable release off the first page of results.
Amp-Thread-ID: https://ampcode.com/threads/T-019dbf9e-5115-77b9-a177-1af9d30af00c
Co-authored-by: Amp <amp@ampcode.com>
* fix: use /releases/latest for latest channel, per_page=10 for nightly
Amp-Thread-ID: https://ampcode.com/threads/T-019dbf9e-5115-77b9-a177-1af9d30af00c
Co-authored-by: Amp <amp@ampcode.com>
* fix: fail on unexpected tag creation errors, exclude drafts from nightly resolution
Amp-Thread-ID: https://ampcode.com/threads/T-019dbf9e-5115-77b9-a177-1af9d30af00c
Co-authored-by: Amp <amp@ampcode.com>
* refactor: remove local variables and temp file from resolve_latest_release
Amp-Thread-ID: https://ampcode.com/threads/T-019dce16-13eb-7218-a42c-ce91ed473f36
Co-authored-by: Amp <amp@ampcode.com>
* refactor: inline release resolution, add fetch helper, improve logging
Amp-Thread-ID: https://ampcode.com/threads/T-019dce16-13eb-7218-a42c-ce91ed473f36
Co-authored-by: Amp <amp@ampcode.com>
* fix: handle pipefail in fetch pipelines for cross-platform compatibility
Amp-Thread-ID: https://ampcode.com/threads/T-019dce16-13eb-7218-a42c-ce91ed473f36
Co-authored-by: Amp <amp@ampcode.com>
* fix: use previous stable tag as changelog fromTag for stable releases
Amp-Thread-ID: https://ampcode.com/threads/T-019dce16-13eb-7218-a42c-ce91ed473f36
Co-authored-by: Amp <amp@ampcode.com>
* fix(docker): keep mutable :latest and :nightly tags following Docker convention
Amp-Thread-ID: https://ampcode.com/threads/T-019dce16-13eb-7218-a42c-ce91ed473f36
Co-authored-by: Amp <amp@ampcode.com>
* fix: use previous nightly tag as changelog fromTag for nightly releases
Amp-Thread-ID: https://ampcode.com/threads/T-019dce16-13eb-7218-a42c-ce91ed473f36
Co-authored-by: Amp <amp@ampcode.com>
* ci(release): adopt draft-first flow for GitHub immutable releases
- prepare creates the GitHub release as a draft up-front (with --verify-tag)
so all matrix jobs upload assets to an existing draft.
- release matrix replaces softprops/action-gh-release with gh release upload
--clobber against the draft.
- nightly releases are auto-published by a new publish-nightly job once all
assets have been uploaded; stable releases are left as drafts for a
maintainer to publish manually.
- prepare distinguishes existing draft (reuse) from already-published release
(fail loudly), so a same-SHA nightly rerun after publication can't try to
upload to an immutable release.
Amp-Thread-ID: https://ampcode.com/threads/T-019dced2-6c4a-76fb-af86-79fd948a0157
Co-authored-by: Amp <amp@ampcode.com>
* remove limit for safety
* fix(ci): use github context in publish-nightly job if condition
env context is not available in job-level if expressions
Amp-Thread-ID: https://ampcode.com/threads/T-019dd37e-7210-77da-bf0e-1d77ccecb19e
Co-authored-by: Amp <amp@ampcode.com>
---------
Co-authored-by: Amp <amp@ampcode.com>
) * fix(config): warn instead of erroring on unknown FOUNDRY_PROFILE When the selected profile (via `FOUNDRY_PROFILE` or otherwise) does not exist in `foundry.toml`, fall back to the default profile and emit a `Warning::UnknownProfile` instead of returning a hard error. This matches the lenient behaviour used for nested lib configs and keeps commands like `FOUNDRY_PROFILE=ci forge build` working when `[profile.ci]` happens to be missing. Amp-Thread-ID: https://ampcode.com/threads/T-019dd43e-e2d0-723e-bc03-03b0467dc68e Co-authored-by: Amp <amp@ampcode.com> * fix fmt --------- Co-authored-by: Amp <amp@ampcode.com>
* feat(lint): add missing-zero-check * rm Staticcall, guard ordering * fix * handle guards in branches --------- Co-authored-by: Mablr <59505383+mablr@users.noreply.github.com> Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
* chore: bump tempo and validate fork schedule Amp-Thread-ID: https://ampcode.com/threads/T-019dd36a-7d77-772b-8cba-13f2147c9e5c * test: cleanup + isolate on tempo mod * style: fmt * style: clippy * fix: clippy
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
@isagi-y22 is attempting to deploy a commit to the Foundry development Team on Vercel. A member of the Team first needs to authorize it. |
Reviewer's GuideFixes a miner deadlock caused by forced transactions, improves Tempo AA handling and profile config UX, and overhauls release, Docker, and lint tooling around nightly/stable tags and zero-address checks. Sequence diagram for miner poll handling of forced transactionssequenceDiagram
actor NodeOperator
participant Miner
participant MiningMode
participant TxPool
NodeOperator->>Miner: poll(pool, cx)
Miner->>Miner: register(cx)
alt forced_transactions is Some(vec)
Miner->>MiningMode: poll(pool, cx)
alt MiningMode returns Ready(transactions)
MiningMode-->>Miner: Poll::Ready(next)
Miner->>Miner: extend(forced_transactions, next)
else MiningMode returns Pending
MiningMode-->>Miner: Poll::Pending
Miner->>Miner: keep only forced_transactions
end
Miner-->>NodeOperator: Poll::Ready(forced_transactions)
else forced_transactions is None
Miner->>MiningMode: poll(pool, cx)
MiningMode-->>Miner: Poll::Ready or Poll::Pending
Miner-->>NodeOperator: same Poll
end
Sequence diagram for execute_pool_transactions handling Tempo AA valid_aftersequenceDiagram
participant Executor as BlockExecutor
participant Evm
participant DB
participant PoolTx as PoolTransaction
loop for each pool_tx in pool_transactions
Executor->>PoolTx: pending_transaction
PoolTx-->>Executor: pending
Executor->>Evm: evm()
Evm-->>Executor: evm_ref
Executor->>Evm: block().timestamp()
Evm-->>Executor: block_timestamp
Executor->>Executor: inspect pending.transaction
alt FoundryTxEnvelope::Tempo with valid_after
Executor->>Executor: compare valid_after to block_timestamp
alt valid_after > block_timestamp
Executor->>Executor: push pool_tx to not_yet_valid
Note right of Executor: Skip execution, will retry later
else valid_after <= block_timestamp
Executor->>Evm: execute_transaction(pending)
Evm-->>Executor: Ok or Err
alt Ok
Executor->>Executor: record transaction and receipt
else Err is validation error
Executor->>Executor: push pool_tx to invalid
else other Err
Executor->>Executor: push pool_tx to failed
end
end
else non-Tempo or no valid_after
Executor->>Evm: execute_transaction(pending)
Evm-->>Executor: Ok or Err
alt Ok
Executor->>Executor: record transaction and receipt
else Err is validation error
Executor->>Executor: push pool_tx to invalid
else other Err
Executor->>Executor: push pool_tx to failed
end
end
end
Class diagram for MissingZeroCheck lint and config warningsclassDiagram
class MissingZeroCheck {
+check_function(ctx~LintContext~, hir~Hir~, func~Function~) void
}
class Analyzer {
-hir Hir
-taint HashMap_VariableId_HashSet_VariableId__
-sinks HashSet_VariableId_
-guarded HashSet_VariableId_
-guard_depth u32
-sink_depth u32
+new(hir~Hir~, params~HashSet_VariableId_~) Analyzer
+taint_sources(expr~Expr~) HashSet_VariableId_
+visit_stmt(stmt~Stmt~) ControlFlow
+visit_expr(expr~Expr~) ControlFlow
}
class LintContext {
+emit(lint~SolLint~, span~Span~) void
}
class Warning {
<<enum>>
+DeprecatedKey
+UnknownKey
+UnknownProfile
}
class UnknownProfileVariant {
+profile String
}
class Config {
+profile String
+warnings Vec_Warning_
+DEFAULT_PROFILE String
+load() Result_Config_ExtractConfigError_
}
class MissingZeroCheckLint {
<<lint>>
+MISSING_ZERO_CHECK
+Severity Low
+code missing-zero-check
+message address parameter is used in a state write or value transfer without a zero-address check
}
MissingZeroCheck ..> Analyzer : uses
MissingZeroCheck ..> LintContext : emits_warnings_via
MissingZeroCheck ..> MissingZeroCheckLint : defines
Config "1" o-- "*" Warning : collects
Warning <|-- UnknownProfileVariant : variant
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Code Review
This pull request introduces a variety of enhancements and bug fixes, most notably a new Solidity lint for detecting missing zero-address checks, a fix for an off-by-one error in fuzzing mutators, and a significant update to foundryup for better release resolution. Anvil's transaction execution was also updated to support Tempo's valid_after field. Feedback focuses on refining the new lint's analysis—specifically improving taint propagation for local variables, handling chained call options, and extending coverage to complex state writes like mappings and structs. Additionally, a more robust parsing strategy for GitHub API responses in foundryup was suggested to avoid fragility.
Motivation
Solution
PR Checklist
Summary by Sourcery
Fix miner forced transaction polling deadlock and improve Tempo AA transaction validity handling while updating release, Docker, CI, and linting workflows.
Bug Fixes:
Enhancements:
Build:
CI:
Documentation:
Chores: