askmish / sawtooth-simplewallet Goto Github PK
View Code? Open in Web Editor NEWA simple sawtooth "simplewallet" transaction family (processor + client)
License: Apache License 2.0
A simple sawtooth "simplewallet" transaction family (processor + client)
License: Apache License 2.0
When clicking the login button after giving the username, in the js client UI, it doesn't go to the home page.
Refreshes and stays on the same page.
(Browser - firefox 63.0.3)
When we transfer money to an account that doesn't have balance the processor goes into a loop. I've tried to change the error handling to
return &processor.InvalidTransactionError{Msg: "Didn't find the wallet key associated with user key " + self.getUserTo()}
But still i get a loop, any ideas?
I am using native installation and trying to perform deposit but the balance is showing as undefined.
The changes are needed to the docker-compose .yaml files to use the 1.1
containers (instead of 1.0
) and to add a devmode-engine-rust
container.
The diffs should be very similar to the changes I made to cookiejar. Here's the diffs:
danintel/sawtooth-cookiejar@9f0b69c
The sawtooth-validator
command line needs this new argument: --bind consensus:tcp://eth0:5050
The repository needs updating from 1.0 to "bumper" (1.1) and adding [arch=amd64]
Something like:
"deb [arch=amd64] http://repo.sawtooth.me/ubuntu/bumper/stable xenial universe"
The dev-mode engine addition to the .yaml files should be something like:
+ devmode-engine:
+ image: hyperledger/sawtooth-devmode-engine-rust:1.1
+ ports:
+ - '5050:5050'
+ container_name: sawtooth-devmode-engine-rust-default
+ depends_on:
+ - validator
+ entrypoint: devmode-engine-rust --connect tcp://validator:5050
Some basic instructions for running jsclient would be helpful.
I didn't find anything in README.md or the jsclient files.
Even better would be a container with jsclient and any processor (Python or C++).
simplewallet-processor container exists without any error
here's the log of docker container:
-- The CXX compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /project/simplewallet/cxxprocessor/build
Scanning dependencies of target simplewallet-tp
[ 50%] Building CXX object CMakeFiles/simplewallet-tp.dir/simplewallet-tp.cpp.o
[100%] Linking CXX executable bin/simplewallet-tp
[100%] Built target simplewallet-tp
-- Configuring done
-- Generating done
-- Build files have been written to: /project/simplewallet/cxxprocessor/build
[100%] Built target simplewallet-tp
Things I have done :
Installed latest Node(8.11.3)& npm version.
Started JavaScript essential thing using docker-compose up (used javascript .yaml file).
Things giving error:
Want to setup Javascript transaction processor so moved to dir jsprocessor.
Trying to install all node modules using $ npm install
, but giving error shown in image. I think it is relate to node js.
Reinstalled Node & NPM, Externally installed npm module that producing error but no effect.
I tried the following command "simplewallet transfer 0 <user 1> <user 2>" and there was something like an infinite loop. This was the error that was displayed.
simplewallet-processor | SimpleWalletApplicator::Apply
simplewallet-processor | Got: transfer and 0
simplewallet-processor | Got beneficiary: 023e1bde5961655a5c3a51daab5e5820556fadd722932d7dd3eee38ecbc0ab2f94
simplewallet-processor | 124360 [0x7faca6499780] DEBUG simplewallet null - SimpleWalletApplicator::doTransfer Key: 020ec936c18ed8d96272e8c62f5269db1122656ca0e9a894d37c8005a5a7c632f5 Address: 7e26646cb200282575bc2638258e663febd8ffcf543f0690bd2dc8da494d4bd2e6bac3
simplewallet-processor | 124361 [0x7faca6499780] DEBUG simplewallet null - SimpleWalletApplicator::doTransfer Beneficiary Key: 023e1bde5961655a5c3a51daab5e5820556fadd722932d7dd3eee38ecbc0ab2f94 Address: 7e2664e728c0be707e30c78292c546be8be02442d70e6e0597c5e2b0ec77505b221589
simplewallet-processor | 124363 [0x7faca1de9700] DEBUG sawtooth.MessageDispatcher null - ReceiveMessage MessageType: 8
simplewallet-processor | 124364 [0x7faca6499780] ERROR sawtooth.TransactionProcessor null - applicator->Apply unknown error
simplewallet-processor | 124365 [0x7faca1de9700] DEBUG sawtooth.MessageDispatcher null - ReceiveMessage MessageType: 5
This is the error i am facing i have done native installation. I am hitting the Javascript application
The validator has no genesis block, and so cannot be queried. Wait for genesis to be completed and resubmit. If you are running the validator, ensure it was set up properly.
Some days ago the code was functioning well, but recently I get this error on compiling the simplewallet-build-tp.py file:
curl: (6) Could not resolve host: p80.pool.sks-keyservers.net
gpg: no valid OpenPGP data found.
The command '/bin/sh -c apt-get update && apt-get install -y -q curl gnupg && curl -sSL 'http://p80.pool.sks-keyservers.net/pks/lookup?op=get&search=0x8AA7AF1F1091A5FD' | apt-key add - && echo 'deb [arch=amd64] http://repo.sawtooth.me/ubuntu/chime/stable bionic universe' >> /etc/apt/sources.list && apt-get update' returned a non-zero code: 2
ERROR: Service 'simplewallet-client' failed to build : Build failed
This is my step:
sawtooth keygen a
sawtooth keygen b
simplewallet deposit 100 a
simplewallet transfer 25 a b
(just not deposit any value to b)
And then,the docker logs will scroll a lot of info cyclically,the info like this:
simplewallet-processor | Got: transfer and 25
simplewallet-processor | Got beneficiary: 03605ad5fbb2c9106e71dddb5e1492aaffbf29358cd41b8c02bd061869c873a940
simplewallet-processor | 479056 [0x7fee26c74780] DEBUG simplewallet null - SimpleWalletApplicator::doTransfer Key: 022116461963790d88e315c0fc81e3f8f2ae74aac5eff42fb888edb69405d34df4 Address: 7e266467df98ca12dc7b4d797a3c13e07718e2066b353a50f73072c4c2f7d3a4fdaaa1
simplewallet-processor | 479056 [0x7fee26c74780] DEBUG simplewallet null - SimpleWalletApplicator::doTransfer Beneficiary Key: 03605ad5fbb2c9106e71dddb5e1492aaffbf29358cd41b8c02bd061869c873a940 Address: 7e26649edfba4e018ac9c59a0462e8d8565ec4b1db295597da83b7d9819705d090bbe8
simplewallet-processor | 479057 [0x7fee225c4700] DEBUG sawtooth.MessageDispatcher null - ReceiveMessage MessageType: 8
simplewallet-processor | 479058 [0x7fee225c4700] DEBUG sawtooth.MessageDispatcher null - ReceiveMessage MessageType: 8
simplewallet-processor | 479058 [0x7fee26c74780] ERROR sawtooth.TransactionProcessor null - applicator->Apply unknown error
And if i exec the command simplewallet balance b
it will display 404 Not Found.
Like this:
simplewallet balance y
[12:01:14 INFO connectionpool] Starting new HTTP connection (1): rest-api
[12:01:14 DEBUG connectionpool] "GET /state/7e26649edfba4e018ac9c59a0462e8d8565ec4b1db295597da83b7d9819705d090bbe8 HTTP/1.1" 404 134
Error: Error 404: Not Found
I think its solution is:
If i try transfer it will check first if this user had balance(it just can be 0).
Another i think it can initialize user 's balance to 0 if i 'keygen'
Thank you~
Dear! I have installed your repository and also watched your video. I need simulate currency transactions using the PBFT algorithm and the Javascript SDK. This is for an academic thesis, but I am finding serious problems since I am not used with docker and containers. Would be possible any help related to your repo?
Hey,
I've set up 3 clients for an instance, client A, client B, client C. If the client A did some transaction deposited 10000 and transfer 1000 to client C which doesn't have any transactions, the balance for client C shown as undefined.
If client B have made a few transactions and the balance for client B is 1000 then if client A transfer it is credited to client B account.
Hi,
When I give the following command:
docker-compose -f docker-compose.yaml up
I get this error:
validator is up-to-date
sawtooth-simplewallet_settings-tp_1 is up-to-date
simplewallet-processor is up-to-date
rest-api is up-to-date
Recreating simplewallet-client ... error
ERROR: for simplewallet-client Cannot start service simplewallet-client: failed to create endpoint simplewallet-client on network sawtooth-simplewallet_default: Windows does not support host IP addresses in NAT settings
ERROR: for simplewallet-client Cannot start service simplewallet-client: failed to create endpoint simplewallet-client on network sawtooth-simplewallet_default: Windows does not support host IP addresses in NAT settings
ERROR: Encountered errors while bringing up the project.
Please help. What should I do?
Nice work guys, but is there any way i can list the transactions for a wallet? thanks
root@d533a2567fd4:/project/simplewallet/pyclient# simplewallet balance jack #Displays the balance left in Jack's account
[19:48:16 INFO connectionpool] Starting new HTTP connection (1): rest-api
[19:48:16 DEBUG connectionpool] "GET /state/7e266409c158f073860c0938ce27c3eea1354b73d3313da10e46c6a828eac674bef285 HTTP/1.1" 404 134
Traceback (most recent call last):
File "/project/simplewallet/pyclient/wallet/simplewallet_client.py", line 148, in _send_to_restapi
result.status_code, result.reason))
Exception: Error 404: Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/project/simplewallet/pyclient/wallet/simplewallet_cli.py", line 257, in main_wrapper
main()
File "/project/simplewallet/pyclient/wallet/simplewallet_cli.py", line 243, in main
do_balance(args)
File "/project/simplewallet/pyclient/wallet/simplewallet_cli.py", line 208, in do_balance
data = client.balance()
File "/project/simplewallet/pyclient/wallet/simplewallet_client.py", line 117, in balance
"state/{}".format(self._address))
File "/project/simplewallet/pyclient/wallet/simplewallet_client.py", line 155, in _send_to_restapi
raise Exception(err)
Exception: Error 404: Not Found
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.