1649 Commits

Author SHA1 Message Date
saul
34238dd852 Fix linter errors. 2023-03-28 13:44:07 +13:00
saul
1b03b58d14 Remove redundant webpack configs. 2023-03-28 13:38:20 +13:00
saul
3c79588778 Fix process undefined error in browsers. 2023-03-28 13:04:08 +13:00
saul
06a68bbe1c Replace usages of path with path join util. 2023-03-28 12:55:15 +13:00
saul
7ce1257cf9 Add posix and win32 variations to path join. 2023-03-28 12:55:11 +13:00
saul
cf421ee669 Add path joining utility. 2023-03-28 12:16:42 +13:00
Haad
edb913a0ed
Merge pull request #56 from orbitdb/fix/benchmarks2
Use ipfs-core in benchmarks
2023-03-27 15:12:43 +03:00
haad
460749c173 Use ipfs-core in benchmarks 2023-03-27 15:12:05 +03:00
Haad
fddcd0d775
Fix tests (#51)
* Fix error event test in Sync tests

* Fix race condition

* Debug timeouts

* More tests fixing

* Try running local webrtc-star-signalling server for tests

* Fix sync tests

* Skip Log references tests in the browser tests
2023-03-27 20:09:26 +08:00
Haad
4fe1b0c1a1
Add Entry index to Log (#48)
* Turn off IPFS console.log output for tests

* Fix replication and sync tests

* Close keystore after tests in IPFSAccessController tests

* Fix error event test in Sync tests

* Fix race condition

* Add entry index to Log

* Clean up storage files

* Fix tests

* Fix linter
2023-03-27 18:09:44 +08:00
Haad
f396d97a69
Merge pull request #55 from orbitdb/fix/ci
Run tests on pull requests
2023-03-27 07:13:57 +03:00
haad
538a397f32 Run tests on pull requests 2023-03-27 07:12:44 +03:00
Haad
893e34451d
Merge pull request #53 from saul-jb/feat/buffer-refactor
feat: remove dependence on buffer/safe-buffer
2023-03-27 07:05:42 +03:00
Haad
1ff1fd5d90
Merge pull request #54 from saul-jb/fix/ipfs-core
fix: Replace ipfs with ipfs-core.
2023-03-27 07:01:12 +03:00
saul
1c16a7155c Replace ipfs package with ipfs-core. 2023-03-27 12:59:51 +13:00
saul
92dcad1a6e Remove safe-buffer. 2023-03-27 11:50:56 +13:00
saul
2845c138c5 Remove buffer usage from tests. 2023-03-27 11:48:30 +13:00
saul
b0483a1b60 Fix public key test. 2023-03-27 11:24:21 +13:00
saul
82fcc830ec Replace usage of Buffer with Uint8Array. 2023-03-27 11:23:36 +13:00
saul
b6f1943f3e Add uint8arrays package. 2023-03-27 10:01:31 +13:00
Haad
256e3f50e0
Merge pull request #50 from orbitdb/fix/browser-tests
Fix Sync state
2023-03-26 08:42:01 +03:00
haad
2308f01a99 Fix Sync state 2023-03-26 08:35:06 +03:00
Haad
3f138ab98b
Merge pull request #49 from orbitdb/fix/lru-for-identities
Add LRUStorage to identities
2023-03-25 14:31:46 +02:00
haad
2501f8c9de Add LRUStorage to identities 2023-03-25 14:30:48 +02:00
Haad
82fae426f5
Merge pull request #47 from orbitdb/dev/improve-benchmarks
Dev/improve benchmarks
2023-03-25 12:38:03 +02:00
haad
06dbbc83af Clean up benchmarks 2023-03-25 12:34:02 +02:00
haad
39f5face5a Add optional flag to disable automatic sync per database 2023-03-25 12:34:02 +02:00
haad
0b0f5a9767 Add orbitdb database replication benchmark 2023-03-25 12:32:42 +02:00
haad
64ce388d5f Add orbitdb keyvalue store benchmark 2023-03-25 12:32:42 +02:00
haad
7040a09e0c Clean up log iterator benchmark 2023-03-25 12:32:42 +02:00
haad
2fa2423851 Enable linting for benchmarks 2023-03-25 12:32:42 +02:00
haad
768e32c3c5 Add log iterator benchmark 2023-03-25 12:32:42 +02:00
haad
eb229103bd Improve log append benchmark 2023-03-25 12:32:42 +02:00
Hayden Young
b9422463d0
chore: Check required params. (#46)
* chore: Check required params.

* fix: Linting.

* feat: Specify a list of peers with write access.

* test: Identify OrbitDB tests.

* test: IPFS access controller.

* test: Omit "OrbitDB" from test labels.

* test: Correctly set write options.

* fix: Linting.
2023-03-25 06:00:08 +08:00
Hayden Young
3ff24c298f
test: Connecting to multiple orbitdb instances and multiple databases… (#45)
* test: Connecting to multiple orbitdb instances and multiple databases. Replicating data across multiple dbs.

* test: Higher level orditdb test. Name is accordingly.

* test: Test multiple db stores.

* test: Delete test dirs.

* feat: buffer all records from iterator.

* fix: Linting.

* test: Re-enable all tests.

* test: Wait for replication to complete on all dbs.

* test: Rename storage test file.

* test: Remove unnecessary tests.

* test: Close dbs.

* test: Count all the connecting peers.
2023-03-25 02:35:19 +08:00
Hayden Young
2a563bac79
refactor: Return hash. (#44) 2023-03-18 02:53:52 +08:00
Hayden Young
1990cb9b87
Test/sync (#43)
* test: Re-enable skipped tests.

* test: Re-enable all tests.

* test: Wait for final entry when evaluating onSynced.

* test: Check if latest append is head to determine if sync has completed.

* test: Do not rely on order of sync-ed entries.

* docs: Sync-ing notes.

* docs: Simplify dial and pubsub explanation. Formatting.

* refactor: Check for required params.

* docs: Explain initial sync and pubsub updates.

* test: Save updated heads during sync.

* test: Remove extraneous expected entries.

* test: For eventual consistency.

* chore: Remove console.logs. Log errors using error event.

* chore: Remove extraneous asyncs.
2023-03-17 04:33:39 +08:00
Hayden Young
aabfd4e2bc
feat: Configurable heads and entry storage. (#42)
* feat: Configurable heads and entry storage.

* fix: Linting.

* test: Re-enable all tests.

* test: Custom entry storage.

* test: Check for heads paths.

* fix: Check for path using fs.
2023-03-14 05:42:05 +08:00
Hayden Young
a40bc8bdcf
Test/database (#38)
* test: Database.

* test: Remove caching test. Caching is superseded by the various storage options.

* test: db2 replicates data in existing db1.

* test: Move event tests to generic database tests.

* test: Single instance cleanup.

* fix: Linting.

* Fix Sync race condition (#39)

* test: Fix key path import.

---------

Co-authored-by: Haad <haadcode@users.noreply.github.com>
2023-03-11 21:01:05 +08:00
Haad
bc816c7e2e
Browser tests (#41)
* Get browsers tests running

* Clean up replication test

* Setup fixtures for browser tests

* Fix import paths for webpack

* Fix webpack

* Add mocha-headless-chrome to run browser tests

* Add webrtc swarm endpoints for browser test IPFS node configs

* Remove adding pubkey to storage in KeyStore

* Runs browser tests in CI

* Fix import paths again

* Fix failing browser tests

* Fixes
2023-03-11 18:56:23 +08:00
Haad
7afe5dc70d
Merge pull request #40 from orbitdb/dev/custom-database-types
Make it possible to add custom database types
2023-03-10 11:34:21 +02:00
haad
d1e59a95b7 Make it possible to add custom database types 2023-03-10 11:32:07 +02:00
Haad
8e7dade867
Merge pull request #37 from orbitdb/test/address
Add a test for OrbitDBAddress
2023-03-09 12:04:35 +02:00
haad
503f3aba6f Add a test for OrbitDBAddress 2023-03-09 12:03:05 +02:00
Haad
22562822b9
Merge pull request #36 from orbitdb/test/sync
Add tests for the Sync protocol
2023-03-09 11:58:49 +02:00
haad
57de45bac6 Add tests for the Sync protocol 2023-03-09 11:55:20 +02:00
Haad
61276008ea
Merge pull request #35 from orbitdb/fix/manifest-meta-data
Fix passing in database manifest meta data
2023-03-09 10:15:10 +02:00
haad
6140c0dc07 Fix passing in database manifest meta data 2023-03-09 10:13:39 +02:00
Haad
a68995afc4
Merge pull request #34 from orbitdb/fix/keyvalue-deletion-test
Fix tests for deleting a key-value pair
2023-03-09 10:00:29 +02:00
haad
611fb35330 Fix tests for deleting a key-value pair 2023-03-09 09:57:32 +02:00