You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered that there is a bug in testnode that prevents it from starting a network with a custom chain ID. Confirmed with this unit test:
package app_test
import (
"testing""github.com/celestiaorg/celestia-app/v2/test/util/testnode"
)
funcTest_testnode(t*testing.T) {
t.Run("testnode can start a network with default config", func(t*testing.T) {
testnode.NewNetwork(t, testnode.DefaultConfig())
})
t.Run("testnode can start a network with a custom chain ID", func(t*testing.T) {
config:=testnode.DefaultConfig()
config.Genesis.ChainID="foo"testnode.NewNetwork(t, config)
})
}
where the second test case fails. I think this is a regression because in v1.x the integration tests in celestia-node passed and they used testnode from celestia-app.
Proposal
Fix testnode so that it can support custom chain IDs. celestia-node spins up swamp tests with the chain ID "private".
Backport the fix to v2.x
Cut another release candidate
Bump to that release candidate in celestia-node PR
The text was updated successfully, but these errors were encountered:
rootulp
added
bug
Something isn't working
testing
items that are strictly related to adding or extending test coverage
labels
Jul 4, 2024
rootulp
removed
the
needs:discussion
item needs to be discussed as a group in the next sync. if marking an item, pls be prepped to talk
label
Jul 13, 2024
Closes#3662
Before, genTx transactions were created prematurely via
[`WithValidators`](https://github.com/rootulp/celestia-app/blob/34cd4b34d99e27c5e8611abab6aaecc550499045/test/util/testnode/config.go#L123)
which was problematic if a user tried to later override the chainID via
`WithChainID` because the genTx transactions would use the default chain
ID but the state machine would be created with a custom chain ID.
This PR refactors the genTx creation to happen only when
`genesis.Export` is invoked which is _after_ a user configures a custom
chain ID.
Closes#3662
Before, genTx transactions were created prematurely via
[`WithValidators`](https://github.com/rootulp/celestia-app/blob/34cd4b34d99e27c5e8611abab6aaecc550499045/test/util/testnode/config.go#L123)
which was problematic if a user tried to later override the chainID via
`WithChainID` because the genTx transactions would use the default chain
ID but the state machine would be created with a custom chain ID.
This PR refactors the genTx creation to happen only when
`genesis.Export` is invoked which is _after_ a user configures a custom
chain ID.
(cherry picked from commit 1703fe2)
Context
Integration tests are failing in celestiaorg/celestia-node#3453
Problem
I discovered that there is a bug in testnode that prevents it from starting a network with a custom chain ID. Confirmed with this unit test:
where the second test case fails. I think this is a regression because in v1.x the integration tests in celestia-node passed and they used testnode from celestia-app.
Proposal
"private"
.The text was updated successfully, but these errors were encountered: