You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: IPs/RSKIP529.md
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ description:
12
12
13
13
|RSKIP |529 |
14
14
| :------------ |:-------------|
15
-
|**Title**|Super events |
15
+
|**Title**|New storage cells in Bridge native contract for base and super events info|
16
16
|**Created**|26-AUG-25 |
17
17
|**Author**|MI |
18
18
|**Purpose**|Sca |
@@ -22,11 +22,13 @@ description:
22
22
23
23
## Abstract
24
24
25
-
To be completed...
25
+
This RSKIP adds new storage cells to the Bridge native contract for storing base and super event information. These storage entries allow the Union Bridge contract to store peg-out event data that can be used for zero-knowledge proofs of cumulative work of the Rootstock chain, enabling more efficient verification of specific peg-out events at a much lower cost than retrieving data from contract storage.
26
26
27
27
## Motivation
28
28
29
-
To be completed...
29
+
RSKIP535 [2](#references) defines how base event information can be stored in the block header extension to enable efficient zero-knowledge proofs of cumulative work. However, for this mechanism to work effectively, the Union Bridge contract needs a way to store and manage the current base and super event data that will be included in block headers.
30
+
31
+
The Bridge native contract provides persistent storage capabilities to maintain the current state of base and super events. This data is then used by miners to populate the baseEvent field in block headers as specified in RSKIP535, enabling the zero-knowledge proof functionality described in that RSKIP.
30
32
31
33
## Specification
32
34
@@ -60,7 +62,7 @@ A method will be added to allow the Union Bridge contract address to set the cur
60
62
61
63
- If the caller is not the Union Bridge contract address then it should revert.
62
64
- It should receive an array of bytes whose length is at most 128 bytes, which it then stores under the `baseEvent` storage key of the Bridge contract.
63
-
- If there is an already existing value under the `baseEvent` storage key of the Bridge contract, it will be overriden by the new value.
65
+
- If there is an already existing value under the `baseEvent` storage key of the Bridge contract, it will be overridden by the new value.
64
66
65
67
**Method signature:**
66
68
@@ -111,7 +113,7 @@ A method will be added to allow the Union Bridge contract address to set the cur
111
113
112
114
- If the caller is not the Union Bridge contract address then it should revert.
113
115
- It should receive an array of bytes whose length is at most 128 bytes, which it then stores under the `superEvent` storage key of the Bridge contract.
114
-
- If there is an already existing value under the `superEvent` storage key of the Bridge contract, it will be overriden by the new value.
116
+
- If there is an already existing value under the `superEvent` storage key of the Bridge contract, it will be overridden by the new value.
115
117
116
118
**Method signature:**
117
119
@@ -134,12 +136,27 @@ function clearSuperEvent() public;
134
136
135
137
## Rationale
136
138
137
-
Discuss design decisions, community debates and possible attacks.
139
+
The design decisions for this RSKIP are based on the following considerations:
140
+
141
+
### Storage Design
142
+
**128-byte size limitation**: This limit prevents excessive storage usage while accommodating typical peg-out event data. It also prevents potential DoS attacks through large data storage and keeps gas costs predictable.
143
+
144
+
### Access Control
145
+
**Union Bridge contract-only writes**: Restricting write access to the Union Bridge contract address ensures data integrity and prevents unauthorized modifications. This follows the principle of least privilege and maintains the security model of the bridge system.
146
+
147
+
**Public read access**: Allowing anyone to read the event data enables transparency and supports the zero-knowledge proof mechanisms described in RSKIP535.
148
+
149
+
### Backwards Compatibility
150
+
**Non-intrusive design**: The new storage cells do not interfere with existing Bridge contract functionality, ensuring smooth upgrades and maintaining existing bridge operations.
151
+
152
+
**Optional usage**: The storage cells can be used independently, allowing for gradual adoption and testing without breaking existing systems.
138
153
139
154
## References
140
155
141
156
[1][RSKIP502](https://github.com/rsksmart/RSKIPs/blob/master/IPs/RSKIP502.md): PowPeg and Union Bridge integration
142
157
158
+
[2][RSKIP535](https://github.com/rsksmart/RSKIPs/blob/master/IPs/RSKIP535.md): Add the baseEvent field to the Block header extension
0 commit comments