Skip to content

Commit 55e1c52

Browse files
committed
Some clarifications after PR review
1 parent 415e4ae commit 55e1c52

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/event.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ It can reference:
4040
referenced by its index (0-3), where offset 0 is topic[0], etc.
4141
- **Data (Offsets 4+)**: The non-indexed data section of the log. Offset
4242
values >= 4 refer to 32-byte words in the log data, where offset 4 is the
43-
first word (bytes 0-31), offset 5 is the second word (bytes 32-63), etc.
43+
first word (bytes 0-31), offset 5 is the second word (bytes 32-63), etc. Note:
44+
data offset always starts at 4, even if there are fewer than 4 topics defined.
4445

4546
Reference:
4647
[LogValueRef Type and Documentation](https://github.com/shutter-network/rolling-shutter/blob/42f562532acfc4f89f630d3de809fc4451636ab2/rolling-shutter/keyperimpl/shutterservice/eventtrigger.go#L34-L43)
@@ -81,7 +82,8 @@ The current version is **0x01** as defined by the `Version` constant.
8182

8283
### RLP Encoding Details
8384

84-
The RLP encoding format for the core structures is:
85+
The RLP encoding format for the core structures are just nested RLP lists. The
86+
named object definitions below are for clarification purposes only:
8587

8688
```
8789
EventTriggerDefinition := {
@@ -102,10 +104,13 @@ ValuePredicate := {
102104
intArgs: [BigInt, ...],
103105
byteArgs: [Bytes, ...]
104106
}
107+
108+
# actual dense format is more akin to this:
109+
[contract_address, [[offset, [op, [int_args], [byte_args]]], […]]]
105110
```
106111

107112
Reference:
108-
[RLP Encoding Implementation](https://github.com/shutter-network/rolling-shutter/blob/42f562532acfc4f89f630d3de809fc4451636ab2/rolling-shutter/keyperimpl/shutterservice/eventtrigger.go#L211-L267)
113+
[RLP Encoding Implementation](https://github.com/shutter-network/rolling-shutter/blob/42f562532acfc4f89f630d3de809fc4451636ab2/rolling-shutter/keyperimpl/shutterservice/eventtrigger.go#L211-L392)
109114

110115
## Operators
111116

0 commit comments

Comments
 (0)