[Bug]: Rollback will not re-execute the transaction. #17739
Labels
S:needs more info
This bug can't be addressed until more information is provided by the reporter.
T:Bug
Is there an existing issue for this?
What happened?
Rollback will not re-execute the transaction.
I found a problem with the rollback command.
The documentation about the rollback says that "the transactions in block n will be re-executed against the
application." but this does not happen.
Transactions with non-deterministic data are not re-executed and the blockchain does not produce new blocks.
Maybe I'm doing something wrong, please tell me how it should be, this question is very important to me
I want to know how such a problem can be solved.
What to do if it happens on prod?
Cosmos SDK Version
v0.47.2, v0.47.3
How to reproduce?
Steps to reproduction:
1 versions:
$ ignite version
Ignite CLI version: v0.27.1-dev
Ignite CLI build date: 2023-06-02T20:29:26Z
Ignite CLI source hash: 15cf9a60b8dfbed6d9ddb0cad7e890d2a5b60979
Ignite CLI config version: v1
Cosmos SDK version: v0.47.2
Your OS: linux
Your arch: amd64
Your Node.js version: v18.15.0
Your go version: go version go1.20.7 linux/amd64
Your uname -a: Linux archlinux 6.4.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 24 Aug 2023 00:38:14 +0000 x86_64 GNU/Linux
Your cwd: /home/user
Is on Gitpod: false
2 Scaffold a new blockchain using ignite cli (https://docs.ignite.com/guide/blog/express)
3. Add non-determenistic data to message
Launch a blockchain on 3 nodes ()
$ blogd testnet start
acquiring test network lock
preparing test network with chain-id "blog"
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++ THIS MNEMONIC IS FOR TESTING PURPOSES ONLY ++
++ DO NOT USE IN PRODUCTION ++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
starting test network...
started validator 0
started validator 1
started validator 2
started test network at height: 1
press the Enter Key to terminate
Broadcast the transaction. The message must contain random data.
$ blogd tx blog create-post 'Hello, World!' 'This is a blog post' --from node0 --keyring-backend test --keyring-dir ./.testnets/blog/node0/simcli
The non-deterministic transaction stops the generation of new blocks.
Stop the blockchain and execute the rollback command
$ blogd rollback --hard --home ./.testnets/blog/node0/simd
$ blogd rollback --hard --home ./.testnets/blog/node1/simd
$ blogd rollback --hard --home ./.testnets/blog/node2/simd
Every time the command gives an error:
Error: failed to rollback to version: no versions found while trying to load 6
Fix the message, removing random from the message.
$ ignite c build
The blockchain changes the current height to n -1, but the transaction is not re-execute!
The text was updated successfully, but these errors were encountered: