Info

Download ZIP (2.8 MB)

Testing and Issues

You can test this entry and submit issues during the testing period of the TON Block Validation Challenge contest.

Entries with serious issues will not be able to win the contest, but even minor issues might be important for overall results.

Voting

11

Comments

I just realized that all of the "actor stuff" can do parallelism (I thought it's some kind of remainder of the main codebase, which has to deal with network and asynchrony), so I removed all the corresponding parts. For example, I replaced:
td::actor::send_closure(actor_id(this), &ContestValidateQuery::got_neighbor_out_queue, i, r_state.ok()->message_queue())
with a simple:
got_neighbor_out_queue(i, r_state.ok()->message_queue())
so I accidentally _removed_ some of the multithreading.

That's too say: the impact of my multithreading changes is slightly higher than it would appear.
On a similar note, I assumed several block validations might be launched in parallel. If that is not the case and the verification is always one after another, some memory re-allocations could be easily removed. Most notably:
CellUsageTree::CellUsageTree() {
  nodes_ = new Node[600000];
could be made a single static allocation.
(in case several block validations might run in parallel, some memory pool could be implemented to prevent re-allocations, but I didn't get to this)
You have not added any comments yet...
by rating

Issues

FINAL TESTING RESULTS for entry6334
Passed 11303/11841 tests (538 failed)
Real time: 814.455544s
CPU time: 1139.062701s
Baseline real time: 975.120982s
Baseline CPU time: 897.583775s
Kooky Swallow Feb 22 at 21:21
Unfortunately, one specific parallelization technique (which I called "DAGging") I implemented turned out to be trickier than I anticipated. Despite my poor results, I encourage you to still read my "ReadMe.md" file. I am pretty sure I'm the only one who implemented this technique, and it helps with real time, so (with careful implementation) it might be useful in production for when a low "latency" (low real time) is crucial.
Nobody added any issues yet...