File tree 2 files changed +27
-6
lines changed
2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,30 @@ The process of metering is [explained in its own chapter](./metering.md).
8
8
9
9
The Sentinel is a system contract which means its code is fixed and is part of the genesis or hardfork ewasm is enabled on.
10
10
As a result, changing or updating it requires a hard fork.
11
+
12
+ The Sentinel contract has two interfaces:
13
+ - raw interface
14
+ - ABI encoded interface
15
+
16
+ The raw interface is used by the node for contract validation during deployment, while the ABI encoded interface is a more
17
+ friendly way to interact with the contract otherwise.
18
+
19
+ ## Error handling
20
+
21
+ In both modes, the contract will use an invalid instruction (e.g. regular failure) when an unexpected issue occurs,
22
+ or the ` revert ` operation if the supplied input is invalid.
23
+
24
+ ## Raw interface
25
+
26
+ In the raw interface it accepts any valid WebAssembly binary, applies the Sentinel steps, and returns the transformed
27
+ WebAssembly binary. There is no encapsulation of any kind.
28
+
29
+ ## ABI encoded interface
30
+
31
+ The ABI encoded interface is demonstrated by the following Solidity interface:
32
+ ``` solidity
33
+ interface Sentinel {
34
+ // Expects a WebAssembly binary and returns a transformed WebAssembly binary.
35
+ function validateAndMeter(bytes) external view returns (bytes);
36
+ }
37
+ ```
Original file line number Diff line number Diff line change @@ -22,12 +22,6 @@ important processing steps:
22
22
23
23
See the [ dedicated chapter] ( ./sentinel.md ) about it.
24
24
25
- Input:
26
- - ** variable length** : * ewasm contract code*
27
-
28
- Output:
29
- - ** variable length** : * ewasm contract code*
30
-
31
25
## EVM Transcompiler
32
26
33
27
Address: ` 0x000000000000000000000000000000000000000b `
You can’t perform that action at this time.
0 commit comments