Skip to content

Commit

Permalink
feat: add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Eikix committed Oct 4, 2023
1 parent ba433c7 commit 393fb8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/general/execution_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classDiagram
create_addresses: Array~EthAddress~,
return_data: Array~u32~,
parent_ctx: Nullable~ExecutionContext~,
child_context: Nullable~ExecutionContext~,
child_return_data: Option~Span~u8~~
}
class CallContext{
Expand Down
8 changes: 5 additions & 3 deletions docs/general/machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ To overcome the problem stated above, we have come up with the following design:
it.
- Each execution context has a `parent_ctx` field, which value is either a
pointer to its parent execution context or `null`.
- Each execution context has a `child_context` field, which value is either a
pointer to its child execution context or `null`.
- Each execution context has a `child_return_data` field, which value is either
nothing or the return data from the child context. This is meant to enable
opcodes `RETURNDATASIZE` and `RETURNDATACOPY`. These two opcodes are the only
ones enabling a current context to access its child context's return data.
- The execution context tree is a directed acyclic graph, where each execution
context has at most one parent, and at most one child.
- A specific execution context is accessible by traversing the execution context
Expand Down Expand Up @@ -75,7 +77,7 @@ classDiagram
create_addresses: Array~EthAddress~,
return_data: Array~u8~,
parent_ctx: Nullable~ExecutionContext~,
child_context: Nullable~ExecutionContext~,
child_return_data: Option~Span~u8~~
}
Expand Down

0 comments on commit 393fb8e

Please sign in to comment.