Jormungandr: The slot_duration is not respected when sending multiple transactions at the same time

Created on 26 Jul 2019  路  6Comments  路  Source: input-output-hk/jormungandr

Describe the bug
When initiating transactions from 10 different Accounts at the same time (same slot), the duration of the slot is not respected anymore (it goes from configured 5s to 2-4 secs).

To Reproduce
Steps to reproduce the behavior:

  1. use this branch/folder - https://github.com/dorin100/jormungandr/tree/parallelTransactions/scripts/multipleParallelTransactions
  2. execute the bootstrap script with a custom slot_duration (in BFT mode) --> bash bootstrap -b -s 5
  3. start the node --> jormungandr --genesis-block ./block-0.bin --config ./config.yaml --secret ./pool-secret1.yaml
  4. execute multipleBashScripts.sh script --> bash multipleBashScripts.sh
  5. the script is creating 10 Accounts and then it send funds from Faucet to each Account - 1 transaction per slot; everything is fine here - if you look on Node Logs, slot_duration = 5s
  6. when the script gets to step no 3 and executes multiple-transactions-per-slot-2-accounts.sh script (sending 40 transactions from each previously created account - as fast as possible), the slot_duration goes to 2-4 secs (starting with bloc 0.22)

Expected behavior
slot_duration should be constant - having the configured value.

Additional context

  • multiple-transactions-per-slot-2-accounts.sh script is creating and sending many transactions (40 in this case) as fast as possible
  • multipleBashScripts.sh script is running multiple-transactions-per-slot-2-accounts.sh scipt in parallel (10 times in this case)

nodeLogs.txt
scriptLogs.txt
slot_duration_change

wontfix

Most helpful comment

The assumption about time slot / duration / start are not right; the block doesn't have to be produced at the very beginning of a slot and at constant time, the only thing we're trying to respect is that the block of date X should be broadcast during the date X time frame.

Otherwise yes if you load the machine, then it's quite possible that you'll eventually diverge from that, to the point of:

  1. you can take more time than the slot to actually make the block
  2. you can wake up at random time / quite late in the process, the system offers no guarantee that we will be wake up at the time we expect it to be wake up, this is not a realtime process nor that we need any of these guarantee
  3. It's fine to miss a slot, the system too busy to process anything would do that
  4. it's fine to broadcast the block too late, it's either accepted with the understanding this is the broadcast window or eventually the consensus will drop the block anyway

Also, there's not going to be a single node that constantly produce a block, so that the load is shared between machine of the cluster, and this is would be thus impossible to reproduce

Now it doesn't really make sense to stress test the system now, we're not at this phase and haven't tweak the system nor put in place the limitation against DoS and other limitations.

Eventually that will be interesting to push the system to its limits, but now it's not the time.

All 6 comments

os: Linux 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u1 (2019-07-19) x86_64 GNU/Linux
rustc --version: rustc 1.36.0 (a53f9df32 2019-07-03)
cargo --version: cargo 1.36.0 (c4fcfb725 2019-05-15)
node build with: cargo fetch && cargo build --frozen (debug binaries)
node build from: ae56df9a63ddf36184bbb1824c86beee669208fb

########################################################
* Consensus      : bft
* REST Port      : 8443
* Slot duration  : 5
* Slots per epoch: 5000
########################################################
* CLI  version: jcli 0.3.1
* NODE version: jormungandr 0.3.1
########################################################

@dorin100 - Used your scripts in different scenarios with 40 - 100 - 200 transactions per account.
slot_duration was always on time. It never missed 5 secs.

_Can you check the CPU usage during the transactions period._

