Commit Graph

13 Commits

Author SHA1 Message Date
Csaba Kiraly 12af1e626f
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-07-11 10:51:33 +02:00
Csaba Kiraly 96e5526ffb
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-07-11 10:51:33 +02:00
Dmitriy Ryajov e4e7a3e11f
track nim-libp2p's unstable branch and nim-bearssl's master branch (#51)
* track nim-libp2p's unstable branch and nim-bearssl's master branch

refactor accordingly: mainly switching from `import bearssl` to
`import bearssl/rand`, `BrHmacDrbgContext` to `HmacDrbgContext`, and related
changes

* fix ambiguous identifier

* nim 1.4 is deprecated

Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2022-11-02 10:21:05 -06:00
Dmitriy Ryajov 69ae7c2012
Persist providers (#49)
* initial providers manager implementation

* misc license update

* spelling

* rename provider tests

* add provider tests

* reexport provider manager

* only update provider record if it changed

* small bug in getProvByKey

* pass providers to both constructors

* fix records retrieval

* disable cache during tests

* avoid redefining data

* adding back tests with cache

* use `.errorOption`

* proper err msg unpacking
2022-09-29 17:49:55 -06:00
Dmitriy Ryajov 9dfa86767d Revert "track nim-libp2p's unstable branch and nim-bearssl's master branch"
This reverts commit c480fb5732.
2022-09-23 15:59:31 -06:00
Michael Bradley, Jr c480fb5732 track nim-libp2p's unstable branch and nim-bearssl's master branch
refactor accordingly: mainly switching from `import bearssl` to
`import bearssl/rand`, `BrHmacDrbgContext` to `HmacDrbgContext`, and related
changes
2022-09-19 20:05:34 -05:00
Tanguy f824c0a3cd
Remove nim-eth dependency (#37) 2022-04-08 12:13:14 +02:00
Csaba Kiraly 9a01791e11 feat: Swap ENR to libp2p SignedPeerRecords
Swap all instances of Record with SignedPeerRecord.

Allow for `SignedPeerRecord`s to be updated by updating the first multiaddress in the `PeerRecord`. This also increments the `seqNo` in the `PeerRecord` only if the address was actually updated.
2022-03-22 11:00:26 +11:00
Eric Mastro cbcaf926a1 feat: Swap PeerRecord for SignedPeerReocrd (PR comments)
- Add example addresses in tests
- Change bootnode private key in tests
- bump libp2p to get access to SignedPeerRecord.encode
2022-03-10 17:00:33 +11:00
Eric Mastro 35026762b4 feat: Swap PeerRecords with SignedPeerRecords
Providers now add/get SignedPeerRecords to/from the DHT.

Changed the PeerId calculation to use the public key of the discovery node.
2022-03-09 15:03:16 +11:00
Eric Mastro 0d0da71b65
build: Add CI Actions
Add CI workflow to run tests.

Add code coverage workflow that publishes results to CodeCov.

Add CI and coverage badges to README.

Bump asynctest to allow for `setupAll` and `teardownAll`.

Add local coverage nimble task.

Combine tests in to a testAll file.
2022-03-04 18:04:50 +11:00
Eric Mastro 55a43b2d89 chore: bump asynctest, use all/each test harness nouns
Using `setupAll`/`setupEach` and `teardownAll`/`teardownEach` for test harnesses.
2022-02-25 14:06:43 +11:00
Eric Mastro acd03ff831 feat: reorg project to add nimble build system
Project has been updated to use nimble as a build system. All required dependencies have been added.

All nim-eth mirrored files were added to a private folder in the libp2pdht module. A libp2pdht/discv5 module was added to alias the nim-eth modules (which will change over time).

Test have been updated to use status-im/asynctest. This PR uses a branch of asynctest that supports async suite before/after. This seemed like the only the tests would work without throwing gcsafe errors.

All tests working.
2022-02-25 09:10:43 +11:00