-
Notifications
You must be signed in to change notification settings - Fork 43
[execution, contracts] Introduce Relayer and non-enshrined tokens #867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
0debf67
to
b60446e
Compare
b60446e
to
6d5f673
Compare
6d5f673
to
bc57d1a
Compare
68ea02b
to
37e5a5b
Compare
- Replaced enshrined tokens with contracted tokens, introducing the `TokenManager` to manage token balances within each shard. - `TokenManager` is deployed on each shard and holds the balances for all tokens within that shard. - Introduced a new `Relayer` contract to handle Cross-Shard Transactions (CST). The `Relayer`: - Calls the `TokenManager` before and after CSTs to ensure token transfers and consistency. - Handles bounce, response, and request transactions. Key Issues with the new approach: - Increased costs: CSTs and token manipulations are now more expensive. - Token removal inefficiency: Tokens are not removed from accounts if the balance becomes zero due to high costs. - Limited nested request support: Nested requests (sending a request from a response handler) are not supported. - Compilation issues: Previous contract compilation settings caused a "too deep stack" error. Resolved by using `via-ir` and `optimize` options for all contract compilations. - Test issues: Some tests were disabled due to incomplete support for gas forwarding and bounce messages.
37e5a5b
to
2fed8b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is too much to comprehend it completely.
Is it possible to make separate pull requests for the refactoring and deletion, and for the new features.
// s.Require().Equal("Counter", result[1]["Contract"]) | ||
// s.Require().Equal("get()", result[1]["CallData"]) | ||
// s.Require().Equal("Counter", result[1]["Contract"]) | ||
// s.Contains(out, "└ eventValue: [0]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the future of this code?
TokenManager
to manage token balances within each shard.TokenManager
is deployed on each shard and holds the balances for all tokens within that shard.Relayer
contract to handle Cross-Shard Transactions (CST). TheRelayer
:TokenManager
before and after CSTs to ensure token transfers and consistency.Key Issues with the New Approach:
via-ir
andoptimize
options for all contract compilations.