Commit Graph

143 Commits

Author SHA1 Message Date
Csaba Kiraly 8286d8fd8e
DAS: better defaults
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-12 16:41:14 +02:00
Csaba Kiraly 12c4c97655
DASL check samplesize <= blocksize
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-12 16:41:04 +02:00
Csaba Kiraly 7b5e9d1270
DAS: add ratio to stats
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-12 16:28:48 +02:00
Csaba Kiraly a05c0f8b0c
DAS: rename to sampleDA
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-12 16:28:30 +02:00
Csaba Kiraly fe38377a31
DAS: code cleanup - imports
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-12 16:17:09 +02:00
Csaba Kiraly c768586eb4
DAS: code cleanup - variables
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-12 16:16:50 +02:00
Csaba Kiraly 660118684c
DAS: run sampling in parallel from each node
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-12 15:54:02 +02:00
Csaba Kiraly 3af8b672c6
DAS: introduce the sample async procedure
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-12 12:29:56 +02:00
Csaba Kiraly 2076bcdfd0
das: factorize startSampling procedure
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-12 12:18:37 +02:00
Csaba Kiraly 0083e1e41c
generate segments systematically
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-12 11:35:01 +02:00
Csaba Kiraly b2774465f0
better sample generation for small samples
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-09 11:06:43 +02:00
Csaba Kiraly 479d6405b6
upload to DHT in parallel
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-06 16:22:02 +02:00
Csaba Kiraly 2a8c7e78f9
add sampling instead of getting all segments
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-06 16:08:45 +02:00
Csaba Kiraly 15c45be5d0
start sample downloads in parallel
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-06 15:53:11 +02:00
Csaba Kiraly 1ed7813192
DAS: add minimal DAS test
WIP, still not sampling but going through all samples

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-06 12:48:47 +02:00
Csaba Kiraly 575a3414d0
addValue/getValue: add minimal test
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-06 12:48:47 +02:00
Csaba Kiraly c2bb22ab5c
add DHT storage (addValue/getValue) functionality
this is a minimal implementation, with lots of
work still needed.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-06 12:48:47 +02:00
Csaba Kiraly 6aa27072e1
just a comment on awaitedNodesMessages
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-06 10:59:04 +02:00
Csaba Kiraly 9665df6ad6
update .nimble and .lock files to work
Make dht compile with new new (0.14+) nimble.

Compilation with Nimble <0.14 can't work, as
the many of the libraries on the dependency
tree are not version tagged. As we can't change
that, two paths remain:
1, use nimbus-build-system (i.e. git submodules)
2, use lock files introduced in nimble 0.14+
First was already working, this fixes second

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-05 15:02:28 +02:00
Csaba Kiraly 830247f6d5
fix imports: remove pkg/
pkg/ is specific to how old nimble handles
packages. Nimble 0.14 (with lock file support)
uses pkg2/

Anyway, pkg or pkg2 are not needed, better remove.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-05 14:58:54 +02:00
Csaba Kiraly e4862cd31a
fixing bearssl version in lockfile and in nimble file
It seems lockfile was generated wrong or not updated,
broken in 76bff752a2

setting it to version used in nimbus build system based build

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-03 00:35:41 +02:00
Csaba Kiraly 17e55d4fb5
add long all-to-all test
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-02 22:30:32 +02:00
Csaba Kiraly 45e2dead2d
chronosim: trace instead of info
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-02 22:17:51 +02:00
Csaba Kiraly d496a47394
changing async logic for nodes (multi) response
The previous version was based on the assumption that
that the future of waitMessage is triggered in the
event loop before the next message arrives. This seems
to be true with UDP, where a full cycle of the loop
handles only one datagram, but not true with other
transports, such as the in-memory emulation. This
led to the following behavior:
- 1st response arrives, reqId removed, waitMessage called
- 2nd ... last messages arrive, can't find reqId, so dropped
- waitMessage competes, re-adding reqId, but too late

The new version solves this by collecting SPRs explicitly

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-02 22:17:04 +02:00
Csaba Kiraly 50dd3cd7b3
encoding: introducing the "nop" cipher
remove encryption for faster large scale tests.
Do not use for anything else!

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-02 22:06:39 +02:00
Csaba Kiraly 8f7d3424a1
encoding: introducing type cipher=aes128
Introducing the cipher type to ease changing cipher.
No functional change

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-06-02 19:03:57 +02:00
Csaba Kiraly c048362b8e
dht: waitMessage: expose timeout as parameter, keeping default
defults to ResponseTimeout as before

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-17 08:08:12 +02:00
Csaba Kiraly e934dd7b96
add random loss
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-13 11:37:10 +02:00
Csaba Kiraly 527db66a02
chronosim: add timewarp
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-11 10:05:42 +02:00
Csaba Kiraly d8b0421af5
chronosim: use const to configure
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-11 10:05:21 +02:00
Csaba Kiraly eb74441394
add logscope
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-11 10:04:21 +02:00
Csaba Kiraly f58f8cbade
introducing ChronoSim
ChronoSim, the simulation/emulation wrapper
around nim-chronos.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-11 09:31:55 +02:00
Csaba Kiraly 349eb01ed4
add stub for egress queuing
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-11 09:16:31 +02:00
Csaba Kiraly dcb6c244c8
generalize p2p delay
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-11 09:16:31 +02:00
Csaba Kiraly 43d71d4957
test: make nodecount and delays configurable
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-11 09:16:31 +02:00
Csaba Kiraly ba0d671e51
add 50ms simulated network latency
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-11 01:23:43 +02:00
Csaba Kiraly 23733c13c8
remove some debug output 2023-05-11 01:23:06 +02:00
Csaba Kiraly 3e0c2839b5
add recvFrom to fake DatagramTransport
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 22:12:56 +02:00
Csaba Kiraly cd1303f6c0
rename callback
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 22:12:30 +02:00
Csaba Kiraly 5e0cdd1452
remove some echo lines
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 22:12:09 +02:00
Csaba Kiraly 8b24458066
fixup: move sendRequest forward
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 21:38:57 +02:00
Csaba Kiraly 349127f657
add on/off for network emulator
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 21:33:23 +02:00
Csaba Kiraly eb08cbfc07
introduce waitResponse wrapper
initialize wait for response before sending request.
This is needed in cases where the response arrives before
moving to the next instruction, such as a directly connected
test.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 21:31:18 +02:00
Csaba Kiraly 70c2d28b89
use 127.0.0.1 for these tests
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 16:13:42 +02:00
Csaba Kiraly fd317a55cb
add simple send functionality
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 16:12:33 +02:00
Csaba Kiraly 6109cbae80
index by port
0.0.0.0 vs. 127.0.0.1 creates various issues
As a start, we can index by port only

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 16:11:22 +02:00
Csaba Kiraly 20ff87b42f
simplify code changes
no need to name it different, we can override DatagramTransport

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 16:10:23 +02:00
Csaba Kiraly dcdef89401
make it compile with gcsafe
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 14:00:40 +02:00
Csaba Kiraly 2eef69f3e7
try to add global registry of endpoints
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 13:47:49 +02:00
Csaba Kiraly e8b019b591
store TransportAddress
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-05-10 13:46:42 +02:00