From 1d12ffbe72296084404e5e7acca02101bcc0a808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Uhl=C3=AD=C5=99?= Date: Fri, 8 Nov 2019 15:05:50 +0100 Subject: [PATCH] feat: integrate ipfs-repo-migrations tool (#2527) Resolves: https://github.com/ipfs/js-ipfs/issues/1115 Supersedes: https://github.com/ipfs/js-ipfs/pull/2044 Depends on: * [x] https://github.com/ipfs/js-ipfs-repo/pull/202 --- .aegir.js | 2 +- README.md | 12 ++ package.json | 2 +- src/cli/bin.js | 7 ++ src/cli/commands/daemon.js | 7 +- src/cli/daemon.js | 13 +- src/cli/parser.js | 5 + src/cli/utils.js | 7 +- src/core/config.js | 1 + src/core/index.js | 2 +- src/core/runtime/repo-browser.js | 6 +- src/core/runtime/repo-nodejs.js | 6 +- test/cli/general.js | 89 ++++++++++++++ ...XJQPHVD7YSPD5KS75DRO7Q55ADVNORRBXV75Y.data | Bin 0 -> 10765 bytes ...7E32LQAL6236OUKZTMHPQSFIXPWXNZHQOV7JQ.data | 55 +++++++++ ...VPZNQ6C4TJVSVGFTWWOTHP7GWZYGDUP5HIEXY.data | 4 + ...AJNF2GF5UHUAGGHC6LLAH6VYDEKLQMD4QLILY.data | 8 ++ ...FZU7XAJL2BMIHGVB5ZR2IOKOSTRMLIKPB6K5I.data | Bin 0 -> 402 bytes ...TJNUP57QHR4SKHZ74OIITBBGLOMCO3ZOLWLGA.data | 9 ++ ...RYYVBUXHTS3SM5EORZDU63LYPEFUAFE4SBM4I.data | 115 ++++++++++++++++++ ...OUGKFK27IE33WKGJNDW2TY3LSBNQ34R6OVOOQ.data | 27 ++++ ...WYQZTRR5QVLP7VBQYAYW2Y5BAPOOGTW5H2PJQ.data | 3 + ...ML4UD5A3R4QRAVBI7NVH3PL64D3IJCWR2SPUQ.data | 36 ++++++ ...GPPLZNZOMHHZVIU76LCD5GF5DWFPEGEKODQPI.data | 4 + ...57JSEZN64SIJ5OIHSGJG4TJSSJLGI3PBJLQVI.data | 0 ...JOCHWXDRK5EXZQILBCKAPEDUJENZ5B5HJ5R3A.data | 28 +++++ ...OV2GWVMLAJPVEUMDMFKJZE7CMZESO6TYFAS2I.data | 3 + test/fixtures/v7-repo/blocks/SHARDING | 1 + ...MFARFMBIEICCIO6SVSAMQB7VUE6LW7QNX3WGQ.data | Bin 0 -> 10807 bytes ...2BFAGLXEZL4UWFNWM4LFTLMXQBCERZ6CMLX3Y.data | 2 + test/fixtures/v7-repo/blocks/_README | 22 ++++ test/fixtures/v7-repo/config | 91 ++++++++++++++ test/fixtures/v7-repo/datastore/000005.ldb | Bin 0 -> 1827 bytes test/fixtures/v7-repo/datastore/CURRENT | 1 + test/fixtures/v7-repo/datastore/LOCK | 0 test/fixtures/v7-repo/datastore/LOG | 3 + test/fixtures/v7-repo/datastore/LOG.old | 3 + .../v7-repo/datastore/MANIFEST-000009 | Bin 0 -> 149 bytes test/fixtures/v7-repo/datastore_spec | 1 + test/fixtures/v7-repo/version | 1 + 40 files changed, 548 insertions(+), 28 deletions(-) create mode 100644 test/fixtures/v7-repo/blocks/75/CIQMUSJFXRZX7ZRBICXJQPHVD7YSPD5KS75DRO7Q55ADVNORRBXV75Y.data create mode 100644 test/fixtures/v7-repo/blocks/7J/CIQKKLBWAIBQZOIS5X7E32LQAL6236OUKZTMHPQSFIXPWXNZHQOV7JQ.data create mode 100644 test/fixtures/v7-repo/blocks/EX/CIQKA7ZA5YM6KOJE3HVPZNQ6C4TJVSVGFTWWOTHP7GWZYGDUP5HIEXY.data create mode 100644 test/fixtures/v7-repo/blocks/IL/CIQJFGRQHQ45VCQLM7AJNF2GF5UHUAGGHC6LLAH6VYDEKLQMD4QLILY.data create mode 100644 test/fixtures/v7-repo/blocks/K5/CIQPW4MAGTUNEBGZCEFZU7XAJL2BMIHGVB5ZR2IOKOSTRMLIKPB6K5I.data create mode 100644 test/fixtures/v7-repo/blocks/LG/CIQJBQD2O6K4CGJVCCTJNUP57QHR4SKHZ74OIITBBGLOMCO3ZOLWLGA.data create mode 100644 test/fixtures/v7-repo/blocks/M4/CIQOLBQZSZAODJGGH6RYYVBUXHTS3SM5EORZDU63LYPEFUAFE4SBM4I.data create mode 100644 test/fixtures/v7-repo/blocks/OO/CIQBT4N7PS5IZ5IG2ZOUGKFK27IE33WKGJNDW2TY3LSBNQ34R6OVOOQ.data create mode 100644 test/fixtures/v7-repo/blocks/PJ/CIQB4F7VKKQDXHMXX6WYQZTRR5QVLP7VBQYAYW2Y5BAPOOGTW5H2PJQ.data create mode 100644 test/fixtures/v7-repo/blocks/PU/CIQJF2E6OPOEYYEVHYML4UD5A3R4QRAVBI7NVH3PL64D3IJCWR2SPUQ.data create mode 100644 test/fixtures/v7-repo/blocks/QP/CIQNLGENZXNRUMUHZYGPPLZNZOMHHZVIU76LCD5GF5DWFPEGEKODQPI.data create mode 100644 test/fixtures/v7-repo/blocks/QV/CIQOHMGEIKMPYHAUTL57JSEZN64SIJ5OIHSGJG4TJSSJLGI3PBJLQVI.data create mode 100644 test/fixtures/v7-repo/blocks/R3/CIQBED3K6YA5I3QQWLJOCHWXDRK5EXZQILBCKAPEDUJENZ5B5HJ5R3A.data create mode 100644 test/fixtures/v7-repo/blocks/S2/CIQPF3CHDB5GQ5ZBISOV2GWVMLAJPVEUMDMFKJZE7CMZESO6TYFAS2I.data create mode 100644 test/fixtures/v7-repo/blocks/SHARDING create mode 100644 test/fixtures/v7-repo/blocks/WG/CIQN2ZNT35EZ4XBIEYMFARFMBIEICCIO6SVSAMQB7VUE6LW7QNX3WGQ.data create mode 100644 test/fixtures/v7-repo/blocks/X3/CIQFTFEEHEDF6KLBT32BFAGLXEZL4UWFNWM4LFTLMXQBCERZ6CMLX3Y.data create mode 100644 test/fixtures/v7-repo/blocks/_README create mode 100644 test/fixtures/v7-repo/config create mode 100644 test/fixtures/v7-repo/datastore/000005.ldb create mode 100644 test/fixtures/v7-repo/datastore/CURRENT create mode 100644 test/fixtures/v7-repo/datastore/LOCK create mode 100644 test/fixtures/v7-repo/datastore/LOG create mode 100644 test/fixtures/v7-repo/datastore/LOG.old create mode 100644 test/fixtures/v7-repo/datastore/MANIFEST-000009 create mode 100644 test/fixtures/v7-repo/datastore_spec create mode 100644 test/fixtures/v7-repo/version diff --git a/.aegir.js b/.aegir.js index 53996e4216..424edce795 100644 --- a/.aegir.js +++ b/.aegir.js @@ -11,7 +11,7 @@ const preloadNode = MockPreloadNode.createNode() const echoServer = EchoServer.createServer() module.exports = { - bundlesize: { maxSize: '685kB' }, + bundlesize: { maxSize: '650kB' }, webpack: { resolve: { mainFields: ['browser', 'main'], diff --git a/README.md b/README.md index 908c21d2e8..20589b2ee4 100644 --- a/README.md +++ b/README.md @@ -284,6 +284,18 @@ Example: const node = await IPFS.create({ repo: '/var/ipfs/data' }) ``` +##### `options.repoAutoMigrate` + +| Type | Default | +|------|---------| +| boolean | `true` | + +`js-ipfs` comes bundled with a tool that automatically migrates your IPFS repository when a new version is available. + +**For apps that build on top of `js-ipfs` and run in the browser environment, be aware that disabling automatic +migrations leaves the user with no way to run the migrations because there is no CLI in the browser. In such +a case, you should provide a way to trigger migrations manually.** + ##### `options.init` | Type | Default | diff --git a/package.json b/package.json index 4f08f4477d..bdaff4d0ea 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "ipfs-http-response": "~0.4.0", "ipfs-mfs": "^0.13.0", "ipfs-multipart": "^0.2.0", - "ipfs-repo": "^0.28.1", + "ipfs-repo": "^0.29.0", "ipfs-unixfs": "~0.1.16", "ipfs-unixfs-exporter": "^0.38.0", "ipfs-unixfs-importer": "^0.40.0", diff --git a/src/cli/bin.js b/src/cli/bin.js index edb4e1a2f2..f43855758c 100755 --- a/src/cli/bin.js +++ b/src/cli/bin.js @@ -26,6 +26,7 @@ if (!semver.satisfies(process.versions.node, pkg.engines.node)) { const YargsPromise = require('yargs-promise') const updateNotifier = require('update-notifier') const debug = require('debug')('ipfs:cli') +const { errors: { InvalidRepoVersionError } } = require('ipfs-repo') const parser = require('./parser') const commandAlias = require('./command-alias') const { print } = require('./utils') @@ -50,6 +51,11 @@ cli }) .catch(({ error, argv }) => { getIpfs = argv && argv.getIpfs + + if (error.code === InvalidRepoVersionError.code) { + error.message = 'Incompatible repo version. Migration needed. Pass --migrate for automatic migration' + } + if (error.message) { print(error.message) debug(error) @@ -57,6 +63,7 @@ cli print('Unknown error, please re-run the command with DEBUG=ipfs:cli to see debug output') debug(error) } + process.exit(1) }) .finally(() => { diff --git a/src/cli/commands/daemon.js b/src/cli/commands/daemon.js index b1e8aef26a..f018362e99 100644 --- a/src/cli/commands/daemon.js +++ b/src/cli/commands/daemon.js @@ -73,6 +73,7 @@ module.exports = { config, silent: argv.silent, repo: process.env.IPFS_PATH, + repoAutoMigrate: argv.migrate, offline: argv.offline, pass: argv.pass, preload: { enabled: argv.enablePreload }, @@ -96,10 +97,8 @@ module.exports = { print(`Web UI available at ${toUri(apiServer.info.ma)}/webui`) }) } catch (err) { - if (err.code === 'ENOENT' && err.message.match(/uninitialized/i)) { - print('Error: no initialized ipfs repo found in ' + repoPath) - print('please run: jsipfs init') - process.exit(1) + if (err.code === 'ERR_REPO_NOT_INITIALIZED' || err.message.match(/uninitialized/i)) { + err.message = 'no initialized ipfs repo found in ' + repoPath + '\nplease run: jsipfs init' } throw err } diff --git a/src/cli/daemon.js b/src/cli/daemon.js index 6fe2083e36..c2dc556a03 100644 --- a/src/cli/daemon.js +++ b/src/cli/daemon.js @@ -54,17 +54,8 @@ class Daemon { } // start the daemon - const ipfsOpts = Object.assign({ }, { init: true, start: true, libp2p }, this._options) - const ipfs = new IPFS(ipfsOpts) - - await new Promise((resolve, reject) => { - ipfs.once('error', err => { - this._log('error starting core', err) - err.code = 'ENOENT' - reject(err) - }) - ipfs.once('start', resolve) - }) + const ipfsOpts = Object.assign({}, { init: true, start: true, libp2p }, this._options) + const ipfs = await IPFS.create(ipfsOpts) this._ipfs = ipfs diff --git a/src/cli/parser.js b/src/cli/parser.js index 25a1ca6305..f28979feec 100644 --- a/src/cli/parser.js +++ b/src/cli/parser.js @@ -19,6 +19,11 @@ const parser = yargs type: 'string', default: '' }) + .option('migrate', { + desc: 'Enable/disable automatic repo migrations', + type: 'boolean', + default: false + }) .epilog(utils.ipfsPathHelp) .demandCommand(1) .fail((msg, err, yargs) => { diff --git a/src/cli/utils.js b/src/cli/utils.js index 842acd3d61..b53c4b4799 100644 --- a/src/cli/utils.js +++ b/src/cli/utils.js @@ -4,9 +4,7 @@ const fs = require('fs') const os = require('os') const multiaddr = require('multiaddr') const path = require('path') -const debug = require('debug') -const log = debug('cli') -log.error = debug('cli:error') +const log = require('debug')('ipfs:cli:utils') const Progress = require('progress') const byteman = require('byteman') const promisify = require('promisify-es6') @@ -47,6 +45,7 @@ exports.getIPFS = (argv, callback) => { const IPFS = require('../core') const node = new IPFS({ silent: argv.silent, + repoAutoMigrate: argv.migrate, repo: exports.getRepoPath(), init: false, start: false, @@ -60,7 +59,7 @@ exports.getIPFS = (argv, callback) => { }) node.on('error', (err) => { - throw err + callback(err) }) node.once('ready', () => { diff --git a/src/core/config.js b/src/core/config.js index d0070d1a32..6f2353efb1 100644 --- a/src/core/config.js +++ b/src/core/config.js @@ -28,6 +28,7 @@ const s = superstruct({ const configSchema = s({ repo: optional(s('object|string')), repoOwner: 'boolean?', + repoAutoMigrate: 'boolean?', preload: s({ enabled: 'boolean?', addresses: optional(s(['multiaddr'])), diff --git a/src/core/index.js b/src/core/index.js index 1d2483a3b9..a5ad33edf9 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -70,7 +70,7 @@ class IPFS extends EventEmitter { if (typeof options.repo === 'string' || options.repo === undefined) { - this._repo = defaultRepo(options.repo) + this._repo = defaultRepo(options) } else { this._repo = options.repo } diff --git a/src/core/runtime/repo-browser.js b/src/core/runtime/repo-browser.js index bcfe6b8489..8bd0f330e2 100644 --- a/src/core/runtime/repo-browser.js +++ b/src/core/runtime/repo-browser.js @@ -2,7 +2,7 @@ const IPFSRepo = require('ipfs-repo') -module.exports = (dir) => { - const repoPath = dir || 'ipfs' - return new IPFSRepo(repoPath) +module.exports = (options) => { + const repoPath = options.repo || 'ipfs' + return new IPFSRepo(repoPath, { autoMigrate: options.repoAutoMigrate }) } diff --git a/src/core/runtime/repo-nodejs.js b/src/core/runtime/repo-nodejs.js index 751689cbac..431d59b377 100644 --- a/src/core/runtime/repo-nodejs.js +++ b/src/core/runtime/repo-nodejs.js @@ -4,8 +4,8 @@ const os = require('os') const IPFSRepo = require('ipfs-repo') const path = require('path') -module.exports = (dir) => { - const repoPath = dir || path.join(os.homedir(), '.jsipfs') +module.exports = (options) => { + const repoPath = options.repo || path.join(os.homedir(), '.jsipfs') - return new IPFSRepo(repoPath) + return new IPFSRepo(repoPath, { autoMigrate: options.repoAutoMigrate }) } diff --git a/test/cli/general.js b/test/cli/general.js index 4bff0d095d..15abf102fc 100644 --- a/test/cli/general.js +++ b/test/cli/general.js @@ -1,8 +1,17 @@ /* eslint-env mocha */ 'use strict' +const os = require('os') +const fs = require('fs').promises +const path = require('path') +const hat = require('hat') const { expect } = require('interface-ipfs-core/src/utils/mocha') +const { repoVersion } = require('ipfs-repo') +const promisify = require('promisify-es6') +const ncp = promisify(require('ncp').ncp) const runOnAndOff = require('../utils/on-and-off') +const ipfsExec = require('../utils/ipfs-exec') +const clean = require('../utils/clean') describe('general cli options', () => runOnAndOff.off((thing) => { it('should handle --silent flag', async () => { @@ -17,3 +26,83 @@ describe('general cli options', () => runOnAndOff.off((thing) => { expect(out).to.include('again') }) })) + +describe('--migrate', () => { + let ipfs, repoPath + + async function setRepoVersion (version) { + await fs.writeFile(path.join(repoPath, 'version'), version) + } + + async function getRepoVersion () { + return parseInt(await fs.readFile(path.join(repoPath, 'version'), 'utf8')) + } + + beforeEach(async () => { + repoPath = path.join(os.tmpdir(), `ipfs-${hat()}`) + const v7RepoPath = path.join(__dirname, '../fixtures/v7-repo') + await ncp(v7RepoPath, repoPath) + ipfs = ipfsExec(repoPath) + }) + + afterEach(() => clean(repoPath)) + + it('should not migrate for daemon command when --migrate flag not set', async () => { + // There are no migrations prior to 7 so it's safe to set version to 5 since + // the repo is the same. We set to 5 because version 6 & 7 are considered + // the same in repo.version.check. + await setRepoVersion(5) + const err = await ipfs.fail('daemon') + expect(err.stdout).to.include('Pass --migrate for automatic migration') + const version = await getRepoVersion() + expect(version).to.equal(5) // Should not have migrated + }) + + it('should not migrate for other commands when --migrate flag not set', async () => { + // There are no migrations prior to 7 so it's safe to set version to 5 since + // the repo is the same. We set to 5 because version 6 & 7 are considered + // the same in repo.version.check. + await setRepoVersion(5) + const err = await ipfs.fail('files ls') + expect(err.stdout).to.include('Pass --migrate for automatic migration') + const version = await getRepoVersion() + expect(version).to.equal(5) // Should not have migrated + }) + + it('should migrate for daemon command when --migrate flag set', async () => { + // There are no migrations prior to 7 so it's safe to set version to 5 since + // the repo is the same. We set to 5 because version 6 & 7 are considered + // the same in repo.version.check. + await setRepoVersion(5) + + const daemon = ipfs('daemon --migrate') + let stdout = '' + + daemon.stdout.on('data', data => { + stdout += data.toString('utf8') + + if (stdout.includes('Daemon is ready')) { + daemon.kill() + } + }) + + await expect(daemon) + .to.eventually.be.rejected() + .and.to.include({ + killed: true + }) + + const version = await getRepoVersion() + expect(version).to.equal(repoVersion) // Should have migrated to latest + }) + + it('should migrate for other commands when --migrate flag set', async () => { + // There are no migrations prior to 7 so it's safe to set version to 5 since + // the repo is the same. We set to 5 because version 6 & 7 are considered + // the same in repo.version.check. + await setRepoVersion(5) + await ipfs('files ls --migrate') + const version = await getRepoVersion() + expect(version).to.equal(repoVersion) // Should have migrated to latest + }) +}) diff --git a/test/fixtures/v7-repo/blocks/75/CIQMUSJFXRZX7ZRBICXJQPHVD7YSPD5KS75DRO7Q55ADVNORRBXV75Y.data b/test/fixtures/v7-repo/blocks/75/CIQMUSJFXRZX7ZRBICXJQPHVD7YSPD5KS75DRO7Q55ADVNORRBXV75Y.data new file mode 100644 index 0000000000000000000000000000000000000000..13521eaa2afc4f2d29bbcaf637bc04cce7ea2493 GIT binary patch literal 10765 zcmeIzEeZlr6b8^4lRS$&41x-S4CpqTJV|f|cB|1nh%i6ZEJp1H_n}L$Y0zaD&doPn zzWbdx57U@E&bOlaj0es8b+0$qe0Ewq*X_PM9_rC{d0E9|m`0nfBq6>-GiXI3(2#~S zq#+GyNJARZkcKp*Aq{CrLmJYMhBTxh4QWV28q$!4G^8O7X-GpF(vXIKpke5RZra~< HCdqHU=u7k0 literal 0 HcmV?d00001 diff --git a/test/fixtures/v7-repo/blocks/7J/CIQKKLBWAIBQZOIS5X7E32LQAL6236OUKZTMHPQSFIXPWXNZHQOV7JQ.data b/test/fixtures/v7-repo/blocks/7J/CIQKKLBWAIBQZOIS5X7E32LQAL6236OUKZTMHPQSFIXPWXNZHQOV7JQ.data new file mode 100644 index 0000000000..627ffcdf87 --- /dev/null +++ b/test/fixtures/v7-repo/blocks/7J/CIQKKLBWAIBQZOIS5X7E32LQAL6236OUKZTMHPQSFIXPWXNZHQOV7JQ.data @@ -0,0 +1,55 @@ + +•  + 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/` +- 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 + \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/EX/CIQKA7ZA5YM6KOJE3HVPZNQ6C4TJVSVGFTWWOTHP7GWZYGDUP5HIEXY.data b/test/fixtures/v7-repo/blocks/EX/CIQKA7ZA5YM6KOJE3HVPZNQ6C4TJVSVGFTWWOTHP7GWZYGDUP5HIEXY.data new file mode 100644 index 0000000000..5321bdc1d3 --- /dev/null +++ b/test/fixtures/v7-repo/blocks/EX/CIQKA7ZA5YM6KOJE3HVPZNQ6C4TJVSVGFTWWOTHP7GWZYGDUP5HIEXY.data @@ -0,0 +1,4 @@ +/ +" ÊI%¼sæ!@®˜<õñ'ª—ú8»ðï@:µÑˆo_÷directV2 +" Ýe³ßIž\(&PD¬ + ô« 2ýhO.߃o» recursive¸V \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/IL/CIQJFGRQHQ45VCQLM7AJNF2GF5UHUAGGHC6LLAH6VYDEKLQMD4QLILY.data b/test/fixtures/v7-repo/blocks/IL/CIQJFGRQHQ45VCQLM7AJNF2GF5UHUAGGHC6LLAH6VYDEKLQMD4QLILY.data new file mode 100644 index 0000000000..62d1c2979b --- /dev/null +++ b/test/fixtures/v7-repo/blocks/IL/CIQJFGRQHQ45VCQLM7AJNF2GF5UHUAGGHC6LLAH6VYDEKLQMD4QLILY.data @@ -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 +½ \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/K5/CIQPW4MAGTUNEBGZCEFZU7XAJL2BMIHGVB5ZR2IOKOSTRMLIKPB6K5I.data b/test/fixtures/v7-repo/blocks/K5/CIQPW4MAGTUNEBGZCEFZU7XAJL2BMIHGVB5ZR2IOKOSTRMLIKPB6K5I.data new file mode 100644 index 0000000000000000000000000000000000000000..e1cd3e3e21d1e86994739a1b26b18c77aa98f034 GIT binary patch literal 402 zcmWgA<5Ch*SgK>j#LTl(=mjz6J*Z#Z`mUeibke1%>*qt`A@ymo*6O-~wOC)CS z3K@XZPnu<5V|lBKJN>}4>2CTNRSd^0_H1qVw~ozKk4Ii%i@p$ha(-S(VseSZ2}U6u zkd9Ap+$E|q$`xJa#!6jHIxzjpl!P0h>MB2GPV&4rkBc)?h$SUIxmdzcNEf7f!hx#t zsRt!Z1(r>_`1cRLoTvNwA5WALIj242ynT9l>I@;4jMSV0i9<|6CLrZc+a#wsJX~_j zesNET$-x#mt z32eIbQ0}@+=%siAr$efYPh^GMo-cfP`NkU|wxZO;l-yK_a~wkEAPtfq_t)&|`O0=J z)>&iK^$Wi5P8mg6XI0#KB6hf@e{Q&y5MOa>a%oX!Nu_RHeo1Pv#8gg*cdpLpJ$qZq tsQnzz_w~A`XB0nMvHZ_Q{$={^NqgFq=2+MYv6SSO7D?P^<6`1q1OQn=pS%D7 literal 0 HcmV?d00001 diff --git a/test/fixtures/v7-repo/blocks/LG/CIQJBQD2O6K4CGJVCCTJNUP57QHR4SKHZ74OIITBBGLOMCO3ZOLWLGA.data b/test/fixtures/v7-repo/blocks/LG/CIQJBQD2O6K4CGJVCCTJNUP57QHR4SKHZ74OIITBBGLOMCO3ZOLWLGA.data new file mode 100644 index 0000000000..71be805f1e --- /dev/null +++ b/test/fixtures/v7-repo/blocks/LG/CIQJBQD2O6K4CGJVCCTJNUP57QHR4SKHZ74OIITBBGLOMCO3ZOLWLGA.data @@ -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 +· \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/M4/CIQOLBQZSZAODJGGH6RYYVBUXHTS3SM5EORZDU63LYPEFUAFE4SBM4I.data b/test/fixtures/v7-repo/blocks/M4/CIQOLBQZSZAODJGGH6RYYVBUXHTS3SM5EORZDU63LYPEFUAFE4SBM4I.data new file mode 100644 index 0000000000..f2bf4f8b8d --- /dev/null +++ b/test/fixtures/v7-repo/blocks/M4/CIQOLBQZSZAODJGGH6RYYVBUXHTS3SM5EORZDU63LYPEFUAFE4SBM4I.data @@ -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 + + +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 + ipfs ls /bar + ipfs cat /baz + ipfs cat /bar/baz + ipfs cat /bar + ipfs ls /baz + + +References: + + ipfs refs + ipfs refs -r + ipfs refs --help + + +Get: + + ipfs get -o foo2 + diff foo foo2 + + +Objects: + + ipfs object get + ipfs object get /foo2 + ipfs object --help + + +Pin + GC: + + ipfs pin add + ipfs repo gc + ipfs ls + ipfs pin rm + ipfs repo gc + + +Daemon: + + ipfs daemon (in another terminal) + ipfs id + + +Network: + + (must be online) + ipfs swarm peers + ipfs id + ipfs cat + + +Mount: + + (warning: fuse is finicky!) + ipfs mount + cd /ipfs/ + 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 +µ \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/OO/CIQBT4N7PS5IZ5IG2ZOUGKFK27IE33WKGJNDW2TY3LSBNQ34R6OVOOQ.data b/test/fixtures/v7-repo/blocks/OO/CIQBT4N7PS5IZ5IG2ZOUGKFK27IE33WKGJNDW2TY3LSBNQ34R6OVOOQ.data new file mode 100644 index 0000000000..770348274e --- /dev/null +++ b/test/fixtures/v7-repo/blocks/OO/CIQBT4N7PS5IZ5IG2ZOUGKFK27IE33WKGJNDW2TY3LSBNQ34R6OVOOQ.data @@ -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. +Š \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/PJ/CIQB4F7VKKQDXHMXX6WYQZTRR5QVLP7VBQYAYW2Y5BAPOOGTW5H2PJQ.data b/test/fixtures/v7-repo/blocks/PJ/CIQB4F7VKKQDXHMXX6WYQZTRR5QVLP7VBQYAYW2Y5BAPOOGTW5H2PJQ.data new file mode 100644 index 0000000000..0335563629 --- /dev/null +++ b/test/fixtures/v7-repo/blocks/PJ/CIQB4F7VKKQDXHMXX6WYQZTRR5QVLP7VBQYAYW2Y5BAPOOGTW5H2PJQ.data @@ -0,0 +1,3 @@ + + Index + \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/PU/CIQJF2E6OPOEYYEVHYML4UD5A3R4QRAVBI7NVH3PL64D3IJCWR2SPUQ.data b/test/fixtures/v7-repo/blocks/PU/CIQJF2E6OPOEYYEVHYML4UD5A3R4QRAVBI7NVH3PL64D3IJCWR2SPUQ.data new file mode 100644 index 0000000000..e6ef304bfd --- /dev/null +++ b/test/fixtures/v7-repo/blocks/PU/CIQJF2E6OPOEYYEVHYML4UD5A3R4QRAVBI7NVH3PL64D3IJCWR2SPUQ.data @@ -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 +œ \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/QP/CIQNLGENZXNRUMUHZYGPPLZNZOMHHZVIU76LCD5GF5DWFPEGEKODQPI.data b/test/fixtures/v7-repo/blocks/QP/CIQNLGENZXNRUMUHZYGPPLZNZOMHHZVIU76LCD5GF5DWFPEGEKODQPI.data new file mode 100644 index 0000000000..6636930467 --- /dev/null +++ b/test/fixtures/v7-repo/blocks/QP/CIQNLGENZXNRUMUHZYGPPLZNZOMHHZVIU76LCD5GF5DWFPEGEKODQPI.data @@ -0,0 +1,4 @@ +2 +" ’èžsÜL`•>¾P}ãÈD +>ÚŸo_¸=¡"´u'Ò 0.0-intro§ + \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/QV/CIQOHMGEIKMPYHAUTL57JSEZN64SIJ5OIHSGJG4TJSSJLGI3PBJLQVI.data b/test/fixtures/v7-repo/blocks/QV/CIQOHMGEIKMPYHAUTL57JSEZN64SIJ5OIHSGJG4TJSSJLGI3PBJLQVI.data new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/fixtures/v7-repo/blocks/R3/CIQBED3K6YA5I3QQWLJOCHWXDRK5EXZQILBCKAPEDUJENZ5B5HJ5R3A.data b/test/fixtures/v7-repo/blocks/R3/CIQBED3K6YA5I3QQWLJOCHWXDRK5EXZQILBCKAPEDUJENZ5B5HJ5R3A.data new file mode 100644 index 0000000000..389e111776 --- /dev/null +++ b/test/fixtures/v7-repo/blocks/R3/CIQBED3K6YA5I3QQWLJOCHWXDRK5EXZQILBCKAPEDUJENZ5B5HJ5R3A.data @@ -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 +à \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/S2/CIQPF3CHDB5GQ5ZBISOV2GWVMLAJPVEUMDMFKJZE7CMZESO6TYFAS2I.data b/test/fixtures/v7-repo/blocks/S2/CIQPF3CHDB5GQ5ZBISOV2GWVMLAJPVEUMDMFKJZE7CMZESO6TYFAS2I.data new file mode 100644 index 0000000000..b137a86405 --- /dev/null +++ b/test/fixtures/v7-repo/blocks/S2/CIQPF3CHDB5GQ5ZBISOV2GWVMLAJPVEUMDMFKJZE7CMZESO6TYFAS2I.data @@ -0,0 +1,3 @@ +- +" õR ;—¿­ˆfqaU¿õ 0 [Xè@÷8Ó·O§¦index + \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/SHARDING b/test/fixtures/v7-repo/blocks/SHARDING new file mode 100644 index 0000000000..a153331dac --- /dev/null +++ b/test/fixtures/v7-repo/blocks/SHARDING @@ -0,0 +1 @@ +/repo/flatfs/shard/v1/next-to-last/2 diff --git a/test/fixtures/v7-repo/blocks/WG/CIQN2ZNT35EZ4XBIEYMFARFMBIEICCIO6SVSAMQB7VUE6LW7QNX3WGQ.data b/test/fixtures/v7-repo/blocks/WG/CIQN2ZNT35EZ4XBIEYMFARFMBIEICCIO6SVSAMQB7VUE6LW7QNX3WGQ.data new file mode 100644 index 0000000000000000000000000000000000000000..afeac9fff900985e656e0ffd12d063e05daa810f GIT binary patch literal 10807 zcmeI&uL{Co6o=tW4Dt;`KSTr_j3MX+7_1t_WL=ojxNVMY|5GW1adZlX`)Y07y7%YP?qU{{$Gx2`m69sy zWJ+uZ*FiFniim)QXo!Yrh=yp0hG>X}Xo!Yrh=yp0hG>X}Xo!Yrh=yp0hG>X}Xo!Yr zh=yp0hG>X}XqXrcW5;W}&gn~D3*BocDjLt##D8b4Wpg{Q4v*3Q|5IopqvpJnuKel? D6)*)k literal 0 HcmV?d00001 diff --git a/test/fixtures/v7-repo/blocks/X3/CIQFTFEEHEDF6KLBT32BFAGLXEZL4UWFNWM4LFTLMXQBCERZ6CMLX3Y.data b/test/fixtures/v7-repo/blocks/X3/CIQFTFEEHEDF6KLBT32BFAGLXEZL4UWFNWM4LFTLMXQBCERZ6CMLX3Y.data new file mode 100644 index 0000000000..9553a942db --- /dev/null +++ b/test/fixtures/v7-repo/blocks/X3/CIQFTFEEHEDF6KLBT32BFAGLXEZL4UWFNWM4LFTLMXQBCERZ6CMLX3Y.data @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/test/fixtures/v7-repo/blocks/_README b/test/fixtures/v7-repo/blocks/_README new file mode 100644 index 0000000000..ac3b6034c3 --- /dev/null +++ b/test/fixtures/v7-repo/blocks/_README @@ -0,0 +1,22 @@ +This is a repository of IPLD objects. Each IPLD object is in a single file, +named .data. Where 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. diff --git a/test/fixtures/v7-repo/config b/test/fixtures/v7-repo/config new file mode 100644 index 0000000000..c51e36ede3 --- /dev/null +++ b/test/fixtures/v7-repo/config @@ -0,0 +1,91 @@ +{ + "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", + "Delegates": [] + }, + "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" + ], + "Pubsub": { + "Router": "gossipsub", + "Enabled": true + }, + "Swarm": { + "ConnMgr": { + "LowWater": 200, + "HighWater": 500 + } + }, + "Identity": { + "PeerID": "Qman9VQpAckWVzY31TywMqQdzi1NsFGXXgfinYArNKFhLQ", + "PrivKey": "CAASpgkwggSiAgEAAoIBAQCwRliHPq+RkxGBuPHahayCNOu3fpPIC4B1bal8/5uMok2e0IFmcuv17fP/hxKBmPWzIE69d9gRAkAvEu3hoO8GOXdxNSFpHzP2AjaQDLSbh6DCTpWjd0TVoUjt/62RDWQ86jjiFHtzMQA/4HgCvzNFKgYpjYvtXBFr8ShTQohnMrnWAZiLXr5a0GHJMs/+6lso0tKQnU0BtrNdTJKRLkDHlzH42utSgIXpSQX/0u2s0Hz+PyuPG1RCc/OFgd0ki+x82230oBHUyBe83KgR8gGx72MDCf5A+gMFdBwY7wLd/V2R3qWY8I04t7Esg7ypft1WGO0V3mHipjSVhsR9T4HbAgMBAAECggEALywEEN1Dmo9ixfY6MqJHEekbk1U6MvRxAfvAuYSlmbLtVqyxlDr4zi1JeH4rA6dtSOxCZg2mMpcJmg9UvWaV0HKcdh0jvb/t5c2d0Fq2ElDvQlBJVx9ZulmY7KfZSNHumyaK5mVYy/C3AmENfJ6yF7YxQ/lvEqvqtZopkm5hlkvYwNckvTAAIAPuS8tT7GDwElDjwLLEoXE0onzBlziSKWE8wJjLvhMyvDNJvyNR+uC98T+sjdiDQr/ch5I+04K9Elj7BZaSbLulaSzgAvADpC9DLNHBpeFS0lR32ZE0H4ZLotwolGXWf221BgxIy8vlh97QxoY6N23+HRQocSWcEQKBgQDmbpGjEU+FG+6njyXJyHvUSYzZ9YBipNC/xZ4PtwYWHaSS+qgmkVwO4UZ5+d01/mHfncUt0bA/j0VJNWJNaQVMMpaBUr25duPzDO78Ya7Q3r5qy96MYWkq2QF+TqmDKA/3iUIUmaSendoaBQIkjeOnvezM8/GAsCoQBHeqg0I45wKBgQDD1XDeuuNThRANqqChylgKhIZuDvI2/lAZULh3Duhbrk5u+L7kxG13elyNVK4H0LllrOHWEpcPR9mEg+5OSKApg5rhRIdKKNhY0LV0ks47a114X/gOlzWiBjbaqJiAUCbdNwDiYZ11Bg/iek9PagovQ0WaLAp4qM3c4V319joM7QKBgBpkO4Xjq6nhIxpJyNgtgBE2Q02LUqL5oXb1WT8PhUDvMDQtRSj1qQeDQaEivvU6J1eHKFgxFfCRpivWU2XuS08I1DgHk/cz6LOjnZOGVJFTkZeFtf16AqOHqyYeOEfvRLTjIZBecH5CMgKc5DvvjE1f8Ukf/17vzkF7YYFD+0etAoGAeuDYu8kEjwl1Mz4XIK24ZJEXUMOsE/mrBNdzh7Eg9zX+HP+TuDPQhCGRJVU3BcxgKH48DnkHtBzfTZkC1LgZVzMu4Z6ATXYnmkMLOKRNJ1eNBNUi7vTOQGYp0TXsysaAPFohAetCQ4WUPgWE8k2VKmbJq51qzJ8O3UPEE2t2rVkCgYBRJGkcvD97HFQdtMiDFgQMVu0NCkgNJQmYE9t8ZBfuY9MJuA/ZPJnoj/JCVgoP+MkqhFsLcujgj6K0hT80wvfXrWI+zZHJII1PHhq/cbIAwMu5geXw4mlsE3GR+euBj8x3vmIFwBVoo3U1Ig3A5Y59ymXK+diNGvvAsPhPvm7lEw==" + }, + "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": "fwvY3+pFurDT/4YrT17AcHDD", + "hash": "sha2-512" + } + } +} \ No newline at end of file diff --git a/test/fixtures/v7-repo/datastore/000005.ldb b/test/fixtures/v7-repo/datastore/000005.ldb new file mode 100644 index 0000000000000000000000000000000000000000..1779718894fdcdec103eaa03556f8bec3d99e41c GIT binary patch literal 1827 zcmZSZ+`+2vW*QpdXdDvaX5!`SF*TjY~}Tfc=;~qO zX&z!?8X4x|9O3He>nQfQr+K^#gN5{d|0i100>5s|?G0Dgwi@BMJ+BB20q} zBaBT<3k%acl8V#J%rnXyjs5b38kp>49^Ab1=F|LNAJ+Sq9N;TlzI@*K;#C4t#`hN= z?%I9$)583y{9`JbDK;UJ)lxO(FREgHS~OmkU^iMSV$W(dr|`I&z4zO{s>jY<=b!Z^ z{t4q*J;{THX2<$MJeFKHyBz*ROz?Nr9RbBzT#pYmUvtuqVikxE+#{)SmR0h1!IOKH z{Xz5N-^KsD`bc@5=fwamgTSdV>2GD#=BMlO&Dr>4vZ32=_6yRl?E*i9Yb>(0S{Qy} zYvfcPIWC!ftM#v5o^?8A+F!O$rN4GQPhw`Un13K%;&KYpA8d!uF8d({d zTbY{cnV47_fI*Z7gVky#4hErROa@JiN(Q`aoLX%jZQpqr85vm_n41{+8GzzkOihf8 z3>(}c+U?d)oGjS5{LXM#P{4;A^3@L<->)&{riJ6gsk=gkgQ>1&iPh_yGvx%Q)NQiqxpovSMTc~@uo4ZMbb4Zk* ztFeivqh~;5khw>cagevWo4;pZu#d4vgmH*BBQrGltLYbH6O;HyBZq{@VRX661TIya zJp+A$!kqnmjm%sE{T;&tjUq#hgH5~x+(JVFf*hTk%$+?<%su?wJR`%RoSnS_e9g@L z{XBt*98x%qmN&F3Zy1G?a`KZCbMy-`^NJZ+AR#WKu%KSyo#azXm7A~rY?BjLn{{fL z&f9dK_dnOpktnJ6Yl;V{14qwu!5)X#Lat0aT?QI#AW=>r=4Mz`7P6H=i8(DZrzEvV zFDJDuH76xWs1&&+em${oPo%$7q_dHWk8_B>Pmq^Mc(9+DtD~!jiKlspiD_h*i*tmlr) th_Pu@7$Xw{7zpd<TQ=oe(>6*ICx#P(ggbBu$5k%^0wftj0y1pq4uC*lAA literal 0 HcmV?d00001 diff --git a/test/fixtures/v7-repo/datastore_spec b/test/fixtures/v7-repo/datastore_spec new file mode 100644 index 0000000000..7bf9626c24 --- /dev/null +++ b/test/fixtures/v7-repo/datastore_spec @@ -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"} \ No newline at end of file diff --git a/test/fixtures/v7-repo/version b/test/fixtures/v7-repo/version new file mode 100644 index 0000000000..c7930257df --- /dev/null +++ b/test/fixtures/v7-repo/version @@ -0,0 +1 @@ +7 \ No newline at end of file