[execution, contracts] Introduce Relayer and non-enshrined tokens#867
Open
shermike wants to merge 1 commit into
Open
[execution, contracts] Introduce Relayer and non-enshrined tokens#867shermike wants to merge 1 commit into
shermike wants to merge 1 commit into
Conversation
shermike
force-pushed
the
relayer-and-pure-tokens
branch
2 times, most recently
from
April 28, 2025 18:51
0debf67 to
b60446e
Compare
shermike
force-pushed
the
relayer-and-pure-tokens
branch
from
April 28, 2025 19:58
b60446e to
6d5f673
Compare
shermike
force-pushed
the
relayer-and-pure-tokens
branch
from
April 28, 2025 20:16
6d5f673 to
bc57d1a
Compare
shermike
force-pushed
the
relayer-and-pure-tokens
branch
from
April 29, 2025 07:13
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.
shermike
force-pushed
the
relayer-and-pure-tokens
branch
from
April 30, 2025 10:46
37e5a5b to
2fed8b8
Compare
shermike
marked this pull request as ready for review
April 30, 2025 10:49
shermike
requested review from
KlonD90,
khannanov-nil and
ukorvl
as code owners
April 30, 2025 10:49
dmtrskv
reviewed
May 9, 2025
dmtrskv
left a comment
Contributor
There was a problem hiding this comment.
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]") |
Contributor
There was a problem hiding this comment.
what's the future of this code?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TokenManagerto manage token balances within each shard.TokenManageris deployed on each shard and holds the balances for all tokens within that shard.Relayercontract to handle Cross-Shard Transactions (CST). TheRelayer:TokenManagerbefore and after CSTs to ensure token transfers and consistency.Key Issues with the New Approach:
via-irandoptimizeoptions for all contract compilations.