-
Notifications
You must be signed in to change notification settings - Fork 128
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
R4R: Replay blockchain to any given height #936
Conversation
app/app.go
Outdated
@@ -35,6 +35,7 @@ import ( | |||
const ( | |||
appName = "IrisApp" | |||
FlagReplayHeight = "replay_height" | |||
FlagReplay = "replay" |
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.
So confused with the flag replay_height
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 difference between replay and replay_height? @chengwenxi
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.
replay_height
mean iris replay to appointed height and then software stop for iris export.
replay
mean iris and tendermint replay last block and then iris will start. @haifengxi
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.
All iricli flags have dash "-" instead of underscore "_" in their names, shouldn't we follow the same convention for other commands such as iris? @chengwenxi
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.
Let's review the code tomorrow.
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, we should follow the same convention for all commands.
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.
Let's reorg this PR into two:
- iris start --replay-last-block
- iris export --height
I'm trying to create a new node for tendermint replay history block by a goroutine, so I can get the replay result in the TODO:
|
Gopkg.toml
Outdated
source = "https://github.com/irisnet/tendermint.git" | ||
branch = "irisnet/v0.27.3-iris" | ||
source = "https://github.com/chengwenxi/tendermint.git" | ||
branch = "v0.27.3-iris" |
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.
merge the change into the irisnet/tendermint first
app/app.go
Outdated
DefaultSyncableHeight = 10000 // Multistore saves a snapshot every 10000 blocks | ||
DefaultCacheSize = 100 // Multistore saves last 100 blocks |
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.
Add in ivalstore
app/app.go
Outdated
} | ||
|
||
if lastBlockHeight-replayHeight <= DefaultCacheSize { | ||
err := app.LoadVersion(replayHeight, protocol.KeyMain, true) |
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.
load version false
This feature is needed to support class3 (hotfix) and class4 (restart) upgrades.