Перейти к содержимому

Bitcoin core указать где лежат блоки

  • автор:

whoa there, pardner!

Your request has been blocked due to a network policy.

Try logging in or creating an account here to get back to browsing.

If you’re running a script or application, please register or sign in with your developer credentials here. Additionally make sure your User-Agent is not empty and is something unique and descriptive and try again. if you’re supplying an alternate User-Agent string, try changing back to default as that can sometimes result in a block.

You can read Reddit’s Terms of Service here.

if you think that we’ve incorrectly blocked you or you would like to discuss easier ways to get the data you want, please file a ticket here.

when contacting us, please include your ip address which is: 178.132.110.95 and reddit account

Data directory

The Data Directory is the location where Bitcoin‘s data files are stored, including the wallet data file.

Contents

  • 1 Default Location
    • 1.1 Windows
    • 1.2 Linux
    • 1.3 Mac
    • 2.1 Files
    • 2.2 database subdirectory
    • 2.3 testnet3 subdirectory
    • 2.4 blocks subdirectory
    • 2.5 chainstate subdirectory
    • 2.6 locks subdirectory
    • 2.7 Personally identifiable data [v0.8 and above]

    Default Location

    Windows

    Go to Start -> Run (or press WinKey+R) and run this:

    %APPDATA%Bitcoin

    Bitcoin’s data folder will open. For most users, this is the following locations:

    C:Documents and SettingsYourUserNameApplication dataBitcoin (XP) C:UsersYourUserNameAppdataRoamingBitcoin (Vista and 7)

    “AppData” and “Application data” are hidden by default.

    You can also store Bitcoin data files in any other drive or folder.

    If you have already downloaded the data then you will have to move the data to the new folder. If you want to store them in D:BitcoinData then click on “Properties” of a shortcut to bitcoin-qt.exe and add -datadir=D:BitcoinData at the end as an example:

    "C:Program Files (x86)Bitcoinbitcoin-qt.exe" -datadir=d:BitcoinData

    Start Bitcoin, now you will see all the files are created in the new data directory.

    Linux

    By default Bitcoin will put its data here:

    ~/.bitcoin/

    You need to do a “ls -a” to see directories that start with a dot.

    If that’s not it, you can do a search like this:

    find / -name wallet.dat -print 2>/dev/null

    Mac

    By default Bitcoin will put its data here:

    ~/Library/Application Support/Bitcoin/

    Directory Contents

    Files

    An overview of these is in files.md in the Bitcoin Core documentation.

    • .lock
      • Bitcoin data directory lock file
      • Contains configuration options.
      • Contains concatenated raw blocks. Stored are actual Bitcoin blocks, in network format, dumped to disk raw.
      • Indexing information used with blkxxxx.dat
      • Used by BDB
      • Bitcoin’s verbose log file. Automatically trimmed from time to time.
      • Storage for keys, transactions, metadata, and options. Please be sure to make backups of this file. It contains the keys necessary for spending your bitcoins.
      • Storage for ip addresses to make a reconnect easier
      • Storage for peer information to make a reconnect easier. This file uses a bitcoin-specific file format, unrelated to any database system [1] .
      • Statistics used to estimate fees and priorities. Saved just before program shutdown, and read in at startup.

      The data, index and log files are used by Oracle Berkeley DB, the embedded key/value data store that Bitcoin uses.

      database subdirectory

      Contains BDB journaling files

      testnet3 subdirectory

      Contains testnet versions of these files (if running with -testnet)

      blocks subdirectory

      [v0.8 and above] Contains blockchain data.

      • blk*.dat
        • Stored are actual Bitcoin blocks, in network format, dumped to disk raw. They are only needed for re-scanning missing transactions in a wallet, reorganizing to a different part of the chain, and serving the block data to other nodes that are synchronizing.
        • blocks/index subdirectory
          • [v0.8 and above] A LevelDB database that contains metadata about all known blocks, and where to find them on disk. Without this, finding a block would be very slow.

          chainstate subdirectory

          [v0.8 and above] A LevelDB database with a compact representation of all currently unspent transaction outputs and some metadata about the transactions they are from. The data here is necessary for validating new incoming blocks and transactions. It can theoretically be rebuilt from the block data (see the -reindex command line option), but this takes a rather long time. Without it, you could still theoretically do validation indeed, but it would mean a full scan through the blocks (7 GB as of may 2013) for every output being spent.

          locks subdirectory

          [v0.8 and above] Contains “undo” data.

          You can see blocks as ‘patches’ to the chain state (they consume some unspent outputs, and produce new ones), and see the undo data as reverse patches. They are necessary for rolling back the chainstate, which is necessary in case of reorganizations.

          Personally identifiable data [v0.8 and above]

          This section may be of use to you if you wish to send a friend the blockchain, avoiding them a hefty download.

          • wallet.dat
            • Contains addresses and transactions linked to them. Please be sure to make backups of this file. It contains the keys necessary for spending your bitcoins. You should not transfer this file to any third party or they may be able to access your bitcoins.
            • May contain information pertaining to your wallet. It may be safely deleted.
            • May contain IP addresses and transaction ID’s. It may be safely deleted.
            • This should only exist when bitcoin-qt is currently running. It contains information (BDB state) relating to your wallet.
            • Unknown whether this contains personally identifiable data. It may be safely deleted.

            Other files and folders (blocks, blocks/index, chainstate) may be safely transferred/archived as they contain information pertaining only to the public blockchain.

            Transferability

            The database files in the “blocks” and “chainstate” directories are cross-platform, and can be copied between different installations. These files, known collectively as a node‘s “block database”, represent all of the information downloaded by a node during the syncing process. In other words, if you copy installation A’s block database into installation B, installation B will then have the same syncing percentage as installation A. This is usually far faster than doing the normal initial sync over again. However, when you copy someone’s database in this way, you are trusting them absolutely. Bitcoin Core treats its block database files as 100% accurate and trustworthy, whereas during the normal initial sync it treats each block offered by a peer as invalid until proven otherwise. If an attacker is able to modify your block database files, then they can do all sorts of evil things which could cause you to lose bitcoins. Therefore, you should only copy block databases from Bitcoin installations under your personal control, and only over a secure connection.

            Each node has a unique block database, and all of the files are highly connected. So if you copy just a few files from one installation’s “blocks” or “chainstate” directories into another installation, this will almost certainly cause the second node to crash or get stuck at some random point in the future. If you want to copy a block database from one installation to another, you have to delete the old database and copy all of the files at once. Both nodes have to be shut down while copying.

            Only the file with the highest number in the “blocks” directory is ever written to. The earlier files will never change. Also, when these blk*.dat files are accessed, they are usually accessed in a highly sequential manner. Therefore, it’s possible to symlink the “blocks” directory or some subset of the blk*.dat files individually onto a magnetic storage drive without much loss in performance (see Splitting the data directory), and if two installations start out with identical block databases (due to the copying described previously), subsequent runs of rsync will be very efficient.

            Moving the Bitcoin Core Data Directory

            Bitcoin Core runs as a full network node and maintains a local copy of the block chain. This data independence improves wallet privacy and security. Unlike some SPV wallets that leak addresses to peers, Bitcoin Core stores all transactions locally. With local access to the complete set of headers and transactions, Bitcoin Core can use full verification to tell when peers lie about payments.

            However, dealing with the block chain comes at a price. An ever-growing data set causes smaller hard drives to fill up quickly. Furthermore, a new wallet can’t be used until the full block chain is downloaded and processed, which can take several hours on mid-range equipment.

            These problems can be solved by moving and copying Bitcoin Core’s data directory. This article describes two approaches that can be used with either a new or existing Bitcoin Core 0.10.0 installation.

            Wallet Back Up

            Although the procedures described here have been tested several times, Murphy’s law can strike at any time. To protect yourself from loss of funds, make a backup of your wallet now. Start Bitcoin Core and select the File -> Backup Wallet… option. After the backup has been saved, exit Bitcoin Core.

            Find the Default Data Directory

            If your data directory already contains a complete block chain and or/wallet, you may want to move it rather than start from scratch. The first step is finding the default data directory. Mac, Windows, and Linux version of Bitcoin Core each store data in a different location. The procedure described here will use a graphical file browser to find it.

            On Windows 7, begin by clicking on the Windows menu. Then click your username from the right-hand menu. Windows Explorer should show a folder containing other folders such as Contacts and Desktop. Another folder, AppData is hidden by default. It can be shown by selecting the Organize -> Folder and Search options menu. From the View tab, click the “Show hidden files, folder, and drives” option, then click “OK”.

            Change Bitcoin Core Data Directory

            Windows Explorer should now display an AppData folder. Double click it. Then enter the Roaming folder, where the Bitcoin folder is contained.

            Change Bitcoin Core Data Directory

            Copy the Bitcoin Data Directory

            Having found the default data directory, we can now copy it. Be sure that Bitcoin Core has been shut down and is no longer running. The software occasionally takes a minute or two to completely exit.

            Begin by renaming the Bitcoin Core data directory. Use the name bitcoin-backup. Don’t move the renamed folder. This allows recovery of the original data directory in case something goes wrong. To recover the original, reinstate the original name of the bitcoin-backup folder (either Bitcoin or .bitcoin).

            If you’d rather not change the default data directory, you may be able to use the alternative approach described below.

            Next copy the renamed bitcoin data directory to a destination of your choice. This can be the same hard drive, an external hard drive, or a removable medium such as USB drive or SD card. Copying data may require only a few minutes or a couple of hours, depending on how up-to-date your copy of the block chain is and the speed of your hardware.

            You can now rename the copied folder. For example, it might be convenient to use the name Bitcoin.

            See Also on BitcoinWiki

            • Running Bitcoin
            • Securing your wallet
            • Splitting the data directory
            • Bitcoin Core

            References

            1. ↑Ultraprune merged in mainline
            • Data Directory
            • Bitcoin Core Data Directory]

            Как подключить папку Bitcoin на другом диске?

            Приветствую!
            Проблема известная — официальный клиент bitcoin устанавливается на любой диск но вот свою папку с блоками (на данный момент ~15 ГБ) ставит на диск С который у меня SSD и соответственно маленький. Искал в сети но нашел только советы типа: «создать .dat или .cmd файл с содержанием start «» «C:\Program Files\Bitcoin\bitcoin-qt.exe» -datadir=F:\Bitcoin но как файл назвать и куда его разместить непонятно мне. Может поясните или подскажите другой способ?

            • Вопрос задан более трёх лет назад
            • 12804 просмотра

            Комментировать
            Решения вопроса 1

            Создайте на рабочем столе ярлык на программу Bitcoin-QT, в свойствах ярлыка пропишите -datadir=F:\Bitcoin. Запускайте кошелек только через этот ярлык.

            Ответ написан более трёх лет назад
            Нравится 2 2 комментария
            Bartholomaeus @Bartholomaeus Автор вопроса

            А где конкретно в свойствах? Во вкладке «Ярлык» несколько полей которые можно редактировать: «Объект», «Рабочая папка», «Быстрый вызов», «Комментарий» — в каком их них? Или в другой вкладке?

            @Bartholomaeus https://www.evernote.com/shard/s12/sh/8593b964-6e2.
            К полю объект допишите
            Ответы на вопрос 2

            iproger

            Безответственный гений

            Не выгодное занятие в основном, поэтому решил вопрос сносом.

            Ответ написан более трёх лет назад
            Bartholomaeus @Bartholomaeus Автор вопроса
            Да я и не собираюсь майнить.
            blackhupia @blackhupia

            Объясняю: у самого была точно такая же проблема, гуглил тоже и нашел много вариантов но сходу ни один не подошел. через полчаса гемора наконец вышло. значит так — винда у меня 7 — я создал bat файл (то есть создал txt файл а потом расширение поменял на bat) произвольного названия (в моем случае — new way.bat) в папке установленной программы (в моем случае — c:\Program Files (x86)\Bitcoin) с текстом: start «» «C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe» -datadir=D:\data\soft\bitcoin
            Первая часть — это путь к исполнительному файлу программы, вторая — путь к папке с блоками и прочей ерундой которую я перенес на диск D (а была она перед этим на диске С в папке Users\tennisplayer\Application data\Roaming). Весь фокус в том, что нужно не провтыкать ни единого символа и не написать ничего лишнего. В моем случае я сначала писал start «» «C:\Program Files\Bitcoin\bitcoin-qt.exe» -datadir=D:\data\soft\bitcoin (без (х86)), потом забыл пробел поставить перед (х86) и так далее. но текст что я тебе написал верный, я его скопировал с актуального батфайла. Теперь кошелек смотрит в другую папку, а на системном диске освободилось 21.5 гига;)

            Ответ написан более трёх лет назад
            Комментировать
            Нравится Комментировать
            Ваш ответ на вопрос

            Войдите, чтобы написать ответ

            bitcoin

            • Bitcoin

            Сколько сейчас занимает синхронизация Bitcoin/Ethereum нод?

            • 2 подписчика
            • 11 янв.
            • 326 просмотров

            whoa there, pardner!

            Your request has been blocked due to a network policy.

            Try logging in or creating an account here to get back to browsing.

            If you’re running a script or application, please register or sign in with your developer credentials here. Additionally make sure your User-Agent is not empty and is something unique and descriptive and try again. if you’re supplying an alternate User-Agent string, try changing back to default as that can sometimes result in a block.

            You can read Reddit’s Terms of Service here.

            if you think that we’ve incorrectly blocked you or you would like to discuss easier ways to get the data you want, please file a ticket here.

            when contacting us, please include your ip address which is: 178.132.110.95 and reddit account

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *