-
Notifications
You must be signed in to change notification settings - Fork 217
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
Cluster of stake pools in integration tests #1734
Conversation
…to start It's actually nice to be able to tell what's going on. The command-line will likely undergo changes so it's really likely that a command that used to work will fail. The previous message was sort of opaque / cryptic. Now we get a better error.
This makes sure that a stake pool joins the cluster only after it has been registered and is ready to process block.
The issue with 'withAsync' is that it's actually synchronous. While the underlying action is executed in a thread, 'withAsync' will only resolve when the async action is done. Yet, in our case, we want all async actions to run in parallel and to be stopped when the test suite is completed.
With a slot length of 0.2, blocks are produced at a much faster pace.
@@ -104,14 +104,13 @@ spec = do | |||
let networkParams = getFromResponse id r | |||
networkParams `shouldBe` | |||
toApiNetworkParameters (ctx ^. #_networkParameters) | |||
let Right zeroPercent = Quantity <$> mkPercentage 0 | |||
let Right zeroPercent = Quantity <$> mkPercentage 75 |
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.
?
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.
yeah, why 75
?
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.
Because the d-parameter is now set to 0.25
(was 1) to allow both the BFT node and pools to produce blocks. We actually report (1 - d) in the API, hence 75% here. We are 75% decentralized in the integration test.
@@ -32,7 +31,8 @@ updateQuorum: 5 | |||
maxMajorPV: 25446 | |||
initialFunds: {} | |||
maxLovelaceSupply: 45000000000000000 | |||
networkMagic: 1 | |||
protocolMagicId: 1 | |||
networkMagic: 764824073 |
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.
why we need this?
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.
While new Shelley addresses uses the new protocolMagic (1
), the network still uses the old magic (764824073
). This is therefore needed to match the right network configuration of the cluster.
] | ||
pure file | ||
|
||
-- | Generate a raw transaction. We kill two birds one stone here by also |
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.
aha
bors r+ |
1734: Cluster of stake pools in integration tests r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> N/A # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - de6fec0 📍 **add command-line helpers for generating stake key and certificates** - 50ae861 📍 **improve error handling and reporting when member of the cluster fail to start** It's actually nice to be able to tell what's going on. The command-line will likely undergo changes so it's really likely that a command that used to work will fail. The previous message was sort of opaque / cryptic. Now we get a better error. - 772c813 📍 **fixup add new gen methods** - bb2b82e 📍 **register stake pool and delegate funds to it using genesis faucets.** This makes sure that a stake pool joins the cluster only after it has been registered and is ready to process block. - e08d5cd 📍 **Drop use of 'withAsync' so pools boot in parallel** The issue with 'withAsync' is that it's actually synchronous. While the underlying action is executed in a thread, 'withAsync' will only resolve when the async action is done. Yet, in our case, we want all async actions to run in parallel and to be stopped when the test suite is completed. - de7559f 📍 **make the node a little less verbose regarding forging** With a slot length of 0.2, blocks are produced at a much faster pace. - b2b3c0b 📍 **tweak genesis parameters with sensible values** A value of '1' for the active slot coefficient makes actually no sense. Only small values of it are considered sensible. Tweaking also the decentralization level so that some blocks are deferred to registered stake pools - adf9dda 📍 **start a cluster of 3 pools when running integration tests** - aaf7d6d 📍 **show little disclaimer when starting integration tests** - 2d7ece5 📍 **do not restart the cluster between CLI and API spec** We have a limited number of faucets, and it takes quite some time now # Comments <!-- Additional comments or screenshots to attach if any --> With this, we should be able to test all sort of things regarding pools o/ <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <[email protected]>
Build failed |
A value of '1' for the active slot coefficient makes actually no sense. Only small values of it are considered sensible. Tweaking also the decentralization level so that some blocks are deferred to registered stake pools
We have a limited number of faucets, and it takes quite some time now
8d615d4
to
2f94a92
Compare
bors r+ |
1734: Cluster of stake pools in integration tests r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> N/A # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - de6fec0 📍 **add command-line helpers for generating stake key and certificates** - 50ae861 📍 **improve error handling and reporting when member of the cluster fail to start** It's actually nice to be able to tell what's going on. The command-line will likely undergo changes so it's really likely that a command that used to work will fail. The previous message was sort of opaque / cryptic. Now we get a better error. - 772c813 📍 **fixup add new gen methods** - bb2b82e 📍 **register stake pool and delegate funds to it using genesis faucets.** This makes sure that a stake pool joins the cluster only after it has been registered and is ready to process block. - e08d5cd 📍 **Drop use of 'withAsync' so pools boot in parallel** The issue with 'withAsync' is that it's actually synchronous. While the underlying action is executed in a thread, 'withAsync' will only resolve when the async action is done. Yet, in our case, we want all async actions to run in parallel and to be stopped when the test suite is completed. - de7559f 📍 **make the node a little less verbose regarding forging** With a slot length of 0.2, blocks are produced at a much faster pace. - b2b3c0b 📍 **tweak genesis parameters with sensible values** A value of '1' for the active slot coefficient makes actually no sense. Only small values of it are considered sensible. Tweaking also the decentralization level so that some blocks are deferred to registered stake pools - adf9dda 📍 **start a cluster of 3 pools when running integration tests** - aaf7d6d 📍 **show little disclaimer when starting integration tests** - 2d7ece5 📍 **do not restart the cluster between CLI and API spec** We have a limited number of faucets, and it takes quite some time now # Comments <!-- Additional comments or screenshots to attach if any --> With this, we should be able to test all sort of things regarding pools o/ <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <[email protected]>
Build failed |
bors r+ |
1734: Cluster of stake pools in integration tests r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> N/A # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - de6fec0 📍 **add command-line helpers for generating stake key and certificates** - 50ae861 📍 **improve error handling and reporting when member of the cluster fail to start** It's actually nice to be able to tell what's going on. The command-line will likely undergo changes so it's really likely that a command that used to work will fail. The previous message was sort of opaque / cryptic. Now we get a better error. - 772c813 📍 **fixup add new gen methods** - bb2b82e 📍 **register stake pool and delegate funds to it using genesis faucets.** This makes sure that a stake pool joins the cluster only after it has been registered and is ready to process block. - e08d5cd 📍 **Drop use of 'withAsync' so pools boot in parallel** The issue with 'withAsync' is that it's actually synchronous. While the underlying action is executed in a thread, 'withAsync' will only resolve when the async action is done. Yet, in our case, we want all async actions to run in parallel and to be stopped when the test suite is completed. - de7559f 📍 **make the node a little less verbose regarding forging** With a slot length of 0.2, blocks are produced at a much faster pace. - b2b3c0b 📍 **tweak genesis parameters with sensible values** A value of '1' for the active slot coefficient makes actually no sense. Only small values of it are considered sensible. Tweaking also the decentralization level so that some blocks are deferred to registered stake pools - adf9dda 📍 **start a cluster of 3 pools when running integration tests** - aaf7d6d 📍 **show little disclaimer when starting integration tests** - 2d7ece5 📍 **do not restart the cluster between CLI and API spec** We have a limited number of faucets, and it takes quite some time now # Comments <!-- Additional comments or screenshots to attach if any --> With this, we should be able to test all sort of things regarding pools o/ <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <[email protected]>
Build failed |
This prevents some race-condition where pools would start making queries but being not fully started _yet_.
064e6ac
to
2f1c24e
Compare
bors r+ |
1734: Cluster of stake pools in integration tests r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> N/A # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - de6fec0 📍 **add command-line helpers for generating stake key and certificates** - 50ae861 📍 **improve error handling and reporting when member of the cluster fail to start** It's actually nice to be able to tell what's going on. The command-line will likely undergo changes so it's really likely that a command that used to work will fail. The previous message was sort of opaque / cryptic. Now we get a better error. - 772c813 📍 **fixup add new gen methods** - bb2b82e 📍 **register stake pool and delegate funds to it using genesis faucets.** This makes sure that a stake pool joins the cluster only after it has been registered and is ready to process block. - e08d5cd 📍 **Drop use of 'withAsync' so pools boot in parallel** The issue with 'withAsync' is that it's actually synchronous. While the underlying action is executed in a thread, 'withAsync' will only resolve when the async action is done. Yet, in our case, we want all async actions to run in parallel and to be stopped when the test suite is completed. - de7559f 📍 **make the node a little less verbose regarding forging** With a slot length of 0.2, blocks are produced at a much faster pace. - b2b3c0b 📍 **tweak genesis parameters with sensible values** A value of '1' for the active slot coefficient makes actually no sense. Only small values of it are considered sensible. Tweaking also the decentralization level so that some blocks are deferred to registered stake pools - adf9dda 📍 **start a cluster of 3 pools when running integration tests** - aaf7d6d 📍 **show little disclaimer when starting integration tests** - 2d7ece5 📍 **do not restart the cluster between CLI and API spec** We have a limited number of faucets, and it takes quite some time now # Comments <!-- Additional comments or screenshots to attach if any --> With this, we should be able to test all sort of things regarding pools o/ <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <[email protected]>
Build failed |
bors try |
tryBuild failed |
the initial submitTx was also failing sometimes
bors try |
tryBuild failed |
This reverts commit 8b89aad. It didn't work anyway.
It now makes a single payment with many outputs, instead of many payments with a single output. This is to cope with the absence of transaction scheduler in the wallet at the moment where pending outgoing transaction aren't automatically re-submitted after rollback.
bors r+ |
Build succeeded |
Issue Number
N/A
Overview
de6fec0
📍 add command-line helpers for generating stake key and certificates
50ae861
📍 improve error handling and reporting when member of the cluster fail to start
It's actually nice to be able to tell what's going on. The command-line will likely undergo changes so it's really likely
that a command that used to work will fail. The previous message was sort of opaque / cryptic. Now we get a better error.
772c813
📍 fixup add new gen methods
bb2b82e
📍 register stake pool and delegate funds to it using genesis faucets.
This makes sure that a stake pool joins the cluster only after it has been registered and is ready to process block.
e08d5cd
📍 Drop use of 'withAsync' so pools boot in parallel
The issue with 'withAsync' is that it's actually synchronous.
While the underlying action is executed in a thread, 'withAsync' will
only resolve when the async action is done. Yet, in our case, we want
all async actions to run in parallel and to be stopped when the test
suite is completed.
de7559f
📍 make the node a little less verbose regarding forging
With a slot length of 0.2, blocks are produced at a much faster pace.
b2b3c0b
📍 tweak genesis parameters with sensible values
A value of '1' for the active slot coefficient makes actually no sense. Only small values of it are
considered sensible. Tweaking also the decentralization level so that some blocks are deferred to
registered stake pools
adf9dda
📍 start a cluster of 3 pools when running integration tests
aaf7d6d
📍 show little disclaimer when starting integration tests
2d7ece5
📍 do not restart the cluster between CLI and API spec
We have a limited number of faucets, and it takes quite some time now
Comments
With this, we should be able to test all sort of things regarding pools o/