Git Product home page Git Product logo

generic-xmr-scanner's Introduction

Generic Monero Scanner

The project aims to develop generic online scanner/searcher for Monero. Its possible capability includes searching for:

  • outputs associated with given address and viewkey (already implemented with full support for subaddresses),
  • possible spendings based on only address and viewkey,
  • transactions which use our outputs as decoys/ring members,
  • transactions associated with given legacy payment ids,
  • multi-output transactions to subaddresses,
  • transactions with integrated payment ids,
  • and more ...

Screenshot

Generic Monero Scanner

Motivation

The idea is based on two projects:

The first project allowed for online identification of outputs associated with given address and viewkey. The second project additionally searched for transactions which use the outputs as decoys/ring members. However, the first project got discontinued, while the second is a command-line program which limits its widespread use.

The generic Monero scanner is solution to these issues.

Technologies

The key technologies used in the scanner are:

  • C++17 - recent version of the C++ programming language.
  • websockets - protocol for duplex communication between frontend and backend (support provided by drogon)
  • FiberPool - single-file header-only C++17 boost::fiber thread pool library
  • xmregcore - core utilities used in moneroexample projects.

Example compilation on Ubuntu 20.04

Monero download and compilation

To compile the project, most recent Monero development version (i.e., its master branch) needs to be compiled first.

Instruction for compiling monero are here: https://github.com/moneroexamples/monero-compilation

Using USE_SINGLE_BUILDDIR flag is important. Without the flag, cmake of the project will not be able to locate the compiled monero.

Project download and compilation

# go to home folder
cd ~

# drogon dependencies
sudo apt install libjsoncpp-dev uuid-dev

git clone --recurse-submodules https://github.com/moneroexamples/generic-xmr-scanner

cd generic-xmr-scanner

mkdir build && cd build

cmake ..

# altearnatively can use cmake -DMONERO_DIR=/path/to/monero_folder ..
# if monero is not in ~/monero

make

Following the compilation, xmrscanner executable should be available in the build folder.

Html fronted

The project comes with basic html fronted located in html folder. Basic instruction for running xmrscanner over http or https (SSL) protocoles are given here:

Using Docker

Instead of building and compiling everything from scrach your own, you can use Docker. You still need to have full blockchain on your host, which you share with the docker. Do docker containers do not run monero themselfs. So basically you still need to have full node before you can run the xmrscanner.

git clone --recurse-submodules https://github.com/moneroexamples/generic-xmr-scanner

cd generic-xmr-scanner

# build backend image (using 2 cpus)
docker build --build-arg NPROC=2  . -t xmrscannerbackend

# build frontend image
docker build ./html -t xmrscannerfrontend

When the two images are build, you can run containers for backend and frontend:

# run backend container on mainnet (-n 0),
docker run -it -v <path-to-monero-blockckain-on-the-host>:/home/monero/.bitmonero -p 8848:8848  xmrscannerbackend "./xmrscanner -n 0"

# run frontend container
docker run -it -p 9100:80  xmrscannerfrontend

Once the containers are running, open browser: http://0.0.0.0:9100/.

Program options

xmrscanner: generic monero scanner:
  -h [ --help ]                         Help
  -n [ --nettype ] arg (=2)             network type: 0-MAINNET, 1-TESTNET, 
                                        2-STAGENET
  -b [ --blockchain-path ] arg          Non-default path to lmdb folder 
                                        containing the blockchain. Default is 
                                        /home/mwo2/.bitmonero/stagenet/lmdb
  -d [ --da-path ] arg (=./config/default_addresses.json)
                                        Non-default path to default_addresses.j
                                        son file
  -c [ --config-path ] arg (=./config/config.json)
                                        Non-default path to config.json file
  -f [ --fiberthreads ] arg (=0)        Number of fiberpool thread workers. 
                                        Default is 0 - based on hardware
  -p [ --port ] arg (=8848)             Service port

How can you help

Constructive criticism, code and website edits are always good. They can be made through github.

generic-xmr-scanner's People

Contributors

an-tao avatar moneroexamples avatar plowsof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

generic-xmr-scanner's Issues

update drogon

After update drogon to the latest version, you could remove the FindDrogon.cmake, FindJsoncpp.cmake from your project, and add drogon by some stuff like follows:

add_subdirectory(drogon)
set(Drogon_DIR ${PROJECT_BINARY_DIR}/drogon)
FIND_PACKAGE(Drogon CONFIG REQUIRED NO_DEFAULT_PATH)
include_directories(${DROGON_INCLUDE_DIRS})
link_libraries(${DROGON_LIBRARIES})

Drogon creates the DrogonConfig.cmake file for this.

compile issue

i have followed the monero build instructions (branch master, with USE_SINGLE_BUILDDIR=1) but i am encountering these compile errors whilst building generic-xmr-scanner:

/home/human/dev/generic-xmr-scanner/ext/xmregcore/src/MicroCore.cpp: In constructor ‘xmreg::MicroCore::MicroCore()’:
/home/human/dev/generic-xmr-scanner/ext/xmregcore/src/MicroCore.cpp:24:9: error: ‘cryptonote::tx_memory_pool::tx_memory_pool(cryptonote::Blockchain&)’ is private within this context
   24 |         m_mempool(core_storage),
      |         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/human/dev/generic-xmr-scanner/ext/xmregcore/src/monero_headers.h:25,
                 from /home/human/dev/generic-xmr-scanner/ext/xmregcore/src/MicroCore.h:8,
                 from /home/human/dev/generic-xmr-scanner/ext/xmregcore/src/MicroCore.cpp:5:
/home/human/monero/src/cryptonote_core/tx_pool.h:488:5: note: declared private here
  488 |     tx_memory_pool(Blockchain& bchs);
      |     ^~~~~~~~~~~~~~
/home/human/dev/generic-xmr-scanner/ext/xmregcore/src/MicroCore.cpp:25:9: error: ‘cryptonote::Blockchain::Blockchain(cryptonote::tx_memory_pool&)’ is private within this context
   25 |         core_storage(m_mempool),
      |         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/human/dev/generic-xmr-scanner/ext/xmregcore/src/monero_headers.h:26,
                 from /home/human/dev/generic-xmr-scanner/ext/xmregcore/src/MicroCore.h:8,
                 from /home/human/dev/generic-xmr-scanner/ext/xmregcore/src/MicroCore.cpp:5:
/home/human/monero/src/cryptonote_core/blockchain.h:1236:5: note: declared private here
 1236 |     Blockchain(tx_memory_pool& tx_pool);
      |     ^~~~~~~~~~

any ideas? 8-(

Assertion `this->is_initialized()

ional<T>::get() const [with T = epee::mlocked<tools::scrubbed<crypto::ec_scalar> >; boost::optional<T>::refere
nce_const_type = const epee::mlocked<tools::scrubbed<crypto::ec_scalar> >&]: Assertion `this->is_initialized()
' failed.  

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.