Hey all, I have a puzzling question for Nervos L1 brainiacs
Assumptions
Let’s assume that:
- There are three distinct L1 scripts:
A
,B
andC
B
is referenced bytype
- Initially
A -spawn-> B
(andB
does notexec
anything else) - At a second time,
B
binary is updated toB -exec-> C
- Now
A -spawn-> B -exec-> C
Violated Expectations
A
was implemented without the knowledge that B
would exec
something else, so A
expects that:
A
spawnsB
.A
readsB
computation result.A
proceeds with its own validation.A
returns its validation result.
On the other side, once B
is updated to include an exec
call, A
assumptions fails apart as its validation goes like this:
A spawns B
.B exec C
.- Execution context is cleared due to
Exec
. C
proceeds with its own validation.C
returns validation result.
This poses an issue for A
did not complete its own validation.
Questions
- Is the current behavior described correctly?
- Does
spawn
implementation prescribe any way to fail the validation if a spawned process tries toexec
? - Would it make sense to fail by default if a spawned process tries to
exec
?
Love & Peace, Phroi %42