Skip to content

Commit f81cd95

Browse files
committed
Complete RSKIP529
1 parent 9438001 commit f81cd95

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

IPs/RSKIP529.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description:
1212

1313
|RSKIP |529 |
1414
| :------------ |:-------------|
15-
|**Title** |Super events |
15+
|**Title** |New storage cells in Bridge native contract for base and super events info |
1616
|**Created** |26-AUG-25 |
1717
|**Author** |MI |
1818
|**Purpose** |Sca |
@@ -22,11 +22,13 @@ description:
2222

2323
## Abstract
2424

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.
2626

2727
## Motivation
2828

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.
3032

3133
## Specification
3234

@@ -60,7 +62,7 @@ A method will be added to allow the Union Bridge contract address to set the cur
6062

6163
- If the caller is not the Union Bridge contract address then it should revert.
6264
- 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.
6466

6567
**Method signature:**
6668

@@ -111,7 +113,7 @@ A method will be added to allow the Union Bridge contract address to set the cur
111113

112114
- If the caller is not the Union Bridge contract address then it should revert.
113115
- 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.
115117

116118
**Method signature:**
117119

@@ -134,12 +136,27 @@ function clearSuperEvent() public;
134136

135137
## Rationale
136138

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.
138153

139154
## References
140155

141156
[1] [RSKIP502](https://github.com/rsksmart/RSKIPs/blob/master/IPs/RSKIP502.md): PowPeg and Union Bridge integration
142157

158+
[2] [RSKIP535](https://github.com/rsksmart/RSKIPs/blob/master/IPs/RSKIP535.md): Add the baseEvent field to the Block header extension
159+
143160

144161
### Copyright
145162

0 commit comments

Comments
 (0)