Preliminary cache migration code

cache loading test

this.attemptMigration

Migration data and cleanup

Linting

IPFS data

Revert "Linting"

This reverts commit e41bc4a9ec2011716300134f985c7ec749743177.

Revert "IPFS data"

This reverts commit 299e0b7b72d74cdbaec80ad0796211790404e4c3.

Better fixtures

package-lock.json

Test for directory options

directory option working

Fixing eventlog tests

Safer migration

Moving to migrations folder

Linting
This commit is contained in:
Mark Henderson 2019-08-31 23:01:17 -04:00
parent 9b58f429cd
commit e793edf9cf
42 changed files with 532 additions and 13 deletions

20
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "orbit-db", "name": "orbit-db",
"version": "0.21.4", "version": "0.22.0-rc2",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -157,9 +157,9 @@
} }
}, },
"@hapi/hoek": { "@hapi/hoek": {
"version": "8.2.1", "version": "8.2.2",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.1.tgz", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz",
"integrity": "sha512-JPiBy+oSmsq3St7XlipfN5pNA6bDJ1kpa73PrK/zR29CVClDVqy04AanM/M/qx5bSF+I61DdCfAvRrujau+zRg==", "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==",
"dev": true "dev": true
}, },
"@hapi/inert": { "@hapi/inert": {
@ -3953,9 +3953,9 @@
} }
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.3.246", "version": "1.3.248",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.246.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.248.tgz",
"integrity": "sha512-CzR7VM16UmZQVgd5I5qu/rx0e67l6FF17rpJD2kRFX9n1ygHFIS+TV9DO55MSZKBGVuQ0Ph1JLLTFEReCKU6nQ==", "integrity": "sha512-+hQe6xqpODLw9Nr80KoT0/S+YarjNbI9wgZchkOopJLBLPgAsniK184P0IGVs/0NsoZf4lBnQhOsjen9a47Hrg==",
"dev": true "dev": true
}, },
"elliptic": { "elliptic": {
@ -11816,9 +11816,9 @@
"integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg=="
}, },
"nanoid": { "nanoid": {
"version": "2.0.4", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.0.4.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.0.tgz",
"integrity": "sha512-sOJnBmY3TJQBVIBqKHoifuwygrocXg3NjS9rZSMnVl05XWSHK7Qxb177AIZQyMDjP86bz+yneozj/h9qsPLcCA==", "integrity": "sha512-g5WwS+p6Cm+zQhO2YOpRbQThZVnNb7DDq74h8YDCLfAGynrEOrbx2E16dc8ciENiP1va5sqaAruqn2sN+xpkWg==",
"dev": true "dev": true
}, },
"nanomatch": { "nanomatch": {

View File

@ -18,6 +18,7 @@ const exchangeHeads = require('./exchange-heads')
const { isDefined, io } = require('./utils') const { isDefined, io } = require('./utils')
const Storage = require('orbit-db-storage-adapter') const Storage = require('orbit-db-storage-adapter')
const leveldown = require('leveldown') const leveldown = require('leveldown')
const migrations = require('./migrations')
const Logger = require('logplease') const Logger = require('logplease')
const logger = Logger.create('orbit-db') const logger = Logger.create('orbit-db')
@ -303,6 +304,8 @@ class OrbitDB {
if (haveDB && !options.overwrite) { throw new Error(`Database '${dbAddress}' already exists!`) } if (haveDB && !options.overwrite) { throw new Error(`Database '${dbAddress}' already exists!`) }
await this._migrate(options, dbAddress)
// Save the database locally // Save the database locally
await this._addManifestToCache(options.cache, dbAddress) await this._addManifestToCache(options.cache, dbAddress)
@ -395,10 +398,21 @@ class OrbitDB {
if (!cache) { if (!cache) {
return false return false
} }
const data = await cache.get(path.join(dbAddress.toString(), '_manifest'))
const addr = dbAddress.toString()
const data = await cache.get(path.join(addr, '_manifest'))
return data !== undefined && data !== null return data !== undefined && data !== null
} }
/**
* Runs all migrations inside the src/migration folder
* @param Object options Options to pass into the migration
* @param OrbitDBAddress dbAddress Address of database in OrbitDBAddress format
*/
async _migrate (options, dbAddress) {
await migrations.run(this, options, dbAddress)
}
/** /**
* Returns supported database types as an Array of strings * Returns supported database types as an Array of strings
* Eg. [ 'counter', 'eventlog', 'feed', 'docstore', 'keyvalue'] * Eg. [ 'counter', 'eventlog', 'feed', 'docstore', 'keyvalue']

View File

@ -0,0 +1,44 @@
const path = require('path')
const fs = require('fs')
const Cache = require('orbit-db-cache')
const Logger = require('logplease')
const logger = Logger.create('orbit-db')
Logger.setLogLevel('ERROR')
async function migrate (OrbitDB, options, dbAddress) {
let oldCache = OrbitDB.caches[options.directory]; let oldStore
if (!oldCache) {
const addr = path.join(OrbitDB.directory, dbAddress.root, dbAddress.path)
if (fs && fs.existsSync && !fs.existsSync(addr)) return
oldStore = await OrbitDB.storage.createStore(addr)
oldCache = new Cache(oldStore)
}
const _localHeads = await oldCache.get('_localHeads')
if (!_localHeads) return
const keyRoot = dbAddress.toString()
logger.debug('Attempting to migrate from old cache location')
const migrationKeys = [
'_remoteHeads',
'_localHeads',
'snapshot',
'queue'
]
for (let i in migrationKeys) {
try {
const key = path.join(keyRoot, migrationKeys[i])
const val = await oldCache.get(migrationKeys[i])
if (val) await options.cache.set(key, val)
} catch (e) {
logger.debug(e.message)
}
}
await options.cache.set(path.join(keyRoot, '_manifest'), dbAddress.root)
if (oldStore) await oldStore.close()
}
module.exports = migrate

11
src/migrations/index.js Normal file
View File

@ -0,0 +1,11 @@
const from021To022 = require('./0.21-0.22')
const migrations = [from021To022]
async function run (OrbitDB, options, dbAddress) {
for (let i = 0; i < migrations.length; i++) {
await migrations[i](OrbitDB, options, dbAddress)
}
}
module.exports = { run }

View File

@ -2,7 +2,7 @@
const assert = require('assert') const assert = require('assert')
const mapSeries = require('p-map-series') const mapSeries = require('p-map-series')
const fs = require('fs') const fs = require('fs-extra')
const path = require('path') const path = require('path')
const rmrf = require('rimraf') const rmrf = require('rimraf')
const levelup = require('levelup') const levelup = require('levelup')
@ -22,6 +22,8 @@ const {
const dbPath = './orbitdb/tests/create-open' const dbPath = './orbitdb/tests/create-open'
const ipfsPath = './orbitdb/tests/create-open/ipfs' const ipfsPath = './orbitdb/tests/create-open/ipfs'
const migrationFixturePath = './test/fixtures/migration/cache-schema-test'
const ipfsFixturesDir = './test/fixtures/ipfs'
Object.keys(testAPIs).forEach(API => { Object.keys(testAPIs).forEach(API => {
describe(`orbit-db - Create & Open (${API})`, function() { describe(`orbit-db - Create & Open (${API})`, function() {
@ -36,6 +38,8 @@ Object.keys(testAPIs).forEach(API => {
rmrf.sync(dbPath) rmrf.sync(dbPath)
ipfsd = await startIpfs(API, config.daemon1) ipfsd = await startIpfs(API, config.daemon1)
ipfs = ipfsd.api ipfs = ipfsd.api
await fs.copy(path.join(ipfsFixturesDir, 'blocks'), path.join(ipfsd.path, 'blocks'))
await fs.copy(path.join(ipfsFixturesDir, 'datastore'), path.join(ipfsd.path, 'datastore'))
orbitdb = await OrbitDB.createInstance(ipfs, { directory: dbPath }) orbitdb = await OrbitDB.createInstance(ipfs, { directory: dbPath })
}) })
@ -138,6 +142,37 @@ Object.keys(testAPIs).forEach(API => {
assert.equal(fs.existsSync(dir), true) assert.equal(fs.existsSync(dir), true)
}) })
it('loads cache from previous version of orbit-db', async() => {
const dbName = 'cache-schema-test'
db = await orbitdb.create(dbName, 'keyvalue')
const manifestHash = db.address.root
const migrationDataPath = path.join(dbPath, manifestHash, dbName)
await db.load()
assert.equal((await db.get('key')), undefined)
await db.close()
await db.drop()
await fs.copy(migrationFixturePath, migrationDataPath)
db = await orbitdb.create(dbName, 'keyvalue')
await db.load()
assert.equal(manifestHash, db.address.root)
assert.equal((await db.get('key')), 'value')
})
it('loads cache from previous version of orbit-db with the directory option', async() => {
const dbName = 'cache-schema-test2'
const directory = path.join(dbPath, "some-other-place")
await fs.copy(migrationFixturePath, directory)
db = await orbitdb.create(dbName, 'keyvalue', { directory })
await db.load()
assert.equal((await db.get('key')), 'value')
})
describe('Access Controller', function() { describe('Access Controller', function() {
before(async () => { before(async () => {
if (db) { if (db) {

View File

@ -0,0 +1 @@
¢dtypedipfsfparams¡gaddressx1zdpuAuhwhxGZSjWRqPBxfKoPEyF9gZHbKXvGqNtK9TEPJtj67

View File

@ -0,0 +1,55 @@
<12>
IPFS -- Inter-Planetary File system
IPFS is a global, versioned, peer-to-peer filesystem. It combines good ideas
from Git, BitTorrent, Kademlia, SFS, and the Web. It is like a single bit-
torrent swarm, exchanging git objects. IPFS provides an interface as simple
as the HTTP web, but with permanence built in. You can also mount the world
at /ipfs.
IPFS is a protocol:
- defines a content-addressed file system
- coordinates content delivery
- combines Kademlia + BitTorrent + Git
IPFS is a filesystem:
- has directories and files
- mountable filesystem (via FUSE)
IPFS is a web:
- can be used to view documents like the web
- files accessible via HTTP at `http://ipfs.io/<path>`
- browsers or extensions can learn to use `ipfs://` directly
- hash-addressed content guarantees authenticity
IPFS is modular:
- connection layer over any network protocol
- routing layer
- uses a routing layer DHT (kademlia/coral)
- uses a path-based naming service
- uses bittorrent-inspired block exchange
IPFS uses crypto:
- cryptographic-hash content addressing
- block-level deduplication
- file integrity + versioning
- filesystem-level encryption + signing support
IPFS is p2p:
- worldwide peer-to-peer file transfers
- completely decentralized architecture
- **no** central point of failure
IPFS is a cdn:
- add a file to the filesystem locally, and it's now available to the world
- caching-friendly (content-hash naming)
- bittorrent-based bandwidth distribution
IPFS has a name service:
- IPNS, an SFS inspired name system
- global namespace based on PKI
- serves to build trust chains
- compatible with other NSes
- can map DNS, .onion, .bit, etc to IPNS
<18>

View File

@ -0,0 +1 @@
£dnameqcache-schema-testdtypehkeyvaluepaccessControllerx7/ipfs/zdpuAyfbHMCJgA1fL72eAq6pz7G3qKzGgLNZpnrHRbFexR6Zw

View File

@ -0,0 +1,4 @@
/
" ĘI%Ľsć!@®<>ń'ŹŞ—ú8»đď@:µŃ<C2B5>o_÷directŤV2
" ÝełßIž\(&PD¬
<08> ô« 2ýhO.ß<> recursive¸V

View File

@ -0,0 +1,8 @@
ŽCome hang out in our IRC chat room if you have any questions.
Contact the ipfs dev team:
- Bugs: https://github.com/ipfs/go-ipfs/issues
- Help: irc.freenode.org/#ipfs
- Email: dev@ipfs.io
½

View File

@ -0,0 +1,3 @@
¡ewritexJ[
"02b1a8717e8bdb12c29dae1a43ed83bc7621205c5ba3029a0ca842653c4a5a89d4"
]

View File

@ -0,0 +1,9 @@
¿·Some helpful resources for finding your way around ipfs:
- quick-start: a quick show of various ipfs features.
- ipfs commands: a list of all commands
- ipfs --help: every command describes itself
- https://github.com/ipfs/go-ipfs -- the src repository
- #ipfs on irc.freenode.org -- the community irc channel
·

View File

@ -0,0 +1,115 @@
½ µ # 0.1 - Quick Start
This is a set of short examples with minimal explanation. It is meant as
a "quick start". Soon, we'll write a longer tour :-)
Add a file to ipfs:
echo "hello world" >hello
ipfs add hello
View it:
ipfs cat <the-hash-you-got-here>
Try a directory:
mkdir foo
mkdir foo/bar
echo "baz" > foo/baz
echo "baz" > foo/bar/baz
ipfs add -r foo
View things:
ipfs ls <the-hash-here>
ipfs ls <the-hash-here>/bar
ipfs cat <the-hash-here>/baz
ipfs cat <the-hash-here>/bar/baz
ipfs cat <the-hash-here>/bar
ipfs ls <the-hash-here>/baz
References:
ipfs refs <the-hash-here>
ipfs refs -r <the-hash-here>
ipfs refs --help
Get:
ipfs get <the-hash-here> -o foo2
diff foo foo2
Objects:
ipfs object get <the-hash-here>
ipfs object get <the-hash-here>/foo2
ipfs object --help
Pin + GC:
ipfs pin add <the-hash-here>
ipfs repo gc
ipfs ls <the-hash-here>
ipfs pin rm <the-hash-here>
ipfs repo gc
Daemon:
ipfs daemon (in another terminal)
ipfs id
Network:
(must be online)
ipfs swarm peers
ipfs id
ipfs cat <hash-of-remote-object>
Mount:
(warning: fuse is finicky!)
ipfs mount
cd /ipfs/<the-hash-here>
ls
Tool:
ipfs version
ipfs update
ipfs commands
ipfs config --help
open http://localhost:5001/webui
Browse:
webui:
http://localhost:5001/webui
video:
http://localhost:8080/ipfs/QmVc6zuAneKJzicnJpfrqCH9gSy6bz54JhcypfJYhGUFQu/play#/ipfs/QmTKZgRNwDNZwHtJSjCp6r5FYefzpULfy37JvMt9DwvXse
images:
http://localhost:8080/ipfs/QmZpc3HvfjEXvLWGQPWbHk3AjD5j8NEN4gmFN8Jmrd5g83/cs
markdown renderer app:
http://localhost:8080/ipfs/QmX7M9CiYXjVeFnkfVGf3y5ixTZ2ACeSGyL1vBJY1HvQPp/mdown
µ

View File

@ -0,0 +1,27 @@
Š IPFS Alpha Security Notes
We try hard to ensure our system is safe and robust, but all software
has bugs, especially new software. This distribution is meant to be an
alpha preview, don't use it for anything mission critical.
Please note the following:
- This is alpha software and has not been audited. It is our goal
to conduct a proper security audit once we close in on a 1.0 release.
- ipfs is a networked program, and may have serious undiscovered
vulnerabilities. It is written in Go, and we do not execute any
user provided data. But please point any problems out to us in a
github issue, or email security@ipfs.io privately.
- security@ipfs.io GPG key:
- 4B9665FB 92636D17 7C7A86D3 50AAE8A9 59B13AF3
- https://pgp.mit.edu/pks/lookup?op=get&search=0x50AAE8A959B13AF3
- ipfs uses encryption for all communication, but it's NOT PROVEN SECURE
YET! It may be totally broken. For now, the code is included to make
sure we benchmark our operations with encryption in mind. In the future,
there will be an "unsafe" mode for high performance intranet apps.
If this is a blocking feature for you, please contact us.
Š

View File

@ -0,0 +1,3 @@
Index


View File

@ -0,0 +1,36 @@
¤œWIP
# 0.0 - Introduction
Welcome to IPFS! This tour will guide you through a few of the
features of this tool, and the most common commands. Then, it will
immerse you into the world of merkledags and the amazing things
you can do with them.
This tour has many parts, and can be taken in different sequences.
Different people learn different ways, so choose your own adventure:
To start with the concepts, try:
- The Merkle DAG
- Data Structures on the Merkle DAG
- Representing Files with unixfs
- add, cat, ls, refs
...
To start with the examples, try:
- add, cat, ls, refs
- Representing Files with unixfs
- Data Structures on the Merkle DAG
- The Merkle DAG
...
To start with the network, try:
- IPFS Nodes
- Running the daemon
- The Swarm
- The Web
œ

View File

@ -0,0 +1 @@
©avbidxL/orbitdb/zdpuAkdtE84R9iHvk39m3qUJKP3RXD9c9EQJWVsLMXC4sYQFA/cache-schema-testckeyx040d2ae7ff5f52d41f65829f30b66eb2c85910f0c683d73ee3cead5d22c15702f32105cdfd83b031d6b2fa594d6ff725979e83bd23575dd26546ff1f30702eb507csigxŒ30440220328dedc06e17fb1a9cb9826c4daa1b5b8e9e609121d025389fccc49ce81787dc02202ea8ea8a691f8896c79bca42f5eba864daba5e920480c95cb88841d76e815308dhashödnext€eclock¢bidx040d2ae7ff5f52d41f65829f30b66eb2c85910f0c683d73ee3cead5d22c15702f32105cdfd83b031d6b2fa594d6ff725979e83bd23575dd26546ff1f30702eb507dtimegpayload£bopcPUTckeyckeyevalueevaluehidentity¤bidxB02b1a8717e8bdb12c29dae1a43ed83bc7621205c5ba3029a0ca842653c4a5a89d4dtypegorbitdbipublicKeyx040d2ae7ff5f52d41f65829f30b66eb2c85910f0c683d73ee3cead5d22c15702f32105cdfd83b031d6b2fa594d6ff725979e83bd23575dd26546ff1f30702eb507jsignatures¢bidxŒ304402200190b97ab06a0623a0fc0d9d7da60ff77515f0649a93d6a9dab3f3bd3bbfb4da02200520284db952c6f0a366b886b881ea5da5bd21a9c277f7d4d4fab1aa8e15682eipublicKeyxŽ3045022100c5e18a43dd47f915754ff964ff2c7f85dbc0a2827964553d648cf613baff6e4b02206e678964e12f8c1532b8d09116a9dc4dadf97b29e21199644b0130e39192259d

View File

@ -0,0 +1,4 @@
2
" èžsÜL`•>¾P}ãÈD
>ÚŸo_¸=¡"´u'Ò 0.0-intro§


View File

@ -0,0 +1,28 @@
ЛГHello and Welcome to IPFS!
в–€в–€в•—в–€в–€в–€в–€в–€в–€в•— в–€в–€в–€в–€в–€в–€в–€в•—в–€в–€в–€в–€в–€в–€в–€в•—
в–€в–€в•‘в–€в–€в•”в•ђв•ђв–€в–€в•—в–€в–€в•”в•ђв•ђв•ђв•ђв•ќв–€в–€в•”в•ђв•ђв•ђв•ђв•ќ
в–€в–€в•‘в–€в–€в–€в–€в–€в–€в•”в•ќв–€в–€в–€в–€в–€в•— в–€в–€в–€в–€в–€в–€в–€в•—
в–€в–€в•‘в–€в–€в•”в•ђв•ђв•ђв•ќ в–€в–€в•”в•ђв•ђв•ќ в•љв•ђв•ђв•ђв•ђв–€в–€в•‘
в–€в–€в•‘в–€в–€в•‘ в–€в–€в•‘ в–€в–€в–€в–€в–€в–€в–€в•‘
в•љв•ђв•ќв•љв•ђв•ќ в•љв•ђв•ќ в•љв•ђв•ђв•ђв•ђв•ђв•ђв•ќ
If you're seeing this, you have successfully installed
IPFS and are now interfacing with the ipfs merkledag!
-------------------------------------------------------
| Warning: |
| This is alpha software. Use at your own discretion! |
| Much is missing or lacking polish. There are bugs. |
| Not yet secure. Read the security notes for more. |
-------------------------------------------------------
Check out some of the other files in this directory:
./about
./help
./quick-start <-- usage examples
./readme <-- this file
./security-notes
Г

View File

@ -0,0 +1,3 @@
-
" õR ;<3B>—¿­ˆfq<66>aU¿õ 0 [Xè@÷8Ó·O§¦index


1
test/fixtures/ipfs/blocks/SHARDING vendored Normal file
View File

@ -0,0 +1 @@
/repo/flatfs/shard/v1/next-to-last/2

22
test/fixtures/ipfs/blocks/_README vendored Normal file
View File

@ -0,0 +1,22 @@
This is a repository of IPLD objects. Each IPLD object is in a single file,
named <base32 encoding of cid>.data. Where <base32 encoding of cid> is the
"base32" encoding of the CID (as specified in
https://github.com/multiformats/multibase) without the 'B' prefix.
All the object files are placed in a tree of directories, based on a
function of the CID. This is a form of sharding similar to
the objects directory in git repositories. Previously, we used
prefixes, we now use the next-to-last two charters.
func NextToLast(base32cid string) {
nextToLastLen := 2
offset := len(base32cid) - nextToLastLen - 1
return str[offset : offset+nextToLastLen]
}
For example, an object with a base58 CIDv1 of
zb2rhYSxw4ZjuzgCnWSt19Q94ERaeFhu9uSqRgjSdx9bsgM6f
has a base32 CIDv1 of
BAFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA
and will be placed at
SC/AFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA.data
with 'SC' being the last-to-next two characters and the 'B' at the
beginning of the CIDv1 string is the multibase prefix that is not
stored in the filename.

86
test/fixtures/ipfs/config vendored Normal file
View File

@ -0,0 +1,86 @@
{
"Addresses": {
"Swarm": [
"/ip4/0.0.0.0/tcp/4002",
"/ip4/127.0.0.1/tcp/4003/ws"
],
"API": "/ip4/127.0.0.1/tcp/5002",
"Gateway": "/ip4/127.0.0.1/tcp/9090"
},
"Discovery": {
"MDNS": {
"Enabled": true,
"Interval": 10
},
"webRTCStar": {
"Enabled": true
}
},
"Bootstrap": [
"/ip4/104.236.176.52/tcp/4001/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z",
"/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
"/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM",
"/ip4/162.243.248.213/tcp/4001/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm",
"/ip4/128.199.219.111/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu",
"/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64",
"/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd",
"/ip4/178.62.61.185/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3",
"/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx",
"/ip6/2604:a880:1:20::1f9:9001/tcp/4001/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z",
"/ip6/2604:a880:1:20::203:d001/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM",
"/ip6/2604:a880:0:1010::23:d001/tcp/4001/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm",
"/ip6/2400:6180:0:d0::151:6001/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu",
"/ip6/2604:a880:800:10::4a:5001/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64",
"/ip6/2a03:b0c0:0:1010::23:1001/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd",
"/ip6/2a03:b0c0:1:d0::e7:1/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3",
"/ip6/2604:a880:1:20::1d9:6001/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx",
"/dns4/node0.preload.ipfs.io/tcp/443/wss/ipfs/QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic",
"/dns4/node1.preload.ipfs.io/tcp/443/wss/ipfs/Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6"
],
"Swarm": {
"ConnMgr": {
"LowWater": 200,
"HighWater": 500
}
},
"Identity": {
"PeerID": "QmZDxp1kbEQTTeWNRN6xGWhH3AxNhR5J1ZspdAgS5JgLXW",
"PrivKey": "CAASpwkwggSjAgEAAoIBAQCsopwtbRiWIo/8VJWj5jN+w8rENSb/zpRhkMaPiyTV1KgSMqD5+beOacDH5hYhGOz7pjd7jzXVRrhIKQo6lIyk77aJieW/6Ny34uwYqAiGMZNahXnVhXAE6uLoU49l967/v6YXuKgWOFeOSnAznyIX7guJgN61swJbQ/N32Ho7Vbqykjf4ody5qu3BNTREa4g9TRqxYT8+vh/aHUTI2ze/Z+EwjNfOJVgGbAx9tqxozyiLcH+dHVLD4TKMOJ+s3wQ5TZfe7QaVSUxVUg9L4GYRpvB8GgDPcmAy23G61CYP62BGgU+/e8/fYD44aTfxg53XWt6FNcw0/Mzar9qjHqk3AgMBAAECggEAcRkLBjudyuYTvHTRoBG1FMxCb65+wUHeNdj6LJo05J2wClP+4CW4GmWv9YYIY2CICQlI+frFgtcU7bltSRl+1qNwy8R6rvJof1P75t9Wzkt2ROyC9962l5ImW5w6qsvMayJsNsgz3nLE8aRUw4zycgjyp/+0aAdBePcYbyB0W5/n4lSic9sNG48l7psq6LP6dt7V+AD+rqMYV3bMLPnhUgDeNVP7xILD30xWNbSfaimJfFMypli0K7BQst7tYI0r82rShkxKCEG7CgpzYKrVcXCD90xOEm7ZcUYf1bVtAPNCZ5KoVA7uAULpHd6OxxtQs+Rtg6gfajzyN2YXH/O0aQKBgQDYVkc8aBESDWytAl/4a62OQEX/f43sxqB9+7IxzcaOuSd5Rdn3jmHyi9tP+VLnuyRbXe7OhaWVrZDRdaV3R0TOGK/TdIzNNgfNA81sBAItedrpawVfb6GdXvrrBWOuFej8A5aUYpUY7JEwW8FBVuuM+cq4su5AEjmsIC0+is0AjQKBgQDMSTKoLqJsS3JHXYMsvQp+B2UO7kO8LLQPdM27Wet/1Id3O7jWgN7gEslrOuiqbsfuLlfe9TwiZk9Z9LdNDrUkHHY2XTrLpyEW4XAkZ2oVMqrQZczW8uw7JOwFcVWGnL+P0w3W9YQQjsnRGvje3oGfyRAvH1XGBIGfABc74LtJ0wKBgHUujtmWmSCJKwOv1KIwWUtDX2cdBZhqosZ7DrPRfasTeeFDx+RDOKTzwrDYIWMqSHBBOjidxeqEoHwE2ML6VLe6QYsth5MkoCcZ1yyaIz/U0JI9CST/x7ABobKqMas7bP8NRoRLve1JPv/Nw6mL1n1/VKKlMU59UMX+i+NjtdWFAoGAHYp0NdfQiwJ5+xHttxl7G/Brz7Xqu5pnS1jjqzT8lhagpEBRoUsvb42n7MavAH5WkP3InSgvUvYigWqe2xjGXvtyqLfgmbSIV2uwMMN3lqsmAk7GSUsFmCPlsX/LE1U1alHlzXDhcReE3aUd2fSpH/cOTRIl8CWUrO5xbao4yxsCgYEAsl8M2R7TjKpwoL+a9upZoIz4FDT0h+S3CTQhZSh4juVj/fOnzsMvesdbTb5w8rTg33yN8GLjEHeeLQei6vNxtK875cNsmm8hUIagB0+1IApkvswAJhpM/4gA1G+ZxTgR9pIqSu3iYuaESuEB763PyznmbUiV9a9glY8oSu0WFmU="
},
"datastore": {
"Spec": {
"type": "mount",
"mounts": [
{
"mountpoint": "/blocks",
"type": "measure",
"prefix": "flatfs.datastore",
"child": {
"type": "flatfs",
"path": "blocks",
"sync": true,
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2"
}
},
{
"mountpoint": "/",
"type": "measure",
"prefix": "leveldb.datastore",
"child": {
"type": "levelds",
"path": "datastore",
"compression": "none"
}
}
]
}
},
"Keychain": {
"dek": {
"keyLength": 64,
"iterationCount": 10000,
"salt": "cYS7ZeAxVX7IdDVJ2JDOYNio",
"hash": "sha2-512"
}
}
}

BIN
test/fixtures/ipfs/datastore/000202.log vendored Normal file

Binary file not shown.

View File

@ -1 +1 @@
MANIFEST-000200 MANIFEST-000201

0
test/fixtures/ipfs/datastore/LOCK vendored Normal file
View File

1
test/fixtures/ipfs/datastore/LOG vendored Normal file
View File

@ -0,0 +1 @@
2019/09/01-11:44:16.574088 7fd834d96700 Delete type=3 #200

Binary file not shown.

Binary file not shown.

1
test/fixtures/ipfs/datastore_spec vendored Normal file
View File

@ -0,0 +1 @@
{"mounts":[{"mountpoint":"/blocks","path":"blocks","shardFunc":"/repo/flatfs/shard/v1/next-to-last/2","type":"flatfs"},{"mountpoint":"/","path":"datastore","type":"levelds"}],"type":"mount"}

1
test/fixtures/ipfs/local/filesroot vendored Normal file
View File

@ -0,0 +1 @@
 Y”„9_)ažô€Ë¹2¾RÅm™Åkeà˜»ï

1
test/fixtures/ipfs/version vendored Normal file
View File

@ -0,0 +1 @@
7

Binary file not shown.

View File

@ -0,0 +1 @@
MANIFEST-000002

View File

View File

@ -0,0 +1 @@
2019/09/01-11:44:17.005796 7fd834d96700 Delete type=3 #1

Binary file not shown.