Giter VIP home page Giter VIP logo

qwerty-lmdb's People

Contributors

who-biz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

exploshot aivve

qwerty-lmdb's Issues

lmdb hunter

hi @who-biz ,
hunter supports lmdb since 0.19.148
so you can theoretically add it like this:

hunter_add_package(lmdb)
find_package(liblmdb CONFIG REQUIRED)

Summary of Progress & Discussion

Current Progress

In its current state, as of commit 870c1af, this repository builds and will begin syncing if the daemon is launched with: ./src/qwertycoind --db-type=lmdb --log-level=4. Sync progesses until block 391 is encountered. Something causes an error there, and sync can't progress. Still diagnosing where this is coming from.

I also run into the following error, just prior: Block 2e12949a30e9c7991031a4d506f7bd883c56876c0a2b2bee97c80c6a272c6efa already exists in database.

See this commit for the full error message: c5ab41f

Implementation, So Far

Structure

  • Lmdb's functional components are located in lib/BlockchainDB/Lmdb/db_lmdb.cpp. BlockchainLMDB is implemented as a base class to BlockchainDB.
  • In the future, another database structure is preferred, like BerkeleyDB, it can be implemented as a base class of BlockchainDB. similar to LMDB.
  • The work was a near-full rewrite of Monero's implementation. Structurally, much is the same.
  • Once complete, the user will have the option of storing in the ~/.Qwertycoin/blockchain.bin format, or in the database ~/.Qwertycoin/lmdb/data.mdb. When one is selected, the other one is not constructed or used.
  • Most exisiting functions have been edited with condition-enclosed values, which look to the function Tools::getDefaultDbType() in Common/Util.cpp. This function will be modified to check the command line for user input to the --db-type startup flag. However, connection to the startup flag is not yet complete. If you wish to run the daemon using the old format, remove = "lmdb"; from this line: https://github.com/who-biz/qwerty-lmdb/blob/lmdb/lib/Common/Util.cpp#L352
  • The calls to DB have been patched into the UpgradeDetector class, for compatibility with the old format. This means the hardfork class is not used, aside from being initialized. As a result, it will likely be removed.
  • There are a few excess functions that are not used in Blockchain.cpp and Core.cpp. These will be cut out too, if no specific use can be made of them.
  • Exceptions are thrown from the database on fatal errors only. Within those files, there are many conditionals with throw1 lines commented out. Those should be warnings. I didn't have the time to learn too much about the existing logging, so if those are desired - those lines are the locations to add them.
  • Currently, the daemon uses a blockchaincache file as well as data.mdb and mdb.lock. These files are all created and saved in the lmdb subdir of the data directory.
  • DB drivers and boost modifications are located in the external directory.
  • Other boost modifications for binary archives are located in BlockchainDB/binary_archive.h
  • All of the new serialization templates are located in BlockchainDB/BlobDataType.h and are enclosed in the serial and detail namespaces.
  • Monero-style blobs are patched into the existing blob calls in CryptoNoteCore/CryptoNoteFormatUtils.cpp

LMDB map resizing

Map resizing needs implemented. Error is encountered at block height 57375 with the following message:

ERROR   Error adding txpool tx blob to db transaction: MDB_MAP_FULL: Environment mapsize limit reached

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.