Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Feature: Adds progress bar and estimated time until the node is synced #1575

Merged
merged 11 commits into from
Aug 28, 2019

Conversation

luca-moser
Copy link
Member

@luca-moser luca-moser commented Aug 21, 2019

Description

Adds a progress bar and estimated time (in seconds) until the node is synced .

  • States how many milestones need to be applied to the ledger
  • Uses the last 20 milestone application times to calculate the estimated seconds needed to get synced
  • Changes log output to utf8

Example (log shortened, full log: https://ybin.me/p/cb75fc8bf6dd365b#K1ibi/csfBkxD/yv6sNLAeKuF8iGX9ms44C3iIhGfRs=):

...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓░░░░░░░░░░░░(17%)░░░░░░░░░░░░░░░] [LSM 1147868 / LM 1148009 - to apply 141] - est. seconds to get synced: 163
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓░░░░░░░░░(20%)░░░░░░░░░░░░░░░] [LSM 1147874 / LM 1148009 - to apply 135] - est. seconds to get synced: 56
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓░░░░░░░░░(21%)░░░░░░░░░░░░░░░] [LSM 1147875 / LM 1148009 - to apply 134] - est. seconds to get synced: 59
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓░░░░░░░░░(24%)░░░░░░░░░░░░░░░] [LSM 1147881 / LM 1148009 - to apply 128] - est. seconds to get synced: 131
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓░░░░░░░░░(27%)░░░░░░░░░░░░░░░] [LSM 1147885 / LM 1148009 - to apply 124] - est. seconds to get synced: 134
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓░░░░░░(30%)░░░░░░░░░░░░░░░] [LSM 1147891 / LM 1148009 - to apply 118] - est. seconds to get synced: 129
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓░░░░░░(33%)░░░░░░░░░░░░░░░] [LSM 1147896 / LM 1148009 - to apply 113] - est. seconds to get synced: 63
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓░░░░░░(36%)░░░░░░░░░░░░░░░] [LSM 1147901 / LM 1148009 - to apply 108] - est. seconds to get synced: 60
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓░░░░░░(38%)░░░░░░░░░░░░░░░] [LSM 1147905 / LM 1148009 - to apply 104] - est. seconds to get synced: 56
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓░░░(42%)░░░░░░░░░░░░░░░] [LSM 1147911 / LM 1148009 - to apply 98] - est. seconds to get synced: 50
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓░░░(45%)░░░░░░░░░░░░░░░] [LSM 1147916 / LM 1148009 - to apply 93] - est. seconds to get synced: 51
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓░░░(47%)░░░░░░░░░░░░░░░] [LSM 1147920 / LM 1148009 - to apply 89] - est. seconds to get synced: 51
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(50%)░░░░░░░░░░░░░░░] [LSM 1147924 / LM 1148009 - to apply 85] - est. seconds to get synced: 52
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(52%)░░░░░░░░░░░░░░░] [LSM 1147929 / LM 1148009 - to apply 80] - est. seconds to get synced: 52
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(55%)░░░░░░░░░░░░░░░] [LSM 1147933 / LM 1148009 - to apply 76] - est. seconds to get synced: 49
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(57%)░░░░░░░░░░░░░░░] [LSM 1147937 / LM 1148009 - to apply 72] - est. seconds to get synced: 47
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(58%)░░░░░░░░░░░░░░░] [LSM 1147939 / LM 1148009 - to apply 70] - est. seconds to get synced: 45
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(59%)░░░░░░░░░░░░░░░] [LSM 1147940 / LM 1148009 - to apply 69] - est. seconds to get synced: 62
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(60%)▓▓▓░░░░░░░░░░░░] [LSM 1147941 / LM 1148009 - to apply 68] - est. seconds to get synced: 76
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(63%)▓▓▓░░░░░░░░░░░░] [LSM 1147947 / LM 1148009 - to apply 62] - est. seconds to get synced: 69
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(68%)▓▓▓░░░░░░░░░░░░] [LSM 1147955 / LM 1148009 - to apply 54] - est. seconds to get synced: 51
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(72%)▓▓▓▓▓▓░░░░░░░░░] [LSM 1147963 / LM 1148010 - to apply 47] - est. seconds to get synced: 18
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(76%)▓▓▓▓▓▓░░░░░░░░░] [LSM 1147970 / LM 1148010 - to apply 40] - est. seconds to get synced: 15
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(79%)▓▓▓▓▓▓░░░░░░░░░] [LSM 1147975 / LM 1148010 - to apply 35] - est. seconds to get synced: 15
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(83%)▓▓▓▓▓▓▓▓▓░░░░░░] [LSM 1147981 / LM 1148010 - to apply 29] - est. seconds to get synced: 13
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(87%)▓▓▓▓▓▓▓▓▓░░░░░░] [LSM 1147988 / LM 1148010 - to apply 22] - est. seconds to get synced: 10
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(90%)▓▓▓▓▓▓▓▓▓▓▓▓░░░] [LSM 1147994 / LM 1148010 - to apply 16] - est. seconds to get synced: 6
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(94%)▓▓▓▓▓▓▓▓▓▓▓▓░░░] [LSM 1148001 / LM 1148010 - to apply 9] - est. seconds to get synced: 3
...Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(99%)▓▓▓▓▓▓▓▓▓▓▓▓░░░] [LSM 1148009 / LM 1148010 - to apply 1] - est. seconds to get synced: 0

