[go: up one dir, main page]

Scoru/Wasm: fix hash divergence on eval trapped; fix kernel fallback flow in fast mode

Context

fixes #4245 (closed)

This MR fixes the following two issues:

  1. divergence between many compute_step and one compute_step_many, when evaluation traps on one kernel_run, but succeeds on the following.
  2. kernel fallback was not getting executed in the node - which would then see a stuck state and not make further progress (despite the stuck state being recoverable if the fallback mechanims could be used).

NB 1. was caused by incorrect logic in the compute_step_many_until function - which treated the SK_Result tick as a padding tick.

Manually testing the MR

Confirmed to work by rebasing !6832 (merged) on here. The TX Kernel fails decoding due to the change in type of read_input:

[14:25:37.662] [sc-rollup-node1] DEBUG: Kernel installed.
[14:25:37.662] [sc-rollup-node1] PVMDEBUG: Error(_, "incompatible import type for \"smart_rollup_core\" \"read_input\": expected func [i32 i32 i32 i32] -> [i32], got func [i32 i32 i32] -> [i32]")
[14:25:37.662] [sc-rollup-node1] DEBUG: Kernel installed.
[14:25:37.662] [sc-rollup-node1] PVMDEBUG: Error(_, "incompatible import type for \"smart_rollup_core\" \"read_input\": expected func [i32 i32 i32 i32] -> [i32], got func [i32 i32 i32] -> [i32]")
[14:25:37.662] [sc-rollup-node1] DEBUG: Kernel installed.
[14:25:37.662] [sc-rollup-node1] PVMDEBUG: Error(_, "incompatible import type for \"smart_rollup_core\" \"read_input\": expected func [i32 i32 i32 i32] -> [i32], got func [i32 i32 i32] -> [i32]")
[14:25:37.662] [sc-rollup-node1] DEBUG: Kernel installed.
[14:25:37.662] [sc-rollup-node1] PVMDEBUG: Error(_, "incompatible import type for \"smart_rollup_core\" \"read_input\": expected func [i32 i32 i32 i32] -> [i32], got func [i32 i32 i32] -> [i32]")
[14:25:37.662] [sc-rollup-node1] Shutting down L1
[14:25:37.662] [sc-rollup-node1] Shutting down RPC server

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Emma Turner

Merge request reports

Loading