@@ -756,9 +756,9 @@ Notice, that we import the :py:class:`AsyncIota` api class, because we
756
756
would like to use the asynchronous and concurrent features of PyOTA.
757
757
:py:class: `List ` from the :py:class: `typing ` library is needed for correct
758
758
type annotations, and we also import the `asyncio `_ library. This will come
759
- handy when we want to schedule and run the coroutines.
759
+ in handy when we want to schedule and run the coroutines.
760
760
761
- On line 6, we instantiate an asynchronous IOTA API . Functionally, it does the
761
+ On line 6, we instantiate an asynchronous IOTA api . Functionally, it does the
762
762
same operations as :py:class: `Iota `, but the api calls are defined as
763
763
coroutines. For this tutorial, we connect to a devnet node, and explicitly tell
764
764
this as well to the api on line 8.
@@ -795,15 +795,28 @@ transactions within the bundle to the network.
795
795
Once we sent the transfer, we collect individual transaction hashes from the
796
796
bundle, which we will use for confirmation checking.
797
797
798
- On line 39, the so called confirmation checking starts. With the help of
798
+ On line 39, the so- called confirmation checking starts. With the help of
799
799
:py:meth: `AsyncIota.get_inclusion_states `, we determine if our transactions
800
- have been confirmed by the network. The ``None `` value for the ``tips ``
801
- parameter in the argument list basically means that check against the latest
800
+ have been confirmed by the network.
801
+
802
+ .. note ::
803
+
804
+ You might wonder how your transactions get accepted by the network, that is,
805
+ how they become confirmed.
806
+
807
+ - Pre-`Coordicide `_ (current state), transactions are confirmed by
808
+ directly or indirectly being referenced by a `milestone `_.
809
+ A milestone is a special transaction issued by the `Coordinator `_.
810
+ - Post-`Coordicide `_ , confirmation is the result of nodes reaching
811
+ consensus by a `voting mechanism `_.
812
+
813
+ The ``None `` value for the ``tips ``
814
+ parameter in the argument list basically means that we check against the latest
802
815
milestone.
803
816
804
817
On line 43, we iterate over our original ``sent_tx_hashes `` list of sent
805
- transaction hashes and ``git_response ['states'] ``, which is a list of ``bool ``
806
- values, at the same time using the built in `zip `_ method. We also employ
818
+ transaction hashes and ``gis_response ['states'] ``, which is a list of ``bool ``
819
+ values, at the same time using the built- in `zip `_ method. We also employ
807
820
`enumerate `_, because we need the index of the elements in each iteration.
808
821
809
822
If a transaction is confirmed, we delete the corresponding elements from the
@@ -887,6 +900,10 @@ and run the following in a terminal:
887
900
.. _asyncio : https://docs.python.org/3/library/asyncio.html
888
901
.. _article : https://realpython.com/async-io-python/
889
902
.. _awaitable : https://docs.python.org/3/library/asyncio-task.html#awaitables
903
+ .. _Coordicide : https://coordicide.iota.org/
904
+ .. _milestone : https://docs.iota.org/docs/getting-started/0.1/network/the-coordinator#milestones
905
+ .. _coordinator : https://docs.iota.org/docs/getting-started/0.1/network/the-coordinator
906
+ .. _voting mechanism : https://coordicide.iota.org/module4.1
890
907
.. _zip : https://docs.python.org/3.3/library/functions.html#zip
891
908
.. _enumerate : https://docs.python.org/3.3/library/functions.html#enumerate
892
909
.. _gather : https://docs.python.org/3/library/asyncio-task.html#running-tasks-concurrently
0 commit comments