Single chain node#549
Merged
Merged
Conversation
dessaya
reviewed
Mar 18, 2025
Comment on lines
89
to
92
| func (req *evmOffLedgerCallRequest) TargetAddress() *cryptolib.Address { | ||
| return req.chainID.AsAddress() | ||
| return cryptolib.NewEmptyAddress() | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
This does not look good. Maybe the TargetAddress method should be removed from the Request interface
Comment on lines
-173
to
-179
| // if the caller contract is on the same chain the transfer would end up | ||
| // in the same L2 account it is taken from, so we do nothing in that case | ||
| if callerContract.ChainID().Equals(ctx.ChainID()) { | ||
| return | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
callerContract.ChainID().Equals(ctx.ChainID()) is true for single chain node 🤔
Contributor
There was a problem hiding this comment.
I think we should remove the whole entry point transferAccountToChain, since it uses cross-chain requests
| func TestSerdeRequestReceipt(t *testing.T) { | ||
| nonce := uint64(time.Now().UnixNano()) | ||
| req := isc.NewOffLedgerRequest(isctest.RandomChainID(), isc.NewMessage(isc.Hn("0"), isc.Hn("0")), nonce, gas.LimitsDefault.MaxGasPerRequest) | ||
| req := isc.NewOffLedgerRequest(isc.EmptyChainID(), isc.NewMessage(isc.Hn("0"), isc.Hn("0")), nonce, gas.LimitsDefault.MaxGasPerRequest) |
Contributor
There was a problem hiding this comment.
Just curious, why this change?
dessaya
approved these changes
Mar 25, 2025
Comment on lines
-173
to
-179
| // if the caller contract is on the same chain the transfer would end up | ||
| // in the same L2 account it is taken from, so we do nothing in that case | ||
| if callerContract.ChainID().Equals(ctx.ChainID()) { | ||
| return | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
I think we should remove the whole entry point transferAccountToChain, since it uses cross-chain requests
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.
This disables cross-chain requests and therefore eases the statedb ChainID key requirements.
This also turns ISC into a single node chain, with the option to quickly fall back to the past behavior if required.