Fixes # (issue)
#1572

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How Has This Been Tested?

Running it on a node.

Checklist:

  • My code follows the style guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@iotaledger iotaledger deleted a comment Aug 21, 2019
@iotaledger iotaledger deleted a comment Aug 21, 2019
Copy link
Contributor

@GalRogozinski GalRogozinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice,
Will soon run it

MilestoneService milestoneService, LedgerService ledgerService,
LatestMilestoneTracker latestMilestoneTracker, TransactionRequester transactionRequester) {
MilestoneService milestoneService, LedgerService ledgerService,
LatestMilestoneTracker latestMilestoneTracker, TransactionRequester transactionRequester) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This goes over the 120 columns limit
When I do auto-formatting on my IDE I get a different result 🤷‍♂️

Are you using the auto-formatting instructions from https://github.com/iotaledger/iri/blob/dev/STYLEGUIDE.md#formatting?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but anyways, I reverted all the accidental reformats.

@@ -165,7 +178,7 @@ public void trackLatestSolidMilestone() throws MilestoneException {
logChange(currentSolidMilestoneIndex);

currentSolidMilestoneIndex = snapshotProvider.getLatestSnapshot().getIndex();
if(currentSolidMilestoneIndex == latestMilestoneTracker.getLatestMilestoneIndex()){
if (currentSolidMilestoneIndex == latestMilestoneTracker.getLatestMilestoneIndex()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -193,7 +206,8 @@ private void latestSolidMilestoneTrackerThread() {
firstRun = false;

ledgerService.restoreLedgerState();
logChange(snapshotProvider.getInitialSnapshot().getIndex());
milestoneStartIndex = snapshotProvider.getInitialSnapshot().getIndex();
logChange(milestoneStartIndex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@GalRogozinski GalRogozinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, while testing your code, my node refuses to get synced 🤷‍♂️

I tried to look again in the code more critically. Couldn't find the reason.. but found other things for you to fix :-P

/**
* The actual start milestone index from which the node started from
*/
private int milestoneStartIndex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you maybe remove this field due to two reasons:

  1. Once it is here we get another object that is a source of milestoneStartIndex. Sometimes later another dev will come along and add a getter for this. Eventually the design will become more spaghetti. The way we try to prevent spaghetti design is by having all leaving "service" class stateless by depend on other stateless "service" classes, and having data come from data providers so that we have one source of truth.

  2. IIUC, you only initialize this field once when the tracker service first runs. So if the node comes out of sync again but doesn't get shut down (e.g. internet connection was lost), then the next time the starting point will be wrong... so I think this is a bug

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variables are now in an inner class.

* Used to keep track of the times when the last N milestones got applied:
* used to calculate the average time needed to apply a milestone.
*/
private ArrayBlockingQueue<Long> lastMilestoneApplyTimes = new ArrayBlockingQueue<>(20);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also should be cleared after the node is synced...

What I think will be the best design for the new two fields is to create a private inner class SyncProgressBar (or whatever other appropriate name) that will hold those two fields.
Every time the node gets synced you clear them both.
All the methods that manipulate this progress bar will be in this class.

Of course AsciiProgressBar will remain a public utility class

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am now hiding the variables in an inner class. States get reset on each application where the node is synced.

int progressBlocks = (int) (10 * percentage);
StringBuilder progressBarSB = new StringBuilder(progressBlocks);
progressBarSB.append("[");
for (int i = 0; i < 10; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional:
Usually numbers are private static final

Since this is a small utility class I care less whether you change it or not

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are you referring to?

@GalRogozinski
Copy link
Contributor

Node finally starts syncing after a few restarts:

I got my first log output to start from 17%. Then no log appears for a while, then it starts from 6%:

08/21 14:34:21.697 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓░░░░░░░░░░░░(17%)░░░░░░░░░░░░░░░] [LSM 1146755 / LM 1147239 - to apply 484]
08/21 14:34:22.139 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1147249 [20 / 977]
08/21 14:34:25.148 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1147245 [20 / 980]
08/21 14:34:28.153 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1147237 [20 / 980]
08/21 14:34:28.628 [Tips Requester] INFO  TipsRequesterImpl:86 - toProcess = 90 , toBroadcast = 0 , toRequest = 172 , toReply = 0 / totalTransactions = 485241
08/21 14:34:31.154 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1147231 [20 / 989]

...

08/21 14:38:31.929 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [░░░░░░░░░░░░░░░(6%)░░░░░░░░░░░░░░░] [LSM 1146757 / LM 1148252 - to apply 1495] - est. seconds to get synced: 0
08/21 14:38:34.406 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1146790 [19 / 1425]
08/21 14:38:34.930 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [░░░░░░░░░░░░░░░(7%)░░░░░░░░░░░░░░░] [LSM 1146766 / LM 1148252 - to apply 1486] - est. seconds to get synced: 881
08/21 14:38:37.410 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1146801 [18 / 1424]
08/21 14:38:37.934 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [░░░░░░░░░░░░░░░(8%)░░░░░░░░░░░░░░░] [LSM 1146791 / LM 1148252 - to apply 1461] - est. seconds to get synced: 146
08/21 14:38:38.721 [Tips Requester] INFO  TipsRequesterImpl:86 - toProcess = 0 , toBroadcast = 0 , toRequest = 19 , toReply = 0 / totalTransactions = 693410
08/21 14:38:39.008 [pool-12-thread-1] INFO  BatchedBCTCurl:103 - batching saturation ratio 38.0% (processed 5654 / max possible 14656), cycles 229, avg. cycle time 87.0ms
08/21 14:38:40.411 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1146816 [20 / 1406]
08/21 14:38:40.934 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [░░░░░░░░░░░░░░░(9%)░░░░░░░░░░░░░░░] [LSM 1146807 / LM 1148252 - to apply 1445] - est. seconds to get synced: 154
08/21 14:38:43.411 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1146808 [1 / 1387]
08/21 14:38:44.588 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - Latest SOLID milestone index changed from #1146807 to #1146808
08/21 14:38:46.413 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1146847 [19 / 1385]
08/21 14:38:47.588 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓░░░░░░░░░░░░(11%)░░░░░░░░░░░░░░░] [LSM 1146838 / LM 1148252 - to apply 1414] - est. seconds to get synced: 152
08/21 14:38:48.723 [Tips Requester] INFO  TipsRequesterImpl:86 - toProcess = 0 , toBroadcast = 0 , toRequest = 19 , toReply = 0 / totalTransactions = 693480
08/21 14:38:49.413 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1146864 [19 / 1365]
08/21 14:38:50.596 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓░░░░░░░░░░░░(12%)░░░░░░░░░░░░░░░] [LSM 1146847 / LM 1148252 - to apply 1405] - est. seconds to get synced: 151
08/21 14:38:52.424 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1146872 [20 / 1346]
08/21 14:38:53.597 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓░░░░░░░░░░░░(12%)░░░░░░░░░░░░░░░] [LSM 1146852 / LM 1148252 - to apply 1400] - est. seconds to get synced: 488
08/21 14:38:55.425 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1146884 [12 / 1338]
08/21 14:38:56.597 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓░░░░░░░░░░░░(13%)░░░░░░░░░░░░░░░] [LSM 1146876 / LM 1148252 - to apply 1376] - est. seconds to get synced: 183
08/21 14:38:58.426 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1146905 [20 / 1326]
08/21 14:38:58.724 [Tips Requester] INFO  TipsRequesterImpl:86 - toProcess = 0 , toBroadcast = 0 , toRequest = 19 , toReply = 0 / totalTransactions = 693534
08/21 14:38:59.118 [pool-12-thread-1] INFO  BatchedBCTCurl:103 - batching saturation ratio 3.0% (processed 313 / max possible 7936), cycles 124, avg. cycle time 162.0ms
08/21 14:38:59.597 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓░░░░░░░░░░░░(14%)░░░░░░░░░░░░░░░] [LSM 1146887 / LM 1148252 - to apply 1365] - est. seconds to get synced: 133
08/21 14:39:01.428 [Milestone Solidifier] INFO  MilestoneSolidifier:392 - Solidifying milestone #1146918 [20 / 1306]

