[go: up one dir, main page]

Proto/plugin: should the run_operation RPC be called on the successor level?

The POST /chains/<chain>/blocks/<block>/helpers/scripts/run_operation RPC prepares an Alpha_context.t using the context resulting from the application of <block>, and the level of <block> as "current" level. This is weird: usually, when preparing a context using the context resulting from a block B, then B considered the predecessor, and the current level is the successor of B's level.

However, changing the level at which run_operation's context is initialized would be complicated:

  • It would change gas estimations.
  • The handling of some specific operations, and probably some external tools that use the RPC, manually adjust the level to counteract this discrepancy; all this would need to be updated.
Edited by Diane Gallois-Wong