-
Notifications
You must be signed in to change notification settings - Fork 144
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
feat: add --stateless
flag to forest
#3593
Conversation
4743c2c
to
6547bfb
Compare
dbc679f
to
bf299f9
Compare
@@ -65,6 +65,8 @@ | |||
|
|||
- [#3422](https://github.com/ChainSafe/forest/issues/3422) Add NV21 (Watermelon) | |||
support for calibration network. | |||
- [#3593](https://github.com/ChainSafe/forest/pull/3593): Add `--stateless` flag |
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.
Is it worth elaborating a bit on what this flag exactly does?
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.
Done
|
||
STATELESS_NODE_ADDRESS=$($FOREST_CLI_PATH net listen | tail -n 1) | ||
echo "Stateless node address: $STATELESS_NODE_ADDRESS" | ||
STATELESS_NODE_PEER_ID=$(echo "$STATELESS_NODE_ADDRESS" | cut --delimiter="/" --fields=7 --zero-terminated) |
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.
It might be worth commenting on an expected format with an example multiaddress.
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.
Done
EOF | ||
|
||
# Disable discovery to not connect to more nodes | ||
$FOREST_PATH --chain calibnet --encrypt-keystore false --auto-download-snapshot --config "$CONFIG_PATH" --rpc false --mdns false --kademlia false --metrics-address 127.0.0.1:6117 & |
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.
Could we disable mdns
and kademlia
in config? Unless you think passing it as flags makes more sense.
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.
I've no preference, fixed as suggested
|
||
source "$(dirname "$0")/harness.sh" | ||
|
||
forest_init_stateless |
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.
Will this node be killed in case of an error somewhere along the way?
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.
Yes the detached node will be killed by trap forest_cleanup EXIT
in harness.sh
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.
Looks good.
I'm not sure it'll actually work but there's no way of testing this without just deploying it and seeing if anything breaks.
This reverts commit 952a63e.
)" This reverts commit 8d6a84c.
)" This reverts commit 8d6a84c.
)" This reverts commit 8d6a84c.
)" This reverts commit 8d6a84c.
Summary of changes
As part of #3556
Changes introduced in this pull request:
If a block is requested that we do not have, forward the request to other peers and cache the result.We don't forward the request as discussed hereReference issue to close (if applicable)
Closes
Other information and links
Change checklist