Jul 26 08:13:21.809 INFO storing blockchain in '"/usr/local/src/BlockChain/CARDANO/01_testnet/jormungandr-storage-test/blocks.sqlite"', task: init
Jul 26 08:13:21.819 INFO restoring state at tip fc3bda9cc21151aaea28752b60a81218f05ee1d04d1477b694222ba1a9f0db27, task: bootstrap
Jul 26 08:13:21.823 INFO restoring state from block0 f4328d9c29e9e17ebb84a91e026e9b693e1c972ef852346d4a683641be3ca365, task: bootstrap
Jul 26 08:13:23.056 WARN no gRPC peers specified, skipping bootstrap, task: bootstrap
Jul 26 08:13:23.057 INFO starting task, task: client-query
Jul 26 08:13:23.057 INFO starting task, task: network
Jul 26 08:13:23.058 INFO our node id: 96562978748834285107450964249776743485, task: network
Jul 26 08:13:23.058 INFO adding P2P Topology module: trusted-peers, task: network
Jul 26 08:13:23.058 INFO start listening and accepting gRPC connections on 127.0.0.1:8299, task: network
Jul 26 08:13:23.062 INFO preparing, task: leadership
Jul 26 08:13:23.062 INFO starting, task: leadership
Jul 26 08:13:23.062 INFO starting, sub_task: End Of Epoch Reminder, task: leadership
Jul 26 08:13:26.004 INFO Leader scheduled event, scheduled_at_date: 0.328, scheduled at_time: SystemTime { tv_sec: 1564128806, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:13:26.197 INFO block added successfully to Node's blockchain, date: 0.328, id: 241ec8836d798943a653336d4e082912cef35a2698be9a1a4cedcf4cecfad59e, task: block
Jul 26 08:13:31.018 INFO Leader scheduled event, scheduled_at_date: 0.329, scheduled at_time: SystemTime { tv_sec: 1564128811, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:13:31.091 INFO block added successfully to Node's blockchain, date: 0.329, id: b3a542e2022f47849a556571a8ee783c4b39bbfc208d93f92cdc4015c8edb88c, task: block
Jul 26 08:13:36.005 INFO Leader scheduled event, scheduled_at_date: 0.330, scheduled at_time: SystemTime { tv_sec: 1564128816, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:13:36.083 INFO block added successfully to Node's blockchain, date: 0.330, id: 2384c47d9baacb8c8ec88afc34a24728cb91b8a54035628b64a91b21ded5a785, task: block
Jul 26 08:13:41.004 INFO Leader scheduled event, scheduled_at_date: 0.331, scheduled at_time: SystemTime { tv_sec: 1564128821, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:13:41.094 INFO block added successfully to Node's blockchain, date: 0.331, id: 74664fe7b8ecbdc6ac2b5064b425d0eb58016fd90a9966b9fb2d2bb637eac374, task: block
Jul 26 08:13:46.006 INFO Leader scheduled event, scheduled_at_date: 0.332, scheduled at_time: SystemTime { tv_sec: 1564128826, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:13:46.104 INFO block added successfully to Node's blockchain, date: 0.332, id: d0cd71940fa2dca9567ee3fc9a6a0594882cb58f5a4c3a77e0e6cd2af786e9f5, task: block
Jul 26 08:13:51.006 INFO Leader scheduled event, scheduled_at_date: 0.333, scheduled at_time: SystemTime { tv_sec: 1564128831, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:13:51.105 INFO block added successfully to Node's blockchain, date: 0.333, id: fdcf691a061f49a6e497704184c882a5a89f5f9e016bbaae9030e0131d641cd6, task: block
Jul 26 08:13:56.007 INFO Leader scheduled event, scheduled_at_date: 0.334, scheduled at_time: SystemTime { tv_sec: 1564128836, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:13:56.106 INFO block added successfully to Node's blockchain, date: 0.334, id: 6b035b2bd1511c443a112cb6d8e9353d9458d52656951d2273e3d9dfc5288ad6, task: block
Jul 26 08:14:01.008 INFO Leader scheduled event, scheduled_at_date: 0.335, scheduled at_time: SystemTime { tv_sec: 1564128841, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:01.124 INFO block added successfully to Node's blockchain, date: 0.335, id: 0ec57fc4412c14b4821abbcc346c70d7d00e36873f28c42ab98630a2a7869e27, task: block
Jul 26 08:14:06.008 INFO Leader scheduled event, scheduled_at_date: 0.336, scheduled at_time: SystemTime { tv_sec: 1564128846, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:06.108 INFO block added successfully to Node's blockchain, date: 0.336, id: c72126bdf830719c0df58b7dc0d3b4043d05c4d4a9b9227a19d0550762513b7e, task: block
Jul 26 08:14:11.013 INFO Leader scheduled event, scheduled_at_date: 0.337, scheduled at_time: SystemTime { tv_sec: 1564128851, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:11.109 INFO block added successfully to Node's blockchain, date: 0.337, id: b519c3aeffbbdc98be57dde6a6504dcb1186f417016d8e44972e33f3ce106878, task: block
Jul 26 08:14:16.009 INFO Leader scheduled event, scheduled_at_date: 0.338, scheduled at_time: SystemTime { tv_sec: 1564128856, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:16.110 INFO block added successfully to Node's blockchain, date: 0.338, id: b89f56378da81ad0246532b439f3d21f0f46b9d54b472224f55359ec143b6c78, task: block
Jul 26 08:14:21.010 INFO Leader scheduled event, scheduled_at_date: 0.339, scheduled at_time: SystemTime { tv_sec: 1564128861, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:21.095 INFO block added successfully to Node's blockchain, date: 0.339, id: c3629d550645d53ff74f3c26b7ac3d0d04c4ea35ff4159395b9ae33858b9e094, task: block
Jul 26 08:14:26.010 INFO Leader scheduled event, scheduled_at_date: 0.340, scheduled at_time: SystemTime { tv_sec: 1564128866, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:26.096 INFO block added successfully to Node's blockchain, date: 0.340, id: f89808417fec5bfaad430b4c6ca4c48dac765ebfdb47b9238d0322e5ff10428b, task: block
Jul 26 08:14:31.011 INFO Leader scheduled event, scheduled_at_date: 0.341, scheduled at_time: SystemTime { tv_sec: 1564128871, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:31.849 INFO block added successfully to Node's blockchain, date: 0.341, id: 587d876e7f8e023e01b74baa9430fa47cc62249400f1eefbec10bf696b61e2ba, task: block
Jul 26 08:14:36.015 INFO Leader scheduled event, scheduled_at_date: 0.342, scheduled at_time: SystemTime { tv_sec: 1564128876, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:36.785 INFO block added successfully to Node's blockchain, date: 0.342, id: c2506cf229dde5984db58836bc8d9a4b12c19d1513a10cd75d261c39f916f777, task: block
Jul 26 08:14:41.012 INFO Leader scheduled event, scheduled_at_date: 0.343, scheduled at_time: SystemTime { tv_sec: 1564128881, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:41.737 INFO block added successfully to Node's blockchain, date: 0.343, id: 603bbe69f331bced3521ba40b72c89c856d0824e988f7e0cb32c1decd04b3be5, task: block
Jul 26 08:14:46.014 INFO Leader scheduled event, scheduled_at_date: 0.344, scheduled at_time: SystemTime { tv_sec: 1564128886, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:46.738 INFO block added successfully to Node's blockchain, date: 0.344, id: a8ff0198fed3474272392314b89f692ca31624c21c948a6ebae9c04a4bdf8869, task: block
Jul 26 08:14:51.015 INFO Leader scheduled event, scheduled_at_date: 0.345, scheduled at_time: SystemTime { tv_sec: 1564128891, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:51.681 INFO block added successfully to Node's blockchain, date: 0.345, id: 0bc7b925583a7a0337a54ee40364bc82d960d18d5e7befe084fad4289bbc5ad0, task: block
Jul 26 08:14:56.019 INFO Leader scheduled event, scheduled_at_date: 0.346, scheduled at_time: SystemTime { tv_sec: 1564128896, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:14:56.800 INFO block added successfully to Node's blockchain, date: 0.346, id: b566f82c05dea65374a633f26a1e8a5f0742a96768573c71621401a8ed0b825c, task: block
Jul 26 08:15:01.015 INFO Leader scheduled event, scheduled_at_date: 0.347, scheduled at_time: SystemTime { tv_sec: 1564128901, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:01.734 INFO block added successfully to Node's blockchain, date: 0.347, id: 953186a6491d82e2dd7ba2caa389fd1605c3f766c86747b113d2dc96cc450e9f, task: block
Jul 26 08:15:06.019 INFO Leader scheduled event, scheduled_at_date: 0.348, scheduled at_time: SystemTime { tv_sec: 1564128906, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:06.871 INFO block added successfully to Node's blockchain, date: 0.348, id: 25c8699fb9f0ae3b5964e01e78a5fc5277be51d6210cfc6dadd231eb53e141c0, task: block
Jul 26 08:15:11.018 INFO Leader scheduled event, scheduled_at_date: 0.349, scheduled at_time: SystemTime { tv_sec: 1564128911, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:11.805 INFO block added successfully to Node's blockchain, date: 0.349, id: c98bf2c27e22310e9fbaa84740f7b1cd07c52ef0da03c79658e63889a7a56788, task: block
Jul 26 08:15:16.019 INFO Leader scheduled event, scheduled_at_date: 0.350, scheduled at_time: SystemTime { tv_sec: 1564128916, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:16.702 INFO block added successfully to Node's blockchain, date: 0.350, id: 7c9ba69f9481143852a5714bc209bb956be2dd474bc81fb7544bc28ecc761508, task: block
Jul 26 08:15:21.019 INFO Leader scheduled event, scheduled_at_date: 0.351, scheduled at_time: SystemTime { tv_sec: 1564128921, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:21.843 INFO block added successfully to Node's blockchain, date: 0.351, id: 72bbc712918e927d9b1b18e4b8d82c803fe235e605f94168d2f174f3f9f82c99, task: block
Jul 26 08:15:26.021 INFO Leader scheduled event, scheduled_at_date: 0.352, scheduled at_time: SystemTime { tv_sec: 1564128926, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:26.811 INFO block added successfully to Node's blockchain, date: 0.352, id: 3a5f89e3f7e1a23c990e59e081f7936a202a08d1d57b0a1ca48e1bd1e7c9a9b9, task: block
Jul 26 08:15:31.023 INFO Leader scheduled event, scheduled_at_date: 0.353, scheduled at_time: SystemTime { tv_sec: 1564128931, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:31.796 INFO block added successfully to Node's blockchain, date: 0.353, id: 6100f190c0cc06052026282d5430429efd68690718a82283731f7d3c5695d554, task: block
Jul 26 08:15:36.023 INFO Leader scheduled event, scheduled_at_date: 0.354, scheduled at_time: SystemTime { tv_sec: 1564128936, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:36.781 INFO block added successfully to Node's blockchain, date: 0.354, id: 9060b5979bfceb320a0d3476aa23a6cd364121a7b1d9d8ae72919354504a3fa9, task: block
Jul 26 08:15:41.017 INFO Leader scheduled event, scheduled_at_date: 0.355, scheduled at_time: SystemTime { tv_sec: 1564128941, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:41.824 INFO block added successfully to Node's blockchain, date: 0.355, id: 3fb0fd0a7c7934f406eae62c4ba12f4f63b62f387c492548443ecd44f6100caf, task: block
Jul 26 08:15:46.019 INFO Leader scheduled event, scheduled_at_date: 0.356, scheduled at_time: SystemTime { tv_sec: 1564128946, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:46.785 INFO block added successfully to Node's blockchain, date: 0.356, id: c4b6727b853791004cfb9f8c909c9fdb2b4dbe194d7a6e703705b1b848c892a1, task: block
Jul 26 08:15:51.027 INFO Leader scheduled event, scheduled_at_date: 0.357, scheduled at_time: SystemTime { tv_sec: 1564128951, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:51.712 INFO block added successfully to Node's blockchain, date: 0.357, id: 01edbabd838eea646ac39ca770718dee2ab64edc6ea74e478ed1438ae03adf12, task: block
Jul 26 08:15:56.022 INFO Leader scheduled event, scheduled_at_date: 0.358, scheduled at_time: SystemTime { tv_sec: 1564128956, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:15:56.863 INFO block added successfully to Node's blockchain, date: 0.358, id: 3dfe2a9ac186e2a6530eb3904b141b0e9ef691f5f661de96239bbd9382e259e2, task: block
Jul 26 08:16:01.027 INFO Leader scheduled event, scheduled_at_date: 0.359, scheduled at_time: SystemTime { tv_sec: 1564128961, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:01.806 INFO block added successfully to Node's blockchain, date: 0.359, id: 9183ecb588a0c33e5f729b433d58809055432c4b012a01eb36b1d3e71337adc7, task: block
Jul 26 08:16:06.027 INFO Leader scheduled event, scheduled_at_date: 0.360, scheduled at_time: SystemTime { tv_sec: 1564128966, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:06.849 INFO block added successfully to Node's blockchain, date: 0.360, id: 5bce8536b9c67ca86f838fcafdcb2b9f65d3a1ec74c362f433bce4b063016001, task: block
Jul 26 08:16:11.023 INFO Leader scheduled event, scheduled_at_date: 0.361, scheduled at_time: SystemTime { tv_sec: 1564128971, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:11.667 INFO block added successfully to Node's blockchain, date: 0.361, id: 9cc44e05d17aae864a3ba6b23d98e89029fefefbd958f32d3046e53302908876, task: block
Jul 26 08:16:16.020 INFO Leader scheduled event, scheduled_at_date: 0.362, scheduled at_time: SystemTime { tv_sec: 1564128976, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:16.852 INFO block added successfully to Node's blockchain, date: 0.362, id: 22ac99bb8ea6026c36d5fd5ba9496e587f57d784585d54991e315c9fc99e62a8, task: block
Jul 26 08:16:21.027 INFO Leader scheduled event, scheduled_at_date: 0.363, scheduled at_time: SystemTime { tv_sec: 1564128981, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:21.738 INFO block added successfully to Node's blockchain, date: 0.363, id: 642e0fef48d40450f7f27d53c9d0df050bc7f89e07e5fc7fe5ab20b3e091d6ef, task: block
Jul 26 08:16:26.022 INFO Leader scheduled event, scheduled_at_date: 0.364, scheduled at_time: SystemTime { tv_sec: 1564128986, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:26.748 INFO block added successfully to Node's blockchain, date: 0.364, id: 24c5516afe407a6f08870480d7145f65746cdb5b739b6f574143d0789e88df6f, task: block
Jul 26 08:16:31.022 INFO Leader scheduled event, scheduled_at_date: 0.365, scheduled at_time: SystemTime { tv_sec: 1564128991, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:31.283 INFO block added successfully to Node's blockchain, date: 0.365, id: 6a0268e30ce5c6fd4c3e76c7bb37fa32654ebcb3b9f6295aa3f208deba2cf5a5, task: block
Jul 26 08:16:36.022 INFO Leader scheduled event, scheduled_at_date: 0.366, scheduled at_time: SystemTime { tv_sec: 1564128996, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:36.184 INFO block added successfully to Node's blockchain, date: 0.366, id: a7e2a7f8a4869da3ec371d4f816aecb17b10c0890ff0227e86f491e54cededc1, task: block
Jul 26 08:16:41.021 INFO Leader scheduled event, scheduled_at_date: 0.367, scheduled at_time: SystemTime { tv_sec: 1564129001, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:41.177 INFO block added successfully to Node's blockchain, date: 0.367, id: 1a8a05a78e3c6f5eaa783c0f5682c1a9380bd6c0b0ae58c3dc758c9bba7a21f1, task: block
Jul 26 08:16:46.023 INFO Leader scheduled event, scheduled_at_date: 0.368, scheduled at_time: SystemTime { tv_sec: 1564129006, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:46.119 INFO block added successfully to Node's blockchain, date: 0.368, id: 2f9c9da883e4d9378ba80300bef063ab6cf6c0c59f8ae534df7fce0718f75741, task: block
Jul 26 08:16:51.023 INFO Leader scheduled event, scheduled_at_date: 0.369, scheduled at_time: SystemTime { tv_sec: 1564129011, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:51.095 INFO block added successfully to Node's blockchain, date: 0.369, id: 9f8a9dc34f0322abc5402288e7dd8fa5a03889a738cd106a866f1eb5c59a702c, task: block
Jul 26 08:16:56.024 INFO Leader scheduled event, scheduled_at_date: 0.370, scheduled at_time: SystemTime { tv_sec: 1564129016, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:16:56.179 INFO block added successfully to Node's blockchain, date: 0.370, id: 24f6078933e9bcaac0f66fdc0a25ebe0000e78780438a000ee97eef7ba1bc328, task: block
Jul 26 08:17:01.024 INFO Leader scheduled event, scheduled_at_date: 0.371, scheduled at_time: SystemTime { tv_sec: 1564129021, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:17:01.114 INFO block added successfully to Node's blockchain, date: 0.371, id: 42ac37c9ad72f0385ef2b5757f001e4ff48558bfa89924111c6bf090b66229d4, task: block
Jul 26 08:17:06.024 INFO Leader scheduled event, scheduled_at_date: 0.372, scheduled at_time: SystemTime { tv_sec: 1564129026, tv_nsec: 0 }, sub_task: Leader Task, task: leadership
Jul 26 08:17:06.115 INFO block added successfully to Node's blockchain, date: 0.372, id: 949250f329be8ecba44f1b03e4fb1e4ddd684d16b048d9ec0d3b3dcfdeac130e, task: block

Thank you @rinor for the details.

I am using a win10 machine. During the transaction period, the CPU and Memory are ~100%.

I will try also on windows in the evening. Meanwhile can you try to start 2 nodes (listening on different ports of course), send transactions to one node, but monitor the timing on the second idle node.

@dorin100 - I tried also on Windows 10 with same configuration I had on Linux with storage in disk an in memory.

  • In both cases _slot_duration was always on time_.

Also tested with one main node (node01) processing the transactions and one idle node (node02), both started ~ in the same time just to check the time shifts between leader election and block inclusion.

Attached are the logs from the in memory case:

@rinor - that is interesting. In my case, during the transactions period, the CPU goes in 100% and at that point, the slot_duration starts to not be respected anymore (inside logs).

My PC configuration is:

  • processor: Intel I7-6600U CPU, 2.60GHz
  • ram: 8GB

One partial conclusion could be that the slot_duration starts to not be respected when the CPU goes in 100% (I suppose that in your case, the CPU is still not in 100%, right?). If yes, could you increase the number of accounts/transactions in order to try to get it in 100%?

One possibility at this point is that my hardware does not support the high no of parallel transactions but even in this case I suppose it is good to know (and document) what should happen in similar cases (when we reach the resources limit)

The assumption about time slot / duration / start are not right; the block doesn't have to be produced at the very beginning of a slot and at constant time, the only thing we're trying to respect is that the block of date X should be broadcast during the date X time frame.

Otherwise yes if you load the machine, then it's quite possible that you'll eventually diverge from that, to the point of:

  1. you can take more time than the slot to actually make the block
  2. you can wake up at random time / quite late in the process, the system offers no guarantee that we will be wake up at the time we expect it to be wake up, this is not a realtime process nor that we need any of these guarantee
  3. It's fine to miss a slot, the system too busy to process anything would do that
  4. it's fine to broadcast the block too late, it's either accepted with the understanding this is the broadcast window or eventually the consensus will drop the block anyway

Also, there's not going to be a single node that constantly produce a block, so that the load is shared between machine of the cluster, and this is would be thus impossible to reproduce

Now it doesn't really make sense to stress test the system now, we're not at this phase and haven't tweak the system nor put in place the limitation against DoS and other limitations.

Eventually that will be interesting to push the system to its limits, but now it's not the time.

Was this page helpful?
0 / 5 - 0 ratings