iotaledger / cli-app Goto Github PK
View Code? Open in Web Editor NEWCLI App that acts as a wallet
CLI App that acts as a wallet
Hello,
would it be possible for you to add some local pow processing so that we can connect to any type of nodes (doing pow, or not) and always be successful with any transfer request ?
tks
rgds
It appears the issue is still present or happened again in iota.lib.js ~0.4.6 that is currently installed.
iota (http://localhost:14265 ✓) 100ι : address
One minute while we generate the address.
The address is XXXXXXXXXXXXXXXXXXXX
Now we will register that address into the iota tangle. One moment.
Error: Request Error: Invalid transaction hash
nodeinfo
nodeinfo
appName: IRI
appVersion: 1.4.2.4
jreAvailableProcessors: 2
jreFreeMemory: 498873440
jreVersion: 1.8.0_162
jreMaxMemory: 5176295424
jreTotalMemory: 1635254272
latestMilestone: EEEEIFMPUBAZSMF9NXWVRPLXYWQLQFDKSXPOCSXDMAOINHPDY9ZPPQTAROCWBBIYGOLD9FVNVPVG99999
latestMilestoneIndex: 438518
latestSolidSubtangleMilestone: EEEEIFMPUBAZSMF9NXWVRPLXYWQLQFDKSXPOCSXDMAOINHPDY9ZPPQTAROCWBBIYGOLD9FVNVPVG99999
latestSolidSubtangleMilestoneIndex: 438518
neighbors: 7
packetsQueueSize: 0
time: 1525442069156
tips: 5061
transactionsToRequest: 0
In IRI log I can see this:
May 04 15:46:47 CX31E iri[1519]: 05/04 15:46:47.667 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Reason to stop: TransactionViewModel is a tip
May 04 15:46:47 CX31E iri[1519]: 05/04 15:46:47.668 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Tx traversed to find tip: 6
May 04 15:46:48 CX31E iri[1519]: 05/04 15:46:48.874 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Reason to stop: TransactionViewModel is a tip
May 04 15:46:48 CX31E iri[1519]: 05/04 15:46:48.875 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Tx traversed to find tip: 24
May 04 15:46:48 CX31E iri[1519]: 05/04 15:46:48.885 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Reason to stop: TransactionViewModel is a tip
May 04 15:46:48 CX31E iri[1519]: 05/04 15:46:48.887 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Tx traversed to find tip: 14
May 04 15:46:48 CX31E iri[1519]: 05/04 15:46:48.899 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Reason to stop: TransactionViewModel is a tip
May 04 15:46:48 CX31E iri[1519]: 05/04 15:46:48.901 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Tx traversed to find tip: 13
May 04 15:46:48 CX31E iri[1519]: 05/04 15:46:48.911 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Reason to stop: TransactionViewModel is a tip
May 04 15:46:48 CX31E iri[1519]: 05/04 15:46:48.912 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Tx traversed to find tip: 24
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.098 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Reason to stop: belowMaxDepth
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.098 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Tx traversed to find tip: 1
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.102 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Reason to stop: TransactionViewModel is a tip
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.102 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Tx traversed to find tip: 12
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.118 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Reason to stop: transactionViewModel==extraTip
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.118 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Tx traversed to find tip: 43
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.271 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Reason to stop: TransactionViewModel is a tip
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.271 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Tx traversed to find tip: 12
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.348 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Reason to stop: TransactionViewModel is a tip
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.349 [XNIO-1 task-10] INFO com.iota.iri.service.TipsManager - Tx traversed to find tip: 2
May 04 15:46:49 CX31E iri[1519]: 05/04 15:46:49.384 [XNIO-1 task-13] ERROR com.iota.iri.service.API - API Exception:
May 04 15:46:49 CX31E iri[1519]: java.lang.RuntimeException: Invalid transaction hash
May 04 15:46:49 CX31E iri[1519]: at com.iota.iri.TransactionValidator.runValidation(TransactionValidator.java:99) ~[iri-1.4.2.4.jar:na]
May 04 15:46:49 CX31E iri[1519]: at com.iota.iri.TransactionValidator.validate(TransactionValidator.java:109) ~[iri-1.4.2.4.jar:na]
May 04 15:46:49 CX31E iri[1519]: at com.iota.iri.service.API.attachToTangleStatement(API.java:992) [iri-1.4.2.4.jar:na]
May 04 15:46:49 CX31E iri[1519]: at com.iota.iri.service.API.process(API.java:244) [iri-1.4.2.4.jar:na]
May 04 15:46:49 CX31E iri[1519]: at com.iota.iri.service.API.processRequest(API.java:184) [iri-1.4.2.4.jar:na]
May 04 15:46:49 CX31E iri[1519]: at com.iota.iri.service.API.access$000(API.java:57) [iri-1.4.2.4.jar:na]
May 04 15:46:49 CX31E iri[1519]: at com.iota.iri.service.API$1.handleRequest(API.java:142) [iri-1.4.2.4.jar:na]
May 04 15:46:49 CX31E iri[1519]: at io.undertow.server.Connectors.executeRootHandler(Connectors.java:208) [iri-1.4.2.4.jar:na]
May 04 15:46:49 CX31E iri[1519]: at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:809) [iri-1.4.2.4.jar:na]
May 04 15:46:49 CX31E iri[1519]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_162]
May 04 15:46:49 CX31E iri[1519]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_162]
May 04 15:46:49 CX31E iri[1519]: at java.lang.Thread.run(Thread.java:748) [na:1.8.0_162]
May 04 15:46:51 CX31E iri[1519]: 05/04 15:46:51.471 [pool-3-thread-2] INFO com.iota.iri.network.Node - toProcess = 0 , toBroadcast = 0 , toRequest = 2 , toReply = 0 / totalTransactions = 2426380
Looks like the same issue as #14 that was solved in #17 but still present.
This follows #7
Sorry, wrong repo
Instead of pausing and waiting for a long transaction to complete, put pending transactions into a waiting queue, and remove them on completion.
Show # of pending items on console command line.
Add pending
command to view current pending actions.
On command completion display results to screen.
I try to safe some funds from an used adress... but everytime i try this happens.
Any Ideas?
the transfer is made. This can take a few minutes.60
Error: Invalid Response:
Maybe related to issue #1067 for iotaledger/wallet:
After snapshot I tried to send 18 iotas with wallet 2.5.7 and got message
ERROR: PRIVATE KEY REUSE DETECTED (no pending transactions)
So I tried send same with [email protected]: and got totally different Error:
Error: Request Error: COMMAND attachToTangle is not available on this node
tried this with different nodes, always same
See session log:
iota (http://eugeneoldisoft.iotasupport.com:14265 ✓) 18ι : nodeinfo
appName: IRI
appVersion: 1.4.2.1
jreAvailableProcessors: 8
jreFreeMemory: 10014600848
jreVersion: 1.8.0_152
jreMaxMemory: 12882804736
jreTotalMemory: 12882804736
latestMilestone: CDVIOZTYVXZNCNZUJWYHVMRVQNYWIMLEZNFBTDHUEBOSZIMVUWKXRJKFYFYH9ZDOWEDRXSQOQRFUA9999
latestMilestoneIndex: 338717
latestSolidSubtangleMilestone: CDVIOZTYVXZNCNZUJWYHVMRVQNYWIMLEZNFBTDHUEBOSZIMVUWKXRJKFYFYH9ZDOWEDRXSQOQRFUA9999
latestSolidSubtangleMilestoneIndex: 338717
neighbors: 8
packetsQueueSize: 0
time: 1517255848741
tips: 8955
transactionsToRequest: 9
iota (http://eugeneoldisoft.iotasupport.com:14265 ✓) 18ι : balance
One moment while we collect the data.
Your current balance is 18ι.
iota (http://eugeneoldisoft.iotasupport.com:14265 ✓) 18ι : transfer xxx 18
One moment while the transfer is made. This can take a few minutes.
Error: Request Error: COMMAND attachToTangle is not available on this node
iota (http://eugeneoldisoft.iotasupport.com:14265 ✓) 18ι 👍
changing to another node https://iotanode.us:443 it did work with cli, but NOT with light wallet
So how could the enduser understand this behaviour?
In iota.lib.js, look for opts.auth
.
When pressing ctrl-c repeatedly the prompt "(^C again to quit)" just keeps appearing and the application does not quit.
deleted
Whenever I enter "address" into iota-cli, I get
iota (http://localhost:14265 ✓) 13Mι : address
One minute while we generate the address.
The address is 99WJLKDMXJULBKIJNGVBKKYPSFYLKMQGUFTYWGKBEZIUCYEXIYNDLJSUKS9QOFIM9GRNTNMG9RBANNZBGG99LAWIZH
Now we will register that address into the iota tangle. One moment.
Error: Request Error: Invalid transaction hash
IRI log file shows
08/09 01:59:49.364 [XNIO-1 task-57] ERROR com.iota.iri.service.API - API Exception:
java.lang.RuntimeException: Invalid transaction hash
at com.iota.iri.TransactionValidator.runValidation(TransactionValidator.java:90) ~[iri-1.3.0.jar:na]
at com.iota.iri.TransactionValidator.validate(TransactionValidator.java:96) ~[iri-1.3.0.jar:na]
at com.iota.iri.service.API.attachToTangleStatement(API.java:762) [iri-1.3.0.jar:na]
at com.iota.iri.service.API.process(API.java:219) [iri-1.3.0.jar:na]
at com.iota.iri.service.API.processRequest(API.java:156) [iri-1.3.0.jar:na]
at com.iota.iri.service.API.access$000(API.java:80) [iri-1.3.0.jar:na]
at com.iota.iri.service.API$1.handleRequest(API.java:144) [iri-1.3.0.jar:na]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:208) [iri-1.3.0.jar:na]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:809) [iri-1.3.0.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
Actual behavior:
node
command is only selected for the time the application is runninghttp://localhost:14265
Better behavior:
node
command it should be storedSince at least c9064f1 URLS with hyphens get truncated, it seems.
> node iota-node.phibit.io
# This may take a few seconds for a remote node. Did you turn on remote access?
iota (http://iota:14265 disconnected) >
Possibly introduced in 928b032 ?
Might be helpful to start building out unit test, do you have a nodejs framework of preference?
Allow transactions to get replayed 2 additional times to make a best effort at getting them confirmed. If a transaction is waiting more than 10 minutes, replay.
This will follow #7
iota (http://localhost:14265 ✓): node [2a01:4f8:151:448::b009:4a5c]
Port must be a number. (ex. 1.2.3.4:12465)
os.homedir
node connection info
mwm
depth
Ask for permission to store.
SyncAll will only generate 10 addresses before you have to go into the config and increase the starting number by 10. This makes the process of syncing a wallet that has hundreds of addresses over time very slow and tedious.
The default minWeightMagnitude
when setting a node is 18, should be reduced to 14
iota (http://localhost:14265 \u2713)$ healthcheck
Free memory: \u2713
Node sync: out of sync
Number of neighbors (undefined-undefined): you need between 4 and 9 neighbors. You have ## ${data.neighbors.length}
Inactive neighbor: /213.174.253.29:14265
I'm getting this error when trying to run this:
/usr/local/lib/node_modules/iota-cli-app/lib/config.js:83
get,
^
SyntaxError: Unexpected token ,
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/iota-cli-app/index.js:5:16)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)```
address <index>
iota (http://localhost:14265 ✓): healthcheck
Free memory: ✓
Node sync: ✓
Number of neighbors (4-9): ✓
C:\Users\admin\Documents\GitHub\cli-app\lib\commands\health.js:38
neighborData.neighbors.filter(
^
TypeError: Cannot read property 'filter' of undefined
at iotajs.api.getNeighbors (C:\Users\admin\Documents\GitHub\cli-app\lib\commands\health.js:38:31)
at C:\Users\admin\Documents\GitHub\cli-app\node_modules\iota.lib.js\lib\api\api.js:353:20
at C:\Users\admin\Documents\GitHub\cli-app\node_modules\iota.lib.js\lib\api\api.js:36:20
at makeRequest.prepareResult (C:\Users\admin\Documents\GitHub\cli-app\node_modules\iota.lib.js\lib\utils\makeRequest.js:130:12)
at exports.XMLHttpRequest.request.onreadystatechange (C:\Users\admin\Documents\GitHub\cli-app\node_modules\iota.lib.js\lib\utils\makeRequest.js:61:25)
at exports.XMLHttpRequest.dispatchEvent (C:\Users\admin\Documents\GitHub\cli-app\node_modules\xmlhttprequest\lib\XMLHttpRequest.js:591:25)
at setState (C:\Users\admin\Documents\GitHub\cli-app\node_modules\xmlhttprequest\lib\XMLHttpRequest.js:610:14)
at IncomingMessage. (C:\Users\admin\Documents\GitHub\cli-app\node_modules\xmlhttprequest\lib\XMLHttpRequest.js:447:13)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
iota (http://localhost:14265 disconnected): nodeinfo
Error: Invalid Response: Error: connect ECONNREFUSED 127.0.0.1:14265
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:14)
/usr/local/lib/node_modules/iota-cli-app/lib/commands/nodeinfo.js:13
data.currentNodeInfo = undefined;
^
TypeError: Cannot set property 'currentNodeInfo' of null
at iotajs.api.getNodeInfo (/usr/local/lib/node_modules/iota-cli-app/lib/commands/nodeinfo.js:13:32)
at makeRequest.prepareResult (/usr/local/lib/node_modules/iota-cli-app/node_modules/iota.lib.js/lib/utils/makeRequest.js:189:12)
at exports.XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/iota-cli-app/node_modules/iota.lib.js/lib/utils/makeRequest.js:61:25)
at exports.XMLHttpRequest.dispatchEvent (/usr/local/lib/node_modules/iota-cli-app/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
at setState (/usr/local/lib/node_modules/iota-cli-app/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
at exports.XMLHttpRequest.handleError (/usr/local/lib/node_modules/iota-cli-app/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:532:5)
at ClientRequest.errorHandler (/usr/local/lib/node_modules/iota-cli-app/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:459:14)
at emitOne (events.js:115:13)
at ClientRequest.emit (events.js:210:7)
at Socket.socketErrorListener (_http_client.js:400:9)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at emitErrorNT (internal/streams/destroy.js:62:8)
at _combinedTickCallback (internal/process/next_tick.js:102:11)
at process._tickCallback (internal/process/next_tick.js:161:9)
The claim
command sends your seed and address to https://service.iotatoken.com/upgrade -- that errors out now.
Since using this yesterday a community member has had his seed compromised in less than 24 hours and we're wondering if there might be a link here? If you need more details please let me know.
Hi,
Would be great to be able to specify which address to spend from.
When starting the iota-cli and using the "api" command, I cannot pass the JSON as a parameter, but need to enter it separately:
iota (http://localhost:14265 ✓): api {"command": "getNodeInfo"}
Enter the command JSON:
When trying to pass the "api" command directly as a command-line parameter to iota-cli, it does not execute, instead shows disconnection warning:
iota:/root@[23:28] # iota-cli api {"command":"getNodeInfo"}
Running IOTA CLI v1.0.4
iota (http://localhost:14265 disconnected):
It looks like you are not connected to an iota node. Try "node".
iota (http://localhost:14265 disconnected):
When replaying any transaction the application throws an error:
iota (http://localhost:14265 ✓) 7ι : replay NQQQVYWBBMHOODOXXNXJRSNDNZFSRSD9CXKUISXFSHTVISUOWQNYLIRVFEHXRVNMRKAJJDXONBLA99999
Replaying transaction NQQQVYWBBMHOODOXXNXJRSNDNZFSRSD9CXKUISXFSHTVISUOWQNYLIRVFEHXRVNMRKAJJDXONBLA99999. This may take a few minutes.
Error: Request Error: Invalid trytes input
dependency should be changed to iota.lib.js >= 0.4.6
When issuing certain commands with an out of sync node, either warn or refuse. For instance, balance command should warn. Transfer should refuse.
Change prompt to not show balance if the node isn't synced.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.