Jason Rhinelander
8cd95c01b3
Abstract signing hash data location
...
This makes the interface a little cleaner by not requiring the class
user to know how we laid out the data in the object.
5 years ago
Jason Rhinelander
739ce92aeb
Remove unused ristretto includes
5 years ago
Jeff Becker
ee752c00e6
make format
5 years ago
Jeff Becker
c014d21f84
use std::shared_ptr not a bare pointer to prevent memleak
5 years ago
Stephen Shelton
5631983716
Make format
5 years ago
Stephen Shelton
8921125924
Fix buffer overflow when version encodes too many integers
5 years ago
Jason Rhinelander
f1171ed7a2
make format 😠 🤮
5 years ago
Jason Rhinelander
46f3459b79
Fixed EncryptedIntroSet signing to use PrivateKey
...
We can generate both root and derived signatures from a PrivateKey, but
only root from a SecretKey, so just change it to use a PrivateKey.
5 years ago
Jason Rhinelander
cd8f26deff
Use hash instead of random for signing hash data
...
This makes PrivateKey store both the key followed by the hash. For
PrivateKeys based on SecretKeys this just means the second half of the
SHA-512 of the seed, and makes a PrivateKey constructed from a SecretKey
give an identical signature to signing directly with sodium.
For derived keys we use a ShortHash of the root key's signing hash
concatenated with the publicly known hash value, so that our derived key
signing hash will be different from the root signing hash and also
different for different derivation parameters.
This also changed one of the asserts in crypto_noop, but upon closer
inspection the copying of the secret key into the signature seems really
wrong, so just changed them to fill with 0s.
5 years ago
Jason Rhinelander
fe8a72750a
Silence unused parameter warning
5 years ago
Stephen Shelton
cfabe72587
Fix RouterVersion::IsEmpty() and RouterVersion::Clear()
5 years ago
Stephen Shelton
f0571a9f2c
Fix IsCompatableWith() logic WRT emptyRouterVersion, add unit tests
5 years ago
Thomas Winget
afd87eedb4
NO CLAMPS YOU IDIOT!!!
5 years ago
Thomas Winget
a487982c49
initial implementation of blinded sign -- not working yet
5 years ago
Jason Rhinelander
f7cd10a82e
Fix Recalculate()
...
Recalculate did what should have been the right thing but wasn't because
of libsodium's mislabelling the "seed" as the secret key.
5 years ago
Jason Rhinelander
860c5efd47
Derived key fixes
...
The reason things weren't working here is because libsodium does
something completely unintuitive and called the seed the "secret key"
when it isn't, it's the seed.
This adds a new PrivateKey class (alongside the existing SecretKey and
PubKey) that holds just a private key value but no seed -- which we need
to do because there is no way we can get a seed after calculating a
derived keypair.
With these changes, we now generate exactly the same keys and subkeys as
Tor (and a new test case uses values generated in Tor to verify this).
This is incomplete -- the subkey signing code is still not implemented;
it has to be adapted to create a signature from a PrivateKey rather than
a SecretKey which will probably requiring working around/reimplementing
some of what libsodium does for creating a signature since it expects
"secret keys" i.e. the seed.
5 years ago
Jeff Becker
0f13591802
does not work
5 years ago
Jeff Becker
99eb7726ff
initial dht key blinding
5 years ago
Jeff Becker
1543284f6b
make it compile
5 years ago
Jeff Becker
4f81b913ef
make router version member optional on serialization
5 years ago
Jeff Becker
9efd796145
initial wack at 0.7.0 dht fixes
5 years ago
jeff
f6813717b5
Merge branch '2020-01-25-router-version' of ssh://github.com/majestrate/loki-network into 2020-01-25-router-version
5 years ago
jeff
898c98b170
use double braces
5 years ago
Jeff Becker
bb6dce486f
don't use a pointer
5 years ago
Jeff Becker
8c82bfe5bf
operator !=
5 years ago
Jeff Becker
03c13f4261
make it compile
5 years ago
jeff
816070be62
dont inherit std::array
5 years ago
jeff
fa30a6f9b2
router version
5 years ago
jeff
f728e6016b
router version
5 years ago
Jeff Becker
b280bac141
don't always use bootstrap when exploring
5 years ago
Jeff Becker
7146857df6
use static initialization for started times
5 years ago
Jeff Becker
7aa1b2c27c
monotonic time and run testnet at 20% realtime
5 years ago
Jeff Becker
626b2a6196
return true
5 years ago
Jeff Becker
e87b754906
fix recursion depth on introset lookup
5 years ago
Jeff Becker
2c0dc12f39
refactor single char variables in DHT (mostly)
5 years ago
Jeff Becker
ae8bb3751b
connect to closest for RC lookups too
5 years ago
Jeff Becker
49f696de9c
connect to closer nodes for introset lookups
5 years ago
Jeff Becker
3b66cf6e75
dht fixes, disable iterative lookups on clients, revert "fixes" from 0.6.3, pass in recursion depth from introset lookup
5 years ago
Stephen Shelton
fba12093ac
Remove dead code (AbstractRouter::EnsureRouter())
5 years ago
Jeff
51e4b47cf8
Merge pull request #1061 from majestrate/fix-log-level-2020-01-20
...
configurable log level
5 years ago
Jeff Becker
1165466d56
don't deadlock when we want to remove lots of paths, flush queue instead when full
5 years ago
Jeff Becker
2f02073cac
unsigned char
5 years ago
Jeff Becker
c69eb2c970
off -> none
5 years ago
Jeff Becker
ef0595602b
reduce number of values for LogLevelFromString
5 years ago
Jeff Becker
40876a6e3f
configurable log level
5 years ago
Jason Rhinelander
95b0eeda29
Add support for lokid's "unchanged" response
...
If we pass the last block hash to lokid it can give us an "unchanged"
response instead of the service node states to tell us that there is no
updated needed.
5 years ago
Jason Rhinelander
1ba1e04390
Separate json SN parsing definition/declaration
...
No changes to code here (committing this separately to make the changes
in the following commit easier to follow).
5 years ago
Jeff Becker
c86fb19187
bump version for 0.6.4
5 years ago
Jeff Becker
12899701c5
inform congestion on tail drop
5 years ago
Jeff Becker
860891b6a6
tail drop
5 years ago
Jeff Becker
4185d47d4b
link layer message priority
5 years ago
Jeff
a681c28e5f
Merge pull request #1050 from majestrate/tweak-limits-2020-01-16
...
Tweak limits
5 years ago
Jeff Becker
c3f99e1b5c
make format
5 years ago
Stephen Shelton
f01392cc49
Start stale router lookup 5 minutes before its expiration
5 years ago
Stephen Shelton
9b00e6fa8d
Bump RC expiration constants significantly
5 years ago
jeff
79fd08e559
fix typo
5 years ago
jeff
4a761be52d
use std::chrono
5 years ago
Jeff Becker
fe148f7823
merge conflict fix
5 years ago
Jeff
493213717f
Merge pull request #1054 from notlesh/message-queue-stats-2020-01-17
...
Include outbound message queue stats in dumpState API response
5 years ago
Stephen Shelton
3cf4bd8f97
Lookup routers at maximum frequency of 10 minutes
5 years ago
Stephen Shelton
698dddc151
Use std::max() and make format
5 years ago
Stephen Shelton
5c518d6586
Include outbound message queue stats in dumpState API response
5 years ago
Stephen Shelton
169ece08e8
Fix HaveReceivedWhitelist() typo
5 years ago
Jason Rhinelander
a1333c901c
Merge pull request #1044 from notlesh/bump-version-0.6.3-2019-01-15
...
Bump version (0.6.3)
5 years ago
Jason Rhinelander
acd53f08b1
Merge pull request #1042 from jagerman/fix-jsonapi-bind-ip
...
Fix json api bind IP
5 years ago
Jason Rhinelander
ba89df40c8
Merge pull request #1041 from notlesh/dht-fixes-cleanup
...
Dht fixes cleanup
5 years ago
Stephen Shelton
2607bdbee6
Bump version (0.6.3)
5 years ago
Stephen Shelton
702c130020
Remove dead code in llarp_nodedb::Insert()
5 years ago
Jason Rhinelander
eadfeefafc
Merge pull request #1038 from majestrate/dht-disable-iterative-lookup-2020-01-14
...
disable iterative behavior in DHT
5 years ago
Jason Rhinelander
416c71e554
Fix json api bind IP
...
Only the port was being used, the IP was being ignored and it was always
binding to localhost.
5 years ago
Stephen Shelton
fbb274a724
Make format (mutter mutter)
5 years ago
Stephen Shelton
8206557ac7
Don't respect whitelist when we haven't received it yet
5 years ago
Stephen Shelton
c92e7ae5c7
Add warning when we found a null RC for a DHT lookup
5 years ago
Stephen Shelton
08149112b2
Randomize routers to explore in ExploreNetwork()
5 years ago
Jeff Becker
a17b5f25b5
check for zero'd rc
5 years ago
Jeff Becker
d9297a4907
log invalid signatures
5 years ago
Jeff Becker
4cb6301e28
use copy not move
5 years ago
Jeff Becker
c5feb07fb9
address feedback from tom
5 years ago
Jeff Becker
6fd714d193
contrib/testnet: fix up testnet config generator to make super centralized topology
...
llarp/context.cpp, llarp/nodedb.{h,c}pp: load netdb AFTER whitelist
llarp/router/router.cpp: explore always
llarp/router/{i,}rc_lookup_handler.{h,c}pp explore with whitelist, update routers with lookup before stale
5 years ago
Jeff Becker
9322df013b
check with rc handler before insert
5 years ago
Jeff Becker
2af64671bf
make it compile
5 years ago
Jeff Becker
0526fef37b
store RCs if valid
5 years ago
Jeff Becker
b56a3528db
periodic nodedb flush
5 years ago
Jeff Becker
495ad6d566
testnet patch
5 years ago
Jeff Becker
09f5f6dfa7
disable iterative lookup
5 years ago
Jeff Becker
c7b94f32be
reduce disk io
5 years ago
Jeff
0e2c5736a8
Merge pull request #1034 from majestrate/dht-timeout-fixes-2020-01-10
...
dht timeout tweak
5 years ago
Jeff
0ad2809ac7
Merge pull request #1033 from majestrate/prevent-segfault-2020-01-10
...
prevent segfault
5 years ago
Jeff Becker
78cdf8f96b
variable lookup timeout on participants
5 years ago
Jeff Becker
8bb492da6e
dht timeout tweak
5 years ago
Jeff Becker
77f0944d6d
use shared_from_this
5 years ago
Jeff Becker
78e325c4c5
always lookup introset from nearest router
5 years ago
Jeff Becker
2d82e931da
try doing lookup from close router, randomize when above lookup threshold
5 years ago
Jeff Becker
b2784dd5ec
explore faster
5 years ago
Jeff
ac46d99107
Merge pull request #1029 from majestrate/expire-snode-sessions-based-off-activity-2020-01-08
...
Expire snode sessions based off activity
5 years ago
Jeff Becker
eb174923ad
m_LastUse shouldn't be 0 ever now
5 years ago
Jeff Becker
1a80153352
mark used on costructed so it doesn't go away
5 years ago
Jeff Becker
9e50920dad
dont update timestamp of last use using when we get exit only when we use it
5 years ago
Jeff Becker
a96fd645c5
remove side effect from address detection assert
5 years ago
Jeff Becker
fde0ca374f
i hate curl
5 years ago
Jeff Becker
336a748695
make it build in normal mode too
5 years ago
Jeff Becker
80cbddde7b
fixups for review
5 years ago
Jeff Becker
2ce592e4af
static link with docs
5 years ago
Jeff
cceb531e58
version bump
5 years ago
Jeff
a5f8568c9c
Merge pull request #1020 from majestrate/dev
...
recent fixes
5 years ago
Jeff Becker
37b11614d0
if select_random_hop_excluding returns false we should probably break anyways so do that
5 years ago
Jeff Becker
c6d77e72f2
fix up tcp connection logic
5 years ago
Jeff Becker
989146f63a
handle write failure
5 years ago
Jeff Becker
c38c055488
return result
5 years ago
Jeff Becker
42f721d691
don't queue on full write queue
5 years ago
Jeff Becker
6d42b5f997
reduce logic calls
5 years ago
Jeff Becker
8a5365d9a6
diversify endpoints
5 years ago
Jeff Becker
9f153f12e0
actually connect to random routers
5 years ago
Jeff Becker
a3e7324e9a
make it compile
5 years ago
Jeff Becker
c3b14b32b4
relays do profiling and not hand out "shit" routers in explore
5 years ago
Jeff Becker
c1ad5f955a
remove mutex
5 years ago
Jeff Becker
64b5537fe0
rpc clean up logic, dont fetch list as client AND dont ping lokid as client
5 years ago
Jeff Becker
e5f92eaa79
only ping lokid if a service node
5 years ago
Jeff
da8ec60922
Merge pull request #1023 from notlesh/iwp-bw-stats-2019-12-17
...
add bw stats to iwp sessions
5 years ago
Jeff Becker
9214ecbc48
rename bloomfilter to replayfilter
5 years ago
Rick V
636957f3f9
happy new year
5 years ago
Jeff Becker
3147e2d357
shuffle intros when more than 1 exists
5 years ago
Jeff Becker
a7a101e33c
more intellegent path failure profiling using LRSM
5 years ago
Jeff Becker
52b13b9f1e
typo fix
5 years ago
Jeff Becker
1244ad83ad
fix include file use
5 years ago
Jeff Becker
55e27d36e5
* only profile as client
...
* only explore churn as relay
5 years ago
Jeff Becker
d391f70417
reduce cpu use
5 years ago
Jeff Becker
73e07ef2d0
client side replay filter
5 years ago
Jeff Becker
b3ad65f470
randomize intro order on shift
5 years ago
Jeff Becker
79badd6714
* clients expore dht faster
...
* use random path when doing dht lookups for .loki
5 years ago
Jeff Becker
a8e6069a93
enable profiling by default
5 years ago
Jeff
f5338512b3
Merge pull request #1014 from majestrate/limit-client-path-builds-at-edges-2019-12-30
...
Limit client path builds at edges
5 years ago
Jeff Becker
472cee2594
make static constant for decay interval
5 years ago
Jeff Becker
7c92805bb4
fix typo
5 years ago
Jeff Becker
ecf2685aa3
use optional
5 years ago
Jeff Becker
da5af879e9
typofix
5 years ago
Jeff Becker
d7c78b0c71
comments
5 years ago
Jeff Becker
f3e96e06b2
propagate error to client
5 years ago
Jeff Becker
562f3f07ab
add unit test for decaying hash set
5 years ago
Jeff Becker
a9c9fe9c24
limit client side path builds per ip
5 years ago
Jeff Becker
5ae428a114
Revert "remove call to link manager"
...
This reverts commit 3dd36fa11a
.
5 years ago
Jeff Becker
a5121c346c
remove call to link manager
5 years ago
Jeff Becker
d1a29884df
client side perf improvement
5 years ago
Jeff Becker
79c3c748e4
limit number of snode sessions client side
5 years ago
Jeff Becker
4126d307b3
dont close timers on closeall
5 years ago
Jeff Becker
59257815d5
version bump with intentional grammar troll motto for science related ventures.
5 years ago
Jeff Becker
8b8d636ded
make format
5 years ago
Rick V
b9c02d999f
why was this there
...
we do not support MSVC
5 years ago
Stephen Shelton
1300de2387
Enable the JSON RPC API by default
5 years ago
Jason Rhinelander
1b710455a7
Disallow AlignedBuffer < 8 bytes; add oddball buffer sizes
5 years ago
Jason Rhinelander
d57d6bfc6d
Use memcpy to extract hash value
...
Using the straight reinterpret_cast runs into type aliasing issues,
which manifest on armhf. C++20 adds `std::bit_cast` to deal with
exactly this, but memcpy is the pre-C++20 way to do it properly.
5 years ago
Jeff
3c9df38b88
Merge pull request #990 from tewinget/libuv-timers
...
Libuv-based timers
5 years ago
Jeff Becker
16c7e7dd33
fix unit tests
5 years ago
Thomas Winget
f4c9e09d44
remove obsolete timer-related code
5 years ago
Thomas Winget
e53e3db171
make dht context use new libuv timers
5 years ago
Thomas Winget
55b44cfc13
fix derp nested function call and derp merge error
5 years ago
Thomas Winget
50118c3127
Change ILinkLayer::ScheduleTick to use new timer
5 years ago
Thomas Winget
71bb0dd520
implement timers using libuv
...
So far only a bit of the code using timers has been modified to use
the new libuv-based timers. Also only the non-Windows case has been
implemented. Seems to be working though, so it's a good time to commit.
5 years ago
Jeff Becker
0f6c5958ba
add bw stats to iwp sessions
5 years ago
Jeff Becker
0eb4efdce9
netid update
5 years ago
Rick V
ccd936feb1
the internal windows toolchain _already_ provides a default manifest
5 years ago
Rick V
a08d2ff64e
microsoft libc a shit
5 years ago
Rick V
caa6549cbb
clang-format everything
5 years ago
Rick V
64710ca4d4
Explicitly align to 16 bytes on Win32 targets
5 years ago
Rick V
9fa9209114
don't be aggressive
...
remove libcurl packaging rules. We still build it, but ship only the curl.exe
5 years ago
Rick V
d1b9b89812
add note
...
add libuv build
add its dependent libraries to the final link line
5 years ago
Rick V
6d49ffd60b
include all platform dependencies transitively
5 years ago
Rick V
e15c57c114
get ready for v0.6
...
bump version
don't ship the shared object
5 years ago
Jeff Becker
896dd85a2b
allow multiple calls to FeedData
5 years ago
Jeff Becker
53b159e361
dont fail on 0 sized data fed to json parser
5 years ago
Jeff Becker
04faee565c
Revert "stricter timeouts"
...
This reverts commit aa9de42d4e
.
5 years ago
Jeff Becker
aa9de42d4e
stricter timeouts
5 years ago
Jeff Becker
8817e7fe21
fix include
5 years ago
Jeff Becker
fcf0ae2b9e
prune unused files.
5 years ago
Jeff Becker
fc55469cfe
change interval such that FEC is less often done
5 years ago
Jeff Becker
7f6d1ebb92
fix slow start bug
5 years ago
Jeff Becker
a93e0a735b
fix typo, reduce delivery timeout
5 years ago
Jeff Becker
fcd3750a8b
increase ack window
5 years ago
Stephen Shelton
332f33b049
Remove FS_LIB conditionals
5 years ago
Stephen Shelton
8f6dd132ff
Make format (on recent version-related code)
5 years ago
Stephen Shelton
5d3cb8f405
Include error code in log output in Identity::EnsureKeys()
5 years ago
Stephen Shelton
a4aef312ae
make format (or format-verify, at least)
5 years ago
Jason Rhinelander
d4a5dc66ac
Change alignment to std::max_align_t
...
This will typically be stricter alignment (16 byte on amd64) which seems
useful for the intended use case here.
5 years ago
Jason Rhinelander
460d64fc0f
Simplify AlignedBuffer alignment implementation
...
This simplifies the use of std::aligned_storage with just using an
`alignas` on AlignedBuffer itself so that the (only) data member gets
the proper alignment and saves a bunch of reinterpret_casts in favour of
just having the std::array as an ordinary member.
5 years ago
Jason Rhinelander
638fb25b47
Put version info into a compiled file
...
This rewrites the version info using lokid's approach of compiling it
into a .cpp file that gets generated as part of the build (*not* during
the configure stage).
Among other things, this means that changing the version no longer
invalidates ccache or cmake dependencies, and because it depends on
`.git/index` git commits will cause the version to be regenerated,
making the commit tag more reliable (currently if you rebuild without
running cmake your git commit tag doesn't update).
5 years ago
Jason Rhinelander
99d27a4886
Add missing ev_libuv (now needed everywhere)
5 years ago
Stephen Shelton
211a5f7a03
Remove typo in version changes
5 years ago
Jeff
27a5904d68
Merge pull request #963 from majestrate/consolidate-versions-2019-12-11
...
consolidate versions
5 years ago
Jeff Becker
4fdff7f233
consolidate versions
5 years ago
Jeff Becker
f259cca0ba
remove mutexes
5 years ago
Jeff Becker
85e911fed0
fug
5 years ago
Jeff Becker
7a78160bf0
final change
5 years ago
Jeff Becker
5729d0bff5
more
5 years ago
Jeff Becker
c4f08e5145
finish remaining changes
5 years ago
Jeff Becker
abf9544ddc
make libuv on win32 work
5 years ago
Stephen Shelton
e2e9e63467
Optimize AlignedBuffer:::IsZero()
5 years ago
Jeff Becker
95eee4081a
trypushback
5 years ago
Jeff Becker
cdfdfa1068
use thread queue
5 years ago
Jeff Becker
8455d5d1cf
more cleanup
5 years ago
Jeff Becker
b286230d40
limit timer calls
5 years ago