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
{{ message }}
This repository has been archived by the owner on May 29, 2024. It is now read-only.
To ensure full coverage of Optimism bridge, a heuristic should be able to run invariant analysis on any arbitrary event topics.
For example, for a WithdrawalInitiated event, we'd want to assert when amount != (2^256-1) using the uint256 amount field. Pessimism forces a configuration to provide an event signature for contract_event heuristics:
This heuristic can be expanded to support a super lightweight propositional language that can be passed into the configuration to construct an enforceable ruleset.
Since the variable type is already declared in the event signature, we can easily cast this to an internal data type for comparison. For example, a Transfer signature would be converted into a topic series [x0,x1,x2]. A user could then provide arbitrary comparisons for this topic series like:
signature Transfer(address from, address to, uint256 value):
value < (2^256) - 1
from != 0x0...0
NOTE: Comparisons between topics (a,b) is only feasible if and only if type(a) == type(b)
1. Lexical analysis
A script is initially parsed into a seres of lexical tokens for boolean processing, so the above transfer script would be converted into a words list:
To ensure full coverage of Optimism bridge, a heuristic should be able to run invariant analysis on any arbitrary event topics.
For example, for a WithdrawalInitiated event, we'd want to assert when amount != (2^256-1) using the uint256 amount field. Pessimism forces a configuration to provide an event signature for contract_event heuristics:
This heuristic can be expanded to support a super lightweight propositional language that can be passed into the configuration to construct an enforceable ruleset.
Since the variable type is already declared in the event signature, we can easily cast this to an internal data type for comparison. For example, a Transfer signature would be converted into a topic series [x0,x1,x2]. A user could then provide arbitrary comparisons for this topic series like:
signature Transfer(address from, address to, uint256 value):
value < (2^256) - 1
from != 0x0...0
NOTE: Comparisons between topics (a,b) is only feasible if and only if type(a) == type(b)
1. Lexical analysis
A script is initially parsed into a seres of lexical tokens for boolean processing, so the above transfer script would be converted into a words list:
To ensure full coverage of Optimism bridge, a heuristic should be able to run invariant analysis on any arbitrary event topics.
For example, for a
WithdrawalInitiated
event, we'd want to assert whenamount != (2^256-1)
using theuint256 amount
field. Pessimism forces a configuration to provide an event signature forcontract_event
heuristics:This heuristic can be expanded to support a super lightweight propositional language that can be passed into the configuration to construct an enforceable ruleset.
Since the variable type is already declared in the event signature, we can easily cast this to an internal data type for comparison. For example, a
Transfer
signature would be converted into a topic series[x0,x1,x2]
. A user could then provide arbitrary comparisons for this topic series like:NOTE: Comparisons between topics
(a,b)
is only feasible if and only if type(a) == type(b)1. Lexical analysis
A script is initially parsed into a seres of lexical tokens for boolean processing, so the above transfer script would be converted into a words list:
This word list would then be converted to a token list like so:
The text was updated successfully, but these errors were encountered: