Giter VIP home page Giter VIP logo

qubic-cli's People

Contributors

cyber-pc avatar frog-rabbit avatar georgmittendorfer avatar j0et0m avatar krypdkat avatar philippwerner avatar qsilver97 avatar svgsponer avatar zhaocaipeng avatar

Stargazers

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

Watchers

 avatar

qubic-cli's Issues

getNodeIpList crashes

Hi, not sure what this line is trying to achieve, but it crashes my application when querying a node ip list.

memset(&result, 0, sizeof(CurrentTickInfo));

You can reproduce it with the following command:

qubic-cli.exe -nodeip "62.2.98.74" -getnodeiplist

Possible fix:

Simply removing the above line.

Linux build fails because of missing include <cstddef> in structs.h

Summary

The build fails on Linux because of a missing header file in structs.h (‘offsetof’ is defined in header ‘’)

Error message

Execute build with # cmake --build . in build dir gives:

[  7%] Building CXX object CMakeFiles/qubic-cli.dir/main.cpp.o
In file included from /home/mio/prog/external/qubic-cli/main.cpp:2:
/home/mio/prog/external/qubic-cli/structs.h: In member function ‘unsigned int RespondTxStatus::size() const’:
/home/mio/prog/external/qubic-cli/structs.h:528:40: error: expected primary-expression before ‘,’ token
  528 |         return offsetof(RespondTxStatus, txDigests) + txCount * 32;
      |                                        ^
/home/mio/prog/external/qubic-cli/structs.h:528:16: error: ‘offsetof’ was not declared in this scope
  528 |         return offsetof(RespondTxStatus, txDigests) + txCount * 32;
      |                ^~~~~~~~
/home/mio/prog/external/qubic-cli/structs.h:4:1: note: ‘offsetof’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
    3 | #include "utils.h"
  +++ |+#include <cstddef>
    4 | 

Fix

Adding

#include <cstddef>

in structs.h below other imports solves the issue.

-showkeys

the commands are executing successfully except for -showkeys which did not output any results.
image

C:\Users\max\Desktop\Qubic_cli\qubic-cli\build\Debug>qubic-cli -nodeip 144.2.106.163 -getcurrenttick
Tick: 14676232
Epoch: 115
Number Of Aligned Votes: 0
Number Of Misaligned Votes: 0
Initial tick: 14600000

C:\Users\max\Desktop\Qubic_cli\qubic-cli\build\Debug>qubic-cli -seed woosnyntviegnodobfanoettfcsxrbacadgnutrzxvlcbmpinhvuage -showkeys

C:\Users\max\Desktop\Qubic_cli\qubic-cli\build\Debug>qubic-cli -help
./qubic-cli [basic config] [Command] [command extra parameters]
-help print this message
Basic config:
-conf
Specify configuration file. Relative paths will be prefixed by datadir location. See qubic.conf.example.
Notice: variables in qubic.conf will be overrided by values on parameters.
-seed
55-char seed private key
-nodeip <IPv4_ADDRESS>
IP address of the target node for querying blockchain information (default: 127.0.0.1)
-nodeport
Port of the target node for querying blockchain information (default: 21841)
-scheduletick <TICK_OFFSET>
Offset number of scheduled tick that will perform a transaction (default: 20)
Command:
[WALLET COMMAND]
-showkeys
Generating identity, pubkey key from private key. Private key must be passed either from params or configuration file.
-getbalance
Balance of an identity (amount of qubic, number of in/out txs)
-getasset
Print a list of assets of an identity
-sendtoaddress <TARGET_IDENTITY>
Perform a standard transaction to sendData qubic to <TARGET_IDENTITY>. A valid private key and node ip/port are required.
-sendtoaddressintick <TARGET_IDENTITY>
Perform a standard transaction to sendData qubic to <TARGET_IDENTITY> in a specific . A valid private key and node ip/port are required.
-qutilsendtomanyv1
Performs multiple transaction within in one tick. must contain one ID and amount (space seperated) per line. Max 25 transaction. Fees apply! valid private key and node ip/port are required.
-qutilburnqubic
Performs burning qubic, valid private key and node ip/port are required.

[BLOCKCHAIN/PROTOCOL COMMAND]
-gettickdata <TICK_NUMBER> <OUTPUT_FILE_NAME>
Get tick data and write it to a file. Use -readtickdata to examine the file. valid node ip/port are required.
-getquorumtick <COMP_LIST_FILE> <TICK_NUMBER>
Get quorum tick data, the summary of quorum tick will be printed, <COMP_LIST_FILE> is fetched by command -getcomputorlist. valid node ip/port are required.
-getcomputorlist <OUTPUT_FILE_NAME>
Get of the current epoch. Feed this data to -readtickdata to verify tick data. valid node ip/port are required.
-getnodeiplist
Print a list of node ip from a seed node ip. Valid node ip/port are required.
-checktxontick <TICK_NUMBER> <TX_ID>
Check if a transaction is included in a tick. valid node ip/port are required.
-checktxonfile <TX_ID> <TICK_DATA_FILE>
Check if a transaction is included in a tick (tick data from a file). valid node ip/port are required.
-readtickdata <FILE_NAME> <COMPUTOR_LIST>
Read tick data from a file, print the output on screen, COMPUTOR_LIST is required if you need to verify block data
-sendcustomtransaction <TARGET_IDENTITY> <TX_TYPE> <EXTRA_BYTE_SIZE> <EXTRA_BYTE_IN_HEX>
Perform a custom transaction (IPO, querying smart contract), valid private key and node ip/port are required.
-dumpspectrumfile <SPECTRUM_BINARY_FILE> <OUTPUT_CSV_FILE>
Dump spectrum file into csv.
-dumpuniversefile <UNIVERSE_BINARY_FILE> <OUTPUT_CSV_FILE>
Dump spectrum file into csv.
-makeipobid <CONTRACT_INDEX> <NUMBER_OF_SHARE> <PRICE_PER_SHARE>
Participating IPO (dutch auction). valid private key and node ip/port, CONTRACT_INDEX are required.
-getipostatus <CONTRACT_INDEX>
View IPO status. valid node ip/port, CONTRACT_INDEX are required.
-getsysteminfo
View Current System Status. Includes initial tick, random mining seed, epoch info.
-publishproposal
(on development)