Not a big deal... if you can fix it quick great! If not then we can live with this.

@luca-moser
Copy link
Member Author

You're seeing 17% first because the node didn't know about the actual real latest milestone:
[▓▓▓░░░░░░░░░░░░(17%)░░░░░░░░░░░░░░░] [LSM 1146755 / LM **1147239** - to apply 484]
[░░░░░░░░░░░░░░░(6%)░░░░░░░░░░░░░░░] [LSM 1146757 / LM **1148252** - to apply 1495]

@GalRogozinski
Copy link
Contributor

2 other things I just noticed:

08/21 14:48:02.820 [Latest Solid Milestone Tracker] INFO  LatestSolidMilestoneTrackerImpl:392 - [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓(99%)▓▓▓▓▓▓▓▓▓▓▓▓░░░] [LSM 1148254 / LM 1148259 - to apply 5] - est. seconds to get synced: 0

When the progress bar is at 99% there seem to be 3 empty blocks. I would expect 1 or 0 empty blocks.

Also the seconds to get synced to fluctuate quite a lot... It looks really funny.
I propose 2 changes:

  1. Maybe assume some constant time between milestones. At least we will have the time constantly decreasing instead of seeing this roller coaster ride
  2. If we change to minutes maybe it will be a better user experience

If you have other ideas they are also welcome :-)

@luca-moser
Copy link
Member Author

I truncated the progress bar, because 3 blocks are equal 10%, so now it simply is 10 blocks instead of 30s. Makes the progress bar also smaller.

@luca-moser
Copy link
Member Author

I've upped the amount of entries in the application times to 100 so get a better average. Milestone applications are very random in nature of how long they take because usually a batch of them gets applied at once or it can be stagnant for a longer period of time, depending on how the node actually can solidify a given milestone. Just adding a static value imho would not make it better.

@iotaledger iotaledger deleted a comment Aug 21, 2019
Copy link
Contributor

@GalRogozinski GalRogozinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one more style request which will be enforced by checkstyle

/**
* Holds variables containing information needed for sync progress calculation.
*/
private static class SyncProgressInfo {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As part of automating annoying requests I opened #1577 (please review) which forces to put inner classes in the end.
So just please cut and paste this to the end

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved

/**
* Used to calculate the average time needed to apply a milestone.
*/
private ArrayBlockingQueue<Long> lastMilestoneApplyTimes = new ArrayBlockingQueue<>(100);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are cutting and pasting you can change the declarative type to BlockingQueue if you want.
We have the LooseCoupling configured in PMD but apparently it doesn't catch this...

So technically it is something we enforce, but since it can't be automated (I believe annoying rules should be automated) and it is a private member in a private class then I won't be insistent on it. Just try to abstract what you can in general.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

@GalRogozinski GalRogozinski merged commit 769c992 into iotaledger:dev Aug 28, 2019
@DyrellC
Copy link
Contributor

DyrellC commented Sep 26, 2019

BUG REPORT
This PR had the unfortunate side effect of slowing down the speed at which solid milestones solidify. This can at times cause an issue with submitting transactions to the node as the solid subtangle index has not updated yet, so any gtta responses will fail and respond with a 400 code. This goes for issuing new milestones as well. This demonstrates itself most vividly when creating testnet databases for regression tests. A minimum of 3 second delays have needed to be used to ensure milestone issuance, but even in that case there's still a possibility of a 400 return as milestones start to get backed up in the solidification queue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants