-
Notifications
You must be signed in to change notification settings - Fork 370
Test: (In)valid bundle regressions #1784
base: dev
Are you sure you want to change the base?
Changes from 11 commits
f060918
8a66e5e
b421a5b
b334ed7
b07da67
ba1a1d5
bf39f74
e56e359
b824762
f9d408f
935537f
a5d3322
a0bb502
e47a55d
819cdc4
fca6c0b
3c53541
7fa65d3
58db440
3fda0e0
7b3bcaf
0bd4452
301b9a3
df55ad1
5956887
f7a08b7
b83acd3
ad79546
f56b21f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,6 @@ Feature: Test transaction confirmation | |
| keys | values | type | | ||
| states | False | boolListMixed | | ||
|
||
|
||
Scenario: Value Transactions are confirmed | ||
In this test, a number of value transactions will be made to a specified node. | ||
A milestone will be issued that references these transactions, and this should | ||
|
@@ -87,3 +86,114 @@ Feature: Test transaction confirmation | |
| keys | values | type | | ||
| states | False | boolListMixed | | ||
|
||
Scenario: Valid value transfer bundle that doesnt affect ledger state | ||
We want to ascertain that ledger state is always calculated correctly. | ||
Even in the presence of a bundle that handles funds but without changing address | ||
|
||
Then "1" transaction is issued on "nodeA-m3" with: | ||
|keys |values |type | | ||
|address |TEST_ADDRESS |staticValue | | ||
|value |0 |int | | ||
|tag |ZERO9VALUE |string | | ||
|
||
Then a value transaction which does not move funds is generated referencing the previous transaction with: | ||
|keys |values |type | | ||
|seed |THE_BANK |staticList | | ||
|value |100 |int | | ||
|tag |FAKE9VALUE |string | | ||
|
||
Then a transaction is issued referencing the previous transaction | ||
|keys |values |type | | ||
|seed |THE_BANK |staticList | | ||
|address |TEST_ADDRESS |staticValue | | ||
|value |11 |int | | ||
|tag |VALUE9TRANSACTION |string | | ||
|
||
#In the default test, the latest sent index will be 52. The next milestone issued should be 53. | ||
When a milestone is issued with index 53 and references: | ||
|keys |values |type | | ||
|transactions |previousTransaction |responseValue | | ||
|
||
#Give the node time to solidify the milestone | ||
And we wait "15" second/seconds | ||
|
||
Given "getBalances" is called on "nodeA-m3" with: | ||
|keys |values |type | | ||
|addresses |FAKE_SPEND_ADDRESSES |staticList | | ||
|
||
Then the response for "getBalances" should return with: | ||
|keys |values |type | | ||
|balances |0 |int | | ||
|
||
Scenario: Double spend only affects the ledger once | ||
We want to ascertain that ledger state is always calculated correctly. | ||
Even in the presence of double spend, the confirmed state should have spent only once | ||
|
||
Then "1" transaction is issued on "nodeA-m3" with: | ||
|keys |values |type | | ||
|address |TEST_ADDRESS |staticValue | | ||
|value |0 |int | | ||
|tag |ZERO9VALUE |string | | ||
|
||
Then a double spend is generated referencing the previous transaction with: | ||
|keys |values |type | | ||
|seed |DOUBLE_SPEND_SEED |staticValue | | ||
|value |1000 |int | | ||
|tag |FAKE9VALUE |string | | ||
|
||
#In the default test, the latest sent index will be 53. The next milestone issued should be 54. | ||
When a milestone is issued with index 54 and references: | ||
|keys |values |type | | ||
|transactions |firstDoubleSpend |responseValue | | ||
|
||
#Give the node time to solidify the milestone | ||
And we wait "15" second/seconds | ||
|
||
Given "getBalances" is called on "nodeA-m3" with: | ||
|keys |values |type | | ||
|addresses |DOUBLE_SPEND_ADDRESSES |staticList | | ||
|
||
Then the response for "getBalances" should return with: | ||
|keys |values |type | | ||
|balances |1000 0 |intList | | ||
|
||
@getNodeInfo | ||
Scenario: Split transaction over 2 bundles | ||
We want to ascertain that ledger state is always calculated correctly. | ||
Even when there is a transaction used in 2 different bundles | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Define clearly what a "split" bundle is |
||
|
||
Then "1" transaction is issued on "nodeA-m3" with: | ||
|keys |values |type | | ||
|address |TEST_ADDRESS |staticValue | | ||
|value |0 |int | | ||
|tag |ZERO9VALUE |string | | ||
|
||
Then a split bundle is generated referencing the previous transaction with: | ||
|keys |values |type | | ||
|seed |SPLIT_BUNDLE_SEED |staticValue | | ||
|value |2000 |int | | ||
|tag |FAKE9VALUE |string | | ||
|address |SPLIT_TO_ADDRESS |staticValue | | ||
|
||
Then a transaction is issued referencing the previous transaction | ||
|keys |values |type | | ||
|seed |THE_BANK |staticList | | ||
|address |TEST_ADDRESS |staticValue | | ||
|value |11 |int | | ||
|tag |VALUE9TRANSACTION |string | | ||
|
||
#In the default test, the latest sent index will be 54. The next milestone issued should be 55. | ||
When a milestone is issued with index 51 and references: | ||
|keys |values |type | | ||
|transactions |previousTransaction |responseValue | | ||
|
||
#Give the node time to solidify the milestone | ||
And we wait "15" second/seconds | ||
|
||
Given "getBalances" is called on "nodeA-m3" with: | ||
|keys |values |type | | ||
|addresses |SPLIT_TO_ADDRESS |staticList | | ||
|
||
Then the response for "getBalances" should return with: | ||
|keys |values |type | | ||
|balances |2000 |intList | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
Feature: Test transaction confirmation | ||
|
||
Scenario: Invalid bundle doesnt affect ledger state | ||
We want to ascertain that ledger state is always calculated correctly. | ||
Even in the presence of invalid bundles being approved. | ||
|
||
Given "1" transaction is issued on "nodeA-m3" with: | ||
|keys |values |type | | ||
|address |TEST_ADDRESS |staticValue | | ||
|value |0 |int | | ||
|tag |ZERO9VALUE |string | | ||
|
||
Then an invalid bundle is generated referencing the previous transaction | ||
|
||
Then a transaction is issued referencing the previous transaction | ||
|keys |values |type | | ||
|seed |THE_BANK |staticList | | ||
|address |TEST_ADDRESS |staticValue | | ||
|value |10 |int | | ||
|tag |VALUE9TRANSACTION |string | | ||
|
||
#In the default test, the latest sent index will be 52. The next milestone issued should be 53. | ||
When a milestone is issued with index 51 and references: | ||
|keys |values |type | | ||
|transactions |previousTransaction |responseValue | | ||
|
||
#Give the node time to solidify the milestone | ||
And we wait "15" second/seconds | ||
|
||
Given "getBalances" is called on "nodeA-m3" with: | ||
|keys |values |type | | ||
|addresses |TEST_EMPTY_ADDRESS |staticList | | ||
|
||
Then the response for "getBalances" should return with: | ||
|keys |values |type | | ||
|balances |0 |int | | ||
|
||
|
||
Scenario: Incomplete bundle doesnt affect ledger state | ||
We want to ascertain that ledger state is always calculated correctly. | ||
Even in the presence of incomplete bundles being approved. | ||
|
||
Then "1" transaction is issued on "nodeA-m3" with: | ||
|keys |values |type | | ||
|address |TEST_ADDRESS |staticValue | | ||
|value |0 |int | | ||
|tag |ZERO9VALUE |string | | ||
|
||
Then an incomplete bundle is generated referencing the previous transaction with: | ||
|keys |values |type | | ||
|address |TEST_EMPTY_ADDRESS |staticValue | | ||
|tag |INCOMPLETE9TAG |string | | ||
|
||
Then a transaction is issued referencing the previous transaction | ||
|keys |values |type | | ||
|seed |THE_BANK |staticList | | ||
|address |TEST_ADDRESS |staticValue | | ||
|value |11 |int | | ||
|tag |VALUE9TRANSACTION |string | | ||
|
||
#In the default test, the latest sent index will be 53. The next milestone issued should be 54. | ||
When a milestone is issued with index 54 and references: | ||
|keys |values |type | | ||
|transactions |previousTransaction |responseValue | | ||
|
||
#Give the node time to solidify the milestone | ||
And we wait "10" second/seconds | ||
|
||
Given "getBalances" is called on "nodeA-m3" with: | ||
|keys |values |type | | ||
|addresses |TEST_EMPTY_ADDRESS |staticList | | ||
|
||
Then the response for "getBalances" should return with: | ||
|keys |values |type | | ||
|balances |0 |int | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you also move this to a different PR? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
defaults: &transaction_tests_config_files | ||
db: https://s3.eu-central-1.amazonaws.com/iotaledger-dbfiles/dev/Transactions_Tests_db.tar | ||
db_checksum: 756237276479da4b01deaa0c1211ca65a4c8ec6f081452ea7e8153648c53bd67 | ||
db: https://s3.eu-central-1.amazonaws.com/iotaledger-dbfiles/dev/TransactionsTestsDb.tar | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the change to this DB documented? |
||
db_checksum: 4d94ae65b38ea0f8461d5ec24e5140b20eb86590d54e87e30aa9a72b26a131be | ||
iri_args: ['--testnet-coordinator', | ||
'EFPNKGPCBXXXLIBYFGIGYBYTFFPIOQVNNVVWTTIYZO9NFREQGVGDQQHUUQ9CLWAEMXVDFSSMOTGAHVIBH', | ||
'--milestone-start', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,7 +173,6 @@ Feature: Test API calls on Machine 1 | |
Given "getBalances" is called on "nodeA-m4" with: | ||
|keys |values |type | | ||
|addresses |TEST_EMPTY_ADDRESS |staticList | | ||
|threshold |100 |int | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should have been part of #1768 |
||
|
||
Then the response for "getBalances" should return with: | ||
|keys |values |type | | ||
|
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.