Commit Graph

277 Commits

Author SHA1 Message Date
Dmitriy Ryajov 2c460c575f adding submodules 2021-11-25 09:37:12 +01:00
Dmitriy Ryajov 4c2344cbd9 wip 2021-11-25 09:37:12 +01:00
Dmitriy Ryajov 8522f516df remove unused file 2021-11-25 09:37:12 +01:00
Dmitriy Ryajov 623cfe2e02 adding nimbus build system 2021-11-25 09:37:12 +01:00
Mark Spanbroek 90a6131d7d Fix occasional test failure due to timeout 2021-11-16 16:51:40 +01:00
Mark Spanbroek 13f88096ef Disable ObservableStores warning
Rationale: In Nim 1.2.x this warning was triggered
too easily, this was fixed in Nim 1.4.x. Because
1.2.x is still used, we disable this warning to ensure
that the long list of ObservableStores warnings does not
obfuscates other warnings.
2021-11-16 16:51:24 +01:00
Mark Spanbroek ef5fa96c7d Fix unused import warnings 2021-11-16 16:51:24 +01:00
Mark Spanbroek 536b2eaad5 Disable LockLevel warnings
Rationale: we don't use this experimental Nim feature,
and its warnings obfuscate other warnings that may
be relevant.
2021-11-16 16:51:24 +01:00
Dmitriy Ryajov ce66e43440
fix compilation issues with latest libp2p (#27)
* fix compilation issues with latest libp2p

* change package description

* fix CI compiler

* try with nim 1.4.2

* try with 1.4.2

* use more standardized ci config

* set reasonable log level

* remove nim version dependency

* reverting to 1.4.6 as otherwise it fails on amd64
2021-10-29 13:30:52 -06:00
Dmitriy Ryajov 2fb39ca4a3
Rename bitswap (#25)
* use PeerInfo in event handlers

* use CidV1 and raw multicodec as default

* add block stream abstraction

* raises defect

* adding dataset abstraction

* move blockstream into own dir

* reorg files and fix tests

* rename dataset to blockset

* wip

* wip

* adding basic test for treehash algo

* run blockset tests along with with the rest

* remove obsolete contents

* fix chunker tests

* rename bitswap and move to stores

* rename bitwsap to blockexc and move to stores

* moare project structure reorg
2021-08-30 13:25:20 -06:00
Mark Spanbroek b049e54d9e Update CI script
Copied from lib-p2p master; fixes error with windows dependencies.
2021-06-07 13:21:34 +02:00
Mark Spanbroek 6bd4260911 Replace pricing exchange by account exchange
Rationale: price is no longer set per peer, but per chunk.
Only the Ethereum accounts of the peers needs to be exchanged.
2021-06-07 09:50:17 +02:00
Mark Spanbroek d4dd15734e Remove double bookkeeping in peerHave and peerPrices 2021-06-07 09:50:17 +02:00
Mark Spanbroek e3b68f96d8 Remove debt ratio
Rationale: selecting peers based on debt ratio in bytes
is no longer needed when the bandwidth for each chunk is
compensated.
2021-06-07 09:50:17 +02:00
Mark Spanbroek fa05bffeac Pay per-block price instead of per-peer price 2021-06-07 09:50:17 +02:00
Mark Spanbroek f69827d582 Send block prices 2021-06-07 09:50:17 +02:00
Mark Spanbroek 98d8571ceb Simplify 2021-06-07 09:50:17 +02:00
Mark Spanbroek 0a28338136 Simplify test 2021-06-07 09:50:17 +02:00
Mark Spanbroek c57ecde046 Update to version 0.9.1 of questionable 2021-06-07 09:50:17 +02:00
Mark Spanbroek 0e34b69d7d Add block prices to peer context 2021-06-07 09:50:17 +02:00
Mark Spanbroek 0ac876dbc3 Add pricing to block presence messages 2021-06-07 09:50:17 +02:00
Mark Spanbroek 11da2339de Hard-code asset address
We're only going to support a single asset for now.
2021-06-07 09:50:17 +02:00
Mark Spanbroek 811b29fb5e Receive payments for blocks that were sent 2021-06-07 09:50:17 +02:00
Mark Spanbroek 5160b267b6 Use reference semantics for wallets 2021-06-07 09:50:17 +02:00
Mark Spanbroek 2d4a735e5f Update to latest versions of nitro and questionable 2021-06-07 09:50:17 +02:00
Mark Spanbroek 753bde7775 Fix build failure on 32 bit platforms 2021-06-07 09:50:17 +02:00
Mark Spanbroek ee978f354e Engine sends payments for received blocks 2021-06-07 09:50:17 +02:00
Mark Spanbroek 9512bbc50b Add proc to engine that pays peers for bytes 2021-06-07 09:50:17 +02:00
Mark Spanbroek ad48f55aaa Update to latest versions of nitro and questionable 2021-06-07 09:50:17 +02:00
Mark Spanbroek d9e5bc934f Move peer context into its own module 2021-06-07 09:50:17 +02:00
Mark Spanbroek 4ce3f6d3da Add nitro wallet to BitswapEngine 2021-06-07 09:50:17 +02:00
Mark Spanbroek 22f4c277dd Revert "Add nitro wallet to BitswapNetwork"
This reverts commit e55ac4e9de.
2021-06-07 09:50:17 +02:00
Mark Spanbroek 6fbe37eb55 Remove dead code 2021-06-07 09:50:17 +02:00
Mark Spanbroek 3c4d4dc29f Exchange pricing when connecting to new peer 2021-06-07 09:50:17 +02:00
Mark Spanbroek 0897e615e6 Broadcast payment 2021-06-07 09:50:17 +02:00
Mark Spanbroek 6e7220efbb Broadcast pricing 2021-06-07 09:50:17 +02:00
Mark Spanbroek e02c40db80 Add handler for payment messages 2021-06-07 09:50:17 +02:00
Mark Spanbroek 5f9215a371 Add handler for pricing messages 2021-06-07 09:50:17 +02:00
Mark Spanbroek 364d3a9277 Fix typo 2021-06-07 09:50:17 +02:00
Mark Spanbroek 02ef50ab46 Move pricing and payments into bitswap protobuf message
Only a single message type is forwarded to the rpc handler,
so we add pricing and payment info to that message type.
2021-06-07 09:50:17 +02:00
Mark Spanbroek 9635f26b90 Fix tests on 32 bit platforms 2021-06-07 09:50:17 +02:00
Mark Spanbroek c819ba1be1 protobuf message for state channel updates 2021-06-07 09:50:17 +02:00
Mark Spanbroek f60df42c88 Ensure that encoding of pricing doesn't raise 2021-06-07 09:50:17 +02:00
Mark Spanbroek cd00db81ed Add package upraises 2021-06-07 09:50:17 +02:00
Mark Spanbroek 1f2a9f90d5 protobuf message for bandwidth pricing 2021-06-07 09:50:17 +02:00
Mark Spanbroek 37c065f160 Add package questionable 2021-06-07 09:50:17 +02:00
Mark Spanbroek 8adea94196 Add nitro wallet to BitswapNetwork 2021-06-07 09:50:17 +02:00
Mark Spanbroek 5cd714ea83 Remove deprecated libp2p import 2021-06-07 09:50:17 +02:00
Mark Spanbroek 3766d15f95 Workaround no longer necessary 2021-06-07 09:50:17 +02:00
Mark Spanbroek 04cac6d49d Add package nim-nitro 2021-06-07 09:50:17 +02:00