add AN compatibility for v0.44.9#8283
add AN compatibility for v0.44.9#8283j1010001 wants to merge 2 commits intompeter/disable-evm-state-mutationfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThis PR updates linting configuration from golangci-lint v1.63.4 to v2.7.1, adds transaction access methods to the Execution Node provider, implements account restriction enforcement throughout the FVM execution layer, expands the computation metering API with per-kind remaining capacity queries, introduces EVM allow-listing and SetCode authorization support, refactors machine account balance validation, and updates multiple dependencies. Changes
Sequence DiagramssequenceDiagram
participant Invoker as Transaction<br/>Invoker
participant Env as Environment
participant Limiter as Storage<br/>Limiter
participant Verifier as Transaction<br/>Verifier
participant Meter as Computation<br/>Meter
Invoker->>Env: GetRestrictedAccounts()
Env-->>Invoker: map[address]struct{}
alt Payer equals Service Account
Invoker->>Limiter: CheckStorageLimits<br/>(restrictedAccounts=nil)
else Payer is Restricted
Invoker-->>Invoker: Return AccountRestrictedError
else Payer not Service
Invoker->>Limiter: CheckStorageLimits<br/>(restrictedAccounts)
Limiter->>Limiter: For each storage change,<br/>check if address in restrictedAccounts
alt Address Restricted
Limiter-->>Invoker: AccountRestrictedError
end
end
Note over Invoker,Meter: Service Account Override
Invoker->>Verifier: CheckAuthorization(chain, ...)
Verifier->>Verifier: If all of (first auth,<br/>payer, proposer) ==<br/>service account:<br/>filter to service sigs only
Verifier-->>Invoker: Authorization result
sequenceDiagram
participant Handler as EVM<br/>Handler
participant Meter as Computation<br/>Meter
participant Executor as Transaction<br/>Executor
loop For each transaction in batch
Handler->>Meter: ComputationRemaining(kind)
Meter-->>Handler: remaining uint64
alt remaining < tx.Gas()
Handler-->>Handler: Return<br/>ErrInsufficientComputation
else Sufficient gas available
Handler->>Handler: remainingGasLimit -=<br/>tx.Gas()
Handler->>Executor: Execute transaction
end
end
sequenceDiagram
participant Emulator as EVM<br/>Emulator
participant AllowList as Allow-List<br/>Check
participant UTXO as UTXO<br/>Processor
Emulator->>AllowList: Check if signer<br/>in allowListEOAs
alt Signer Authorized
Emulator->>UTXO: ProcessTransaction
UTXO-->>Emulator: Result
else Signer Not Authorized
Emulator-->>Emulator: Return invalid result:<br/>"EVM transactions are<br/>temporarily disabled"
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes This PR introduces multiple significant features (account restrictions, service account overrides, EVM allow-listing, computation metering API), modifies core transaction verification and storage validation logic, spans 70+ heterogeneous files with varied change patterns (new interfaces, method implementations, test coverage, configuration updates), and requires careful verification of authorization, restriction enforcement, and metering semantics across interconnected components. Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…h-AN-compatibility-for-v0.44.9
|
obsoleted by #8284 |
adding AN compatibility on top of: #8272
Summary by CodeRabbit
New Features
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.