Peter Chung
7d101692aa
[internal/utils] add EmbedFile function
...
utils.EmbedFile is a text file embed script for go:generate
to embed text files into generated golang source.
related to #830
6 years ago
Peter Chung
566c3aeb60
[wallet] embed wallet.ini into wallet binary ( #830 )
...
utilize go:generate to convert the default wallet.ini file
into go constant `defaultWalletIni` defined in
`cmd/client/wallet/generated_ini.go` which will be used when
`.hmy/wallet.ini` doesn't exist under the current filesystem.
6 years ago
Leo Chen
305b0166ec
[wallet] fix transfer function using keystore
...
remove old function of reading private keys
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
d575dc1df7
[wallet] use ethereum keystore in wallet
...
ethereum compatible keystore
support passphrase for wallet new/list/import functions
support export keystore using encrypted json format
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
24a7922970
[p2p] use right client group for communication
...
each node will communicate in 3 pubsub topics:
* group, exchange the consensus group messages
* client, exchange the client messages, like transactions
* global, exchange global messages, like cross-shard tx, or communicate
with beacon chain (not enabled for now)
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
147ce51a76
[wallet] send getFreeToken calls to all shards
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
dc113de26d
[wallet] fix fetch balance error
...
it should display the right balance even though some shard may not be
available.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
b7d72a6fd9
[wallet] add cli -p profile to wallet
...
wallet supports configuration file
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
7a70dc82c7
[wallet] update rpcserver for testnet launch
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
971364638c
[wallet] update rpc nodes IP/port for testnet
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Richard Liu
496d4e4fde
update balance output ( #647 )
6 years ago
Leo Chen
2de6693dc3
[wallet] update rpc server IP for testnet
...
we have relaunched testnet v2.0
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Richard Liu
a32d89769f
update balance output
6 years ago
Leo Chen
957fdf0eac
[wallet] support rpc server using environment variable
...
use an external environment variable to specify the rpc servers
of the wallet. this will greatly simplify the testing.
example of the environment variable:
export RpcNodes="127.0.0.1:8989,192.168.129.1:5555"
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
5272d0cba0
Use IntrinsicGas instead of duplicating its logic
6 years ago
Eugene Kim
82c4ffd2f7
Fix gas calculation
...
This was such a Go n00b mistake... *blushes*
6 years ago
chao
1bedd7dc85
change archival node as a validator; it's more secure for archival node to validate before accept the blocks;
...
archival node now will make sure data is flushed and saved
6 years ago
Eugene Kim
c063a6c50a
Pay data gases ( #633 )
6 years ago
Leo Chen
d08bcc150c
[wallet] adjust wallet with new testnet launch
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
da1967dca1
[wallet] clean up on excessive os.Exit call
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
9d629855a0
[cleanup] remove unused wallet library
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
7f04ddb917
[wallet] return to sync mode
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
d1646b2765
[wallet] simply the wallet code by hardcode IP of RPC servers
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
c01bc303a7
[wallet] fix transfer not working
...
The main problem is the wallet is using p2p for async communication and
it exits too fast before p2p finished the tasks.
So, we added a few seconds waiting in the program and it works fine.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
39fcb1a3e6
Teach wallet to include optional Tx input data
6 years ago
Eugene Kim
67eac97cde
Move cmd libraries to internal/
...
This is to stay compliant
https://github.com/golang-standards/project-layout/tree/master/cmd , to
quote which:
“Don't put a lot of code in the application directory. If you think the
code can be imported and used in other projects, then it should live in
the /pkg directory. If the code is not reusable or if you don't want
others to reuse it, put that code in the /internal directory.”
6 years ago
Leo Chen
cecf53ae0e
[wallet] enable logging using the --verbose flag at the end
...
For Example:
wallet balances --verbose
This patch fixes two panic when wallet can't connect to bootnode.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
af696dfbab
[log] disable logging for wallet
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Chao Ma
5496d697da
combine wallet/txgen into light client node;
...
refactoring peer discovery logic;
6 years ago
Chao Ma
84fa99008c
wallet v2 fix
6 years ago
chao
51d42cc86c
fix wallet not working issue
6 years ago
chao
a0a7b3a8c4
remove unnecessary leader map
6 years ago
Leo Chen
f3ffc65401
[cleanup] remove libp2p unicast support
...
fix test cases after remove libp2p unicast
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
a3ef1d8a96
fix command parameter in wallet
...
be consistent with the testnet document
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
3ea7fdc87f
nit: change output format of address/key to make it easier to parse
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Minh Doan
e74788d6ef
fix missing places
6 years ago
Minh Doan
22b47dafc0
change func naming
6 years ago
Minh Doan
3c2ca578b7
introduce lib for wallet
6 years ago
Minh Doan
e8a0828702
fix func names
6 years ago
Minh Doan
71b3080d45
refactor wallet code
6 years ago
Leo Chen
c56c85a7e7
add peer of leader to wallet node
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
8b7766de6f
encode PeerID using IDB58
...
This is to fix error of "Invalid UTF-8 in peerID field".
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
fe06318d04
add PeerID in beacon chain RPC message
...
wallet needs to use PeerID to talk to leaders
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
fb4792bc9f
goimports
6 years ago
Leo Chen
c112ffb414
generate private key outside of host creation
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
2253096b7f
support add peer in cmd/* programs
...
use multiaddress for all programs
add -bc_addr option to specify the multiaddress of beacon chain node
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
6fcb627af8
Use our own stdout log handler
...
This logic used to live in our copy of log, but is not in vendored
Ethereum version.
6 years ago
Leo Chen
c283155c94
add dummy host IP/Port for wallet using libp2p
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Rongjian Lan
f0c69d4f37
Update and add more READMEs
6 years ago
Rongjian Lan
7495fef5a3
Add basic tests for wallet
6 years ago