Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/systemtests/clients/cosmosclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ func (c *CosmosClient) BankSend(nodeID, accID string, from, to sdk.AccAddress, a
return nil, fmt.Errorf("failed to broadcast tx: %v", err)
}

// This debug string is useful for transactions that don't yield an error until after they're broadcasted to the chain
fmt.Printf("DEBUG: CosmosClient BankSend: %s\n", resp.String())

return resp, nil
}

Expand Down
1 change: 1 addition & 0 deletions tests/systemtests/clients/ethclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ func (ec *EthClient) CheckTxsPending(
case <-ticker.C:
pendingTxs, _, err := ec.TxPoolContent(nodeID)
if err != nil {
fmt.Printf("DEBUG: failed to get txpool content: %v", err)
continue // Retry on error
}

Expand Down
3 changes: 3 additions & 0 deletions tests/systemtests/eip712/eip712_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func BankSendWithEIP712(
return nil, fmt.Errorf("failed to broadcast tx: %v", err)
}

// This debug string is useful for transactions that don't yield an error until after they're broadcasted to the chain
fmt.Printf("DEBUG: CosmosClient BankSend: %s\n", resp.String())

return resp, nil
}

Expand Down
1 change: 0 additions & 1 deletion tests/systemtests/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ func TestTxsOrdering(t *testing.T) {
func TestTxsReplacement(t *testing.T) {
mempool.TestTxsReplacement(t)
mempool.TestTxsReplacementWithCosmosTx(t)
mempool.TestMixedTxsReplacementEVMAndCosmos(t)
mempool.TestMixedTxsReplacementLegacyAndDynamicFee(t)
}

Expand Down
1 change: 1 addition & 0 deletions tests/systemtests/mempool/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ type TestSuite interface {

// Test Utils
AwaitNBlocks(t *testing.T, n int64, duration ...time.Duration)
GetTxGasPrice(baseFee *big.Int) *big.Int
}
18 changes: 9 additions & 9 deletions tests/systemtests/mempool/test_exceptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ func TestTxRebroadcasting(t *testing.T) {
name: "ordering of pending txs %s",
actions: []func(s TestSuite){
func(s TestSuite) {
tx1, err := s.SendTx(t, s.Node(0), "acc0", 0, s.BaseFee(), nil)
tx1, err := s.SendTx(t, s.Node(0), "acc0", 0, s.GetTxGasPrice(s.BaseFee()), nil)
require.NoError(t, err, "failed to send tx")

tx2, err := s.SendTx(t, s.Node(1), "acc0", 1, s.BaseFee(), nil)
tx2, err := s.SendTx(t, s.Node(1), "acc0", 1, s.GetTxGasPrice(s.BaseFee()), nil)
require.NoError(t, err, "failed to send tx")

tx3, err := s.SendTx(t, s.Node(2), "acc0", 2, s.BaseFee(), nil)
tx3, err := s.SendTx(t, s.Node(2), "acc0", 2, s.GetTxGasPrice(s.BaseFee()), nil)
require.NoError(t, err, "failed to send tx")

// Skip tx4 with nonce 3

tx5, err := s.SendTx(t, s.Node(3), "acc0", 4, s.BaseFee(), nil)
tx5, err := s.SendTx(t, s.Node(3), "acc0", 4, s.GetTxGasPrice(s.BaseFee()), nil)
require.NoError(t, err, "failed to send tx")

tx6, err := s.SendTx(t, s.Node(0), "acc0", 5, s.BaseFee(), nil)
tx6, err := s.SendTx(t, s.Node(0), "acc0", 5, s.GetTxGasPrice(s.BaseFee()), nil)
require.NoError(t, err, "failed to send tx")

// At AfterEachAction hook, we will check expected queued txs are not broadcasted.
Expand All @@ -49,7 +49,7 @@ func TestTxRebroadcasting(t *testing.T) {
// so, we should set nonce idx to 0.
nonce3Idx := uint64(0)

tx4, err := s.SendTx(t, s.Node(2), "acc0", nonce3Idx, s.BaseFee(), nil)
tx4, err := s.SendTx(t, s.Node(2), "acc0", nonce3Idx, s.GetTxGasPrice(s.BaseFee()), nil)
require.NoError(t, err, "failed to send tx")

// At AfterEachAction hook, we will check expected pending txs are broadcasted.
Expand Down Expand Up @@ -96,13 +96,13 @@ func TestMinimumGasPricesZero(t *testing.T) {
name: "sequencial pending txs %s",
actions: []func(s TestSuite){
func(s TestSuite) {
tx1, err := s.SendTx(t, s.Node(0), "acc0", 0, s.BaseFee(), nil)
tx1, err := s.SendTx(t, s.Node(0), "acc0", 0, s.GetTxGasPrice(s.BaseFee()), nil)
require.NoError(t, err, "failed to send tx")

tx2, err := s.SendTx(t, s.Node(1), "acc0", 1, s.BaseFee(), nil)
tx2, err := s.SendTx(t, s.Node(1), "acc0", 1, s.GetTxGasPrice(s.BaseFee()), nil)
require.NoError(t, err, "failed to send tx")

tx3, err := s.SendTx(t, s.Node(2), "acc0", 2, s.BaseFee(), nil)
tx3, err := s.SendTx(t, s.Node(2), "acc0", 2, s.GetTxGasPrice(s.BaseFee()), nil)
require.NoError(t, err, "failed to send tx")

s.SetExpPendingTxs(tx1, tx2, tx3)
Expand Down
2 changes: 1 addition & 1 deletion tests/systemtests/mempool/test_ordering.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestTxsOrdering(t *testing.T) {
nodeId = s.Node(i % 4)
}

txInfo, err := s.SendTx(t, nodeId, "acc0", nonceIdx, s.BaseFee(), big.NewInt(1))
txInfo, err := s.SendTx(t, nodeId, "acc0", nonceIdx, s.GetTxGasPrice(s.BaseFee()), big.NewInt(1))
require.NoError(t, err, "failed to send tx")

// nonce order of committed txs: 0,1,2,3,4
Expand Down
Loading
Loading