[NODE COMMAND]
-getcurrenttick
Show current tick information of a node
-sendspecialcommand <COMMAND_IN_NUMBER>
Perform a special command to node, valid private key and node ip/port are required.
-tooglemainaux <MODE_0> <Mode_1>
Remotely toogle Main/Aux mode on node,valid private key and node ip/port are required.
<MODE_0> and <MODE_1> value are: MAIN or AUX
-setsolutionthreshold <SOLUTION_THRESHOLD>
Remotely set solution threshold for future epoch,valid private key and node ip/port are required.

    -refreshpeerlist
            (equivalent to F4) Remotely refresh the peer list of node, all current connections will be closed after this command is sent, valid private key and node ip/port are required.
    -forcenexttick
            (equivalent to F5) Remotely force next tick on node to be empty, valid private key and node ip/port are required.
    -reissuevote
            (equivalent to F9) Remotely re-issue (re-send) vote on node, valid private key and node ip/port are required.
    -sendrawpacket <DATA_IN_HEX> <SIZE>
            Send a raw packet to nodeip. Valid node ip/port are required.
    -getlogfromnode <PASSCODE_0> <PASSCODE_1> <PASSCODE_2> <PASSCODE_3>
            Fetch a single log line from the node. Valid node ip/port, passcodes are required.
    -synctime
            Sync node time with local time, valid private key and node ip/port are required. Make sure that your local time is synced (with NTP)!

[QX COMMAND]
-qxgetfee
Show current Qx fee.
-qxissueasset <ASSET_NAME> <NUMBER_OF_UNIT> <UNIT_OF_MEASUREMENT> <NUM_DECIMAL>
Create an asset via Qx contract.
-qxtransferasset <ASSET_NAME> <ISSUER_IN_HEX> <NEW_OWNER_IDENTITY> <AMOUNT_OF_SHARE>
Transfer an asset via Qx contract.
-qxorder add/remove bid/ask [ISSUER (in qubic format)] [ASSET_NAME] [PRICE] [NUMBER_OF_SHARE]
Set order on Qx.
-qxgetorder entity/asset bid/ask [ISSUER/ENTITY (in qubic format)] [ASSET_NAME (NULL for requesting entity)] [OFFSET]
Get orders on Qx

[QTRY COMMAND]
-qtrygetbasicinfo
Show qtry basic info from a node.
-qtryissuebet
Issue a bet (prompt mode)
-qtrygetactivebet
Show all active bet id.
-qtrygetactivebetbycreator <BET_CREATOR_ID>
Show all active bet id of an ID.
-qtrygetbetinfo <BET_ID>
Get meta information of a bet
-qtrygetbetdetail <BET_ID> <OPTION_ID>
Get a list of IDs that bet on <OPTION_ID> of the bet <BET_ID>
-qtryjoinbet <BET_ID> <NUMBER_OF_BET_SLOT> <AMOUNT_PER_SLOT> <PICKED_OPTION>
Join a bet
-qtrypublishresult <BET_ID> <WIN_OPTION>
(Oracle providers only) publish a result for a bet
-qtrycancelbet <BET_ID>
(Game operator only) cancel a bet

C:\Users\max\Desktop\Qubic_cli\qubic-cli\build\Debug>qubic-cli.exe -nodeip 144.2.106.163 -seed woosnyntviegnodobfanoettfcsxrbacadgnutrzxvlcbmpinhvuage -getbalance
identity is null

C:\Users\max\Desktop\Qubic_cli\qubic-cli\build\Debug>/qubic-cli -readtickdata 10600000.bin
"/qubic-cli" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

C:\Users\max\Desktop\Qubic_cli\qubic-cli\build\Debug>qubic-cli -readtickdata 10600000.bin
File 10600000.bin does not exist

C:\Users\max\Desktop\Qubic_cli\qubic-cli\build\Debug>

segmentation fault on getcomputorlist

qubic-cli -nodeip <ip-of-public-computor> -getcomputorlist

returns the list of computors but ends with segmentation fault (compiled from source today - commit hash 3ca58d517c68fca591fc316225cef5ad40ccc395). debian linux.

[...]
Epoch: 83
Computor list is VERIFIED (signed by ARBITRATOR)
Segmentation fault

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.