357 Commits

Author SHA1 Message Date
Michael Bradley, Jr
583815ecba
[wip] refactor step for calculating cache-key components 2022-09-20 07:43:02 -05:00
Michael Bradley, Jr
992d9485ff
[wip] disable cache (prep for experiments with docker image cache in GHA) 2022-09-20 07:17:28 -05:00
Michael Bradley, Jr
f05e0c4973
[wip] collapse calc run to one line
cache should be in place and therefore ~/go/bin/testground build skipped
2022-09-20 07:15:38 -05:00
Michael Bradley, Jr
e0a57217ee
[wip] setup cache 2022-09-20 07:15:38 -05:00
Michael Bradley, Jr
14ba617107
[wip] prep work for caching builds of Testground executable 2022-09-20 07:15:38 -05:00
Michael Bradley, Jr
d066f18969
[wip] .github/workflows/testground.yml 2022-09-20 07:15:38 -05:00
Michael Bradley, Jr
0d5860bcbe
[wip] temporarily disable CI workflow 2022-09-20 07:15:38 -05:00
Michael Bradley, Jr
be584b51ae
[wip] basic testground/README.md 2022-09-20 07:12:03 -05:00
Michael Bradley, Jr
e99f30e60c
[wip] slightly better defaults 2022-09-20 07:12:02 -05:00
Michael Bradley, Jr
bb752895d9
[wip] rename hello_codex to simple_libp2p 2022-09-20 07:12:02 -05:00
Michael Bradley, Jr
5199dbd907
[wip] rm commented lines from testground/hello_codex/manifest.toml 2022-09-20 07:12:02 -05:00
Michael Bradley, Jr
270b4fd8d8
[wip] make simple_tcp_ping the default testground plan (for now) 2022-09-20 07:12:02 -05:00
Michael Bradley, Jr
5c440d7c35
[wip] bump vendor/testground-nim-sdk 2022-09-20 07:12:02 -05:00
Michael Bradley, Jr
9ea1e1977c
[wip] git don't ignore Dockerfile 2022-09-20 07:12:02 -05:00
Michael Bradley, Jr
c881147eea
[wip] specify --allow-empty option when applying scratch.patch 2022-09-20 07:12:02 -05:00
Michael Bradley, Jr
4278bd2ea2
[wip] revise testground/hello_codex/Dockerfile 2022-09-20 07:12:02 -05:00
Michael Bradley, Jr
a6a407e23d
[wip] append contents of testground/hello_codex/config.nims to scratch/nim-codex/config.nims 2022-09-20 07:12:02 -05:00
Michael Bradley, Jr
9e3044ada1
[wip] limit chronicles_sinks to textlines in testground/hello_codex/config.nims 2022-09-20 07:12:01 -05:00
Michael Bradley, Jr
a90239dd01
[wip] make testground should work when working tree is clean 2022-09-20 07:12:01 -05:00
Michael Bradley, Jr
0fc197d992
[wip] more flexibility 2022-09-20 07:12:01 -05:00
Michael Bradley, Jr
28781608a5
[wip] refactor Makefile and .nimble support to be more flexible 2022-09-20 07:12:01 -05:00
Michael Bradley, Jr
e9b3dd070e
[wip] don't specify chronicles_log_level=TRACE in nimble task for hello_codex 2022-09-20 07:12:01 -05:00
Michael Bradley, Jr
13ee905c10
[wip] add config.nims to testground/hello_codex 2022-09-20 07:12:01 -05:00
Michael Bradley, Jr
6fdf9fc66e
[wip] code from uncommitted testground-nim-sdk example 2022-09-20 07:12:01 -05:00
Michael Bradley, Jr
ea2a5acbaa
[wip] support in Makefile, codex.nimble; git ignore scratch/ 2022-09-20 07:12:01 -05:00
Michael Bradley, Jr
ebc98c4a09
[wip] testground/hello_codex/ 2022-09-20 07:12:00 -05:00
Michael Bradley, Jr
2e1b0e5b8c
[build] add github.com/status-im/testground-nim-sdk to vendor 2022-09-20 07:12:00 -05:00
Michael Bradley, Jr
8899b68d1a
[build] track nim-libp2p's unstable branch 2022-09-19 20:51:26 -05:00
Mark Spanbroek
14cfe05ef6 Update questionable to 0.10.5 2022-09-19 15:51:03 +02:00
Dmitriy Ryajov
7e2f917c84
Dht providers lru (#247)
* upgrading nimbus build system to latest

* use new `updateRecord`

* bump nim-libp2p-dht

* bump nimbus build system

* bumping deps

* update to latest dht
2022-09-13 13:37:49 -06:00
Bulat-Ziganshin
df1522c9f8
Fixed message.proto to match IPFS specs (#245)
We incorrectly assigned code 2 to the payload field instead of code 3:

Our code: 8c59392526/codex/blockexchange/protobuf/message.proto (L50-L52)

While original code: 0fa397581c/message/pb/message.proto (L43-L45)

And [documentation](https://github.com/ipfs/specs/blob/main/BITSWAP.md#bitswap-120-wire-format).
2022-09-12 21:32:12 -06:00
Michael Bradley
6b2adb7017
Fix vendor/nim-eth (#246)
* [build] bump vendor/nim-eth and drop vendor/vendor/nim-eth

* [build] bump vendor/nim-bearssl and drop vendor/bearssl
2022-09-12 21:30:16 -06:00
Dmitriy Ryajov
bb6e812923
Update curl upload command (#240) 2022-09-12 11:03:27 -06:00
markspanbroek
5ec2e40a73
[build] Update asynctest to version 0.3.2 (#244)
Includes a fix for Nil exception on unthandled exception
2022-09-12 09:59:39 -06:00
Eric Mastro
014207c87f
bump nim-ethers to 0.2.2, add nim-eth dependency (#236)
Support latest version of nim-ethers which relies on nim-eth.

NOTE: This commit points to PR #31 which is a branch of nim-ethers. That branch should probably be merged first, and this PR updated to point to the commit on main.
2022-09-08 16:56:41 -06:00
Dmitriy Ryajov
fd56875667
updating bug report template environment section 2022-09-08 12:35:07 -06:00
Dmitriy Ryajov
d074d3b351
Adding bug report template 2022-09-08 12:32:32 -06:00
Michael Bradley, Jr
ba42533ad6 [build] pass NIM_PARAMS to nim compiler in exec target of Makefile
with this change `make exec` runs a release build instead of a debug build
2022-09-01 20:44:29 -05:00
Eric Mastro
b843118076 bump nim-ethers to use better compile time check 2022-08-26 13:29:09 +10:00
Eric Mastro
58f3335cc1 [fix] Fix C-compilation error failing tests 2022-08-26 13:29:09 +10:00
Eric Mastro
01419d3fc3 [chore] bump nim-ethers for distinct indexed event field support 2022-08-26 13:29:09 +10:00
Eric Mastro
8f116cd01e [chore] make RequestId, SlotId, Nonce, PurcahseId distinct
Make RequestId, SlotId, Nonce, PurcahseId distinct types.

Add/modify conversions to support the distinct type (ABI encoding/decoding, JSON encoding, REST decoding).

Update tests
2022-08-26 13:29:09 +10:00
Eric Mastro
6df5a7cf54 [chore] clean up array[32, byte] types
- rename `ContractId` to `SlotId`
- add `RequestId`, `PurchaseId`, `Nonce` types as aliases of `array[32, byte]`
- rename `Proving.contracts` to `Proving.slots`
- change signatures of `isSlotCancelled` and `isCancelled` to use `SlotId` and `RequestId` types, respectively.
- change all references to `RequestId`, `SlotId`, and `PurchaseId`
2022-08-26 13:29:09 +10:00
Michael Bradley, Jr
4258734a81 [docs] add BUILDING.md and link from root README.md
and make a few other touch ups in BUILDING.md and README.md, e.g. updating the
CLI options section in README.md

closes #216
2022-08-24 17:14:22 -05:00
Bulat-Ziganshin
f24ded0f76
Download files without padding (#218)
The initial goal of this patch was to allow to download of a file via REST API in exactly the same size as it was uploaded, which required adding fields Chunker.offset and Manifest.originalBytes to keep that size. On top of that, we added more integrity checks to operations on Manifest, and reorganized TestNode.nim to test the actual interaction between node.store and node.retrieve operations.

Note that the wire format of Manifest was changed, so we need to recreate all BlockStores.

* Download without padding
* Fixed chunker tests
* Chunker: get rid of RabinChunker
* Verify offset in the chunker tests
* Use manifest.originalBytesPadded in StoreStream.size
* StoreStream: replace emptyBlock with zeroMem
* Manifest.bytes: compute how many bytes corresponding StoreStream(Manifest, pad) will return
* Manifest: verify originalBytes and originalLen on new/encode/decode
Also set originalBytes in each Manifest creation/update scenario
* Manifest: comments, split code into sections
* Reordered parameters to deal with int64 size in 32-bit builds
* TestNode.nim: combine Store and Retrieve tests
1. Instead of copy-pasting code from node.nim, new test calls node.store() and node.retrieve() in order to check that they can correctly store and then retrieve data
2. New test compares only file contents, manifest contents considered an implementation detail
3. New test chunks at odd chunkSize=BlockSize/1.618 in order to ensure that data retrieved correctly even when buffer sizes mismatch
* TestNode.nim: code refactoring
* Manifest.add: one more test
* Manifest.verify: return Result instead of raising Defect
* Node.store: added blockSize parameter
2022-08-24 15:15:59 +03:00
Dmitriy Ryajov
4bc701652f
Adding metrics (#203)
* adding inflight discovery metric

* adding metrics instructions and default dashboard

* spelling fixes
2022-08-23 10:11:21 -06:00
Michael Bradley, Jr
3d823dcbc6 [stores] update getBlock return type
change return type for `method getBlock` from `Future[?!(?Block)]` to
`Future[?!Block]`

use `type BlockNotFoundError = object of CodexError` to differentiate between
"block not found in the store" and other errors

also make some logic and error handling/messages more consistent across
BlockStore implementations

closes #177
closes #182
closes #210

alternative to #205, #209
2022-08-22 20:52:51 -05:00
Michael Bradley, Jr
e0e2d7b583 [build] bump questionable 2022-08-22 20:52:51 -05:00
Bulat-Ziganshin
7ec039f822
Quickfix: start erasure decoding once any K blocks arrived (#199)
ECC decoding can be done with any encoded.K blocks, and now we start it once any K blocks arrived.

Previous code essentially waited for all blocks to arrive (or fail to arrive), that may mean unnecessary delays.

New code will sometimes ECC-decode when parity blocks were retrieved faster that data blocks (instead of waiting for data blocks from network), but we expect that it's OK due to extremely fast Leopard decoding (~~500 MB/s)
2022-08-19 21:21:55 -06:00
Dmitriy Ryajov
e48450d671
Updating download endpoint curl (#212) 2022-08-19 21:20:25 -06:00