Hi @akalend,
If you don't understand we could ask @leader to help out in Russian (especially since he has successfully developed an ACME client).
In RFC 8555 it says
The server is said to "finalize" the authorization when it has
completed one of the validations. This is done by assigning the
authorization a status of "valid" or "invalid", corresponding to
whether it considers the account authorized for the identifier. If
the final state is "valid", then the server MUST include an "expires"
field. When finalizing an authorization, the server MAY remove
challenges other than the one that was completed, and it may modify
the "expires" field. The server SHOULD NOT remove challenges with
status "invalid".
Usually, the validation process will take some time, so the client
will need to poll the authorization resource to see when it is
finalized. For challenges where the client can tell when the server
has validated the challenge (e.g., by seeing an HTTP or DNS request
from the server), the client SHOULD NOT begin polling until it has
seen the validation request from the server.
To check on the status of an authorization, the client sends a POST-
as-GET request to the authorization URL, and the server responds with
the current authorization object. In responding to poll requests
while the validation is still in progress, the server MUST return a
200 (OK) response and MAY include a Retry-After header field to
suggest a polling interval to the client.
So yes, you need to poll (repeatedly ask for the status of the validation) in order to find out when the certificate authority is done. There are two stages of the RFC 8555 procedure where you have to "poll for status":
+-------------------+--------------------------------+--------------+
| Action | Request | Response |
+-------------------+--------------------------------+--------------+
| Get directory | GET directory | 200 |
| | | |
| Get nonce | HEAD newNonce | 200 |
| | | |
| Create account | POST newAccount | 201 -> |
| | | account |
| | | |
| Submit order | POST newOrder | 201 -> order |
| | | |
| Fetch challenges | POST-as-GET order's | 200 |
| | authorization urls | |
| | | |
| Respond to | POST authorization challenge | 200 |
| challenges | urls | |
| | | |
| Poll for status | POST-as-GET order | 200 |
| | | |
| Finalize order | POST order's finalize url | 200 |
| | | |
| Poll for status | POST-as-GET order | 200 |
| | | |
| Download | POST-as-GET order's | 200 |
| certificate | certificate url | |
+-------------------+--------------------------------+--------------+
You have to "poll for status" after responding to the challenges (while waiting for the certificate authority to finish checking them), and then again after finalizing the order (while waiting for the certificate authority to finish issuing the certificate).
I believe the reason for these steps in terms of the software architecture is that a different component of the certificate authority system is responsible for challenge validation (and for certificate issuance), and the amount of time either step can take is somewhat unpredictable.
If you get a retry-after:
header from the CA, you can use that as a guide for when to retry the request. In general, the typical delays that you would see with Let's Encrypt validation and issuance are much closer to 10 seconds than to 10 minutes.