Skip to content

nvrrdt/onzecurrency

Repository files navigation

onzecurrency

Onzecurrency is a decentralized blockchain with a new and unprecedented consensus algorithm called poco or proof of chosen ones.
If you like to know the technicalities of poco please read this paper.
Compared to proof of work poco is energy friendly, compared to proof of stake poco has a fairer reward system and zk proofs are possible. Generally taken regulation is possible if a government (or if governments work together) controls a unique user id, by way of face recognition or fingerprint scanning (or both). Still there remains a possibility to set up a regulation resistant blockchain where the unique user id is generated by the user's face recognizer or fingerprint scanner. Both possibilities are leading to the main disadvantage of this blockchain
Poco is a type of blockchain that is susceptible to 51% Sybil attacks, compared to the 51% compute attack of proof of work. A 51% Sybil attack type can't handle more than 50% of its users being presented by 1 physical user, so e.g. a problem with the face recognition or fingerprint scanner has a huge impact.

onze-terminal, libcommon, liblogin, libpoco, libcrowd and libcoin

build and test procedure

  • docker and docker-compose needs to be installed
  • sudo docker-compose run -p 1975:1975/tcp -p 1975:1975/udp onzecurrency bash
  • python3 ./scripts/build.py -rcl # to install cryptopp and the plog headers
  • python3 ./scripts/build.py -p # to build and package the current state of onzecurrency
  • rm -rf ./config && onze-terminal # for running onze-terminal once, see the test procedure below for a group of servers
  • python3 ./scripts/build.py -t # there aren't many tests ...

test procedure with 6 servers

  • foresee 6 servers (in the cloud)

  • (you can recall the last docker container with: docker start -a -i docker ps -q -l)

  • (there's a switch for choosing between automatic and manual testing in globals.hpp)

automatically
  • scripts/system_tester.py -s -t test_number

    • '-s' option: upload and install of the deb file and the remote_script_test.py to the servers before starting the tests
    • '-t 1' option: selecting the first test, testing 'coin' after 'crowd'
  • scripts/logs_analyzer.py -c # get amount of blocks made by every server

  • scripts/logs_analyzer.py -a # assemble (merge and sort and reverse) one log file of all the log files

  • scripts/logs_analyzer.py -s searchterm # search in all the log files

view the log files in the log folder (in /onzecurrency/...) with your preferred tool

manually
  • in a first terminal: cd to onzecurrency folder; python3 ./scripts/build.py -s
    = scp packaged deb file to servers, ip addresses should be adapted in ./scripts/build.py

  • in a second terminal: cd to onzecurrency folder

  • ./scripts/tmux.sh

  • ssh into the 6 servers

  • dpkg -i ./onzecurrency-0.1.1-Linux.deb # do in each terminal

  • apt-get -f install # do in each terminal

  • rm -rf /onzecurrency/.config && onze-terminal # do in each terminal

    Continuation: fill in an email address in the first server (a first/genesis is created then, do an 'ls /onzecurrency/.config/onzehub/blockchain/crowd after the test procedure), then fill in an email address in the second server. Wait 20 seconds (the block creation period) and let then run until '--------5:' appears. Then fill in an email address in the third server, wait 20 seconds, let it run, then fill the email address in the fourth server and let it run. At the fourth server the second server will get its full_hash (== user_id) and a second block will be created (do an ls!). '--------5:' denotes the end of the minig and sifting process. If you then fill in an email address for the fifth server, then the third server will receive its full_hash and a third block will be created.
    This process of adding more servers should be able to continue limitlessly. Adding two or more servers within the block creation period results in adding two new users as an entry in the concerning block.

doing a new test procedure on the server

  • dpkg -i ./onzecurrency-0.1.1-Linux.deb && apt-get -f install && rm -rf /onzecurrency/.config && onze-terminal

only testing the program

  • rm -rf /onzecurrency/.config && onze-terminal

or

  • onze-terminal

some commands for easy retrieval:

docker

  • sudo docker-compose up
  • sudo docker-compose up --build
  • sudo docker image ls
  • sudo docker run -it libcrowd_libcrowd /bin/bash # doesn't see files, see next
  • sudo docker-compose run -p 1975:1975/tcp -p 1975:1975/udp onzecurrency bash # to see files in docker-compose volume

git

  • git rm --cached -r . # prepare a reset
  • git reset --hard HEAD~13 # reset last 13 commmits || git reset –hard
  • git push origin master --force # post reset

blocked port

  • sudo docker-compose down
  • sudo lsof -i -P -n | grep 1975
  • sudo kill -9 <process_id>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published