parity -> openethereum
This commit is contained in:
parent
b27da5d90e
commit
82001409f5
7 changed files with 18 additions and 19 deletions
|
|
@ -131,7 +131,7 @@ class Daemon(MMGenObject):
|
|||
open('{}/{}'.format(self.datadir,self.cfg_file),'w').write(self.cfg_file_hdr)
|
||||
|
||||
if self.use_pidfile and os.path.exists(self.pidfile):
|
||||
# Parity just overwrites the data in an existing pidfile without zeroing it first,
|
||||
# OpenEthereum just overwrites the data in the existing pidfile without zeroing it first,
|
||||
# leading to interesting consequences.
|
||||
os.unlink(self.pidfile)
|
||||
|
||||
|
|
@ -302,8 +302,8 @@ class CoinDaemon(Daemon):
|
|||
'bch': cd('Bcash', 'Bitcoin', 'bitcoind-abc','bitcoin-cli', 'bitcoin.conf', 'testnet3',8442,18442,18553),
|
||||
'ltc': cd('Litecoin', 'Bitcoin', 'litecoind', 'litecoin-cli','litecoin.conf','testnet4',9332,19332,19444),
|
||||
'xmr': cd('Monero', 'Monero', 'monerod', 'monerod', 'bitmonero.conf',None, 18081,None,None),
|
||||
'eth': cd('Ethereum', 'Ethereum','parity', 'parity', 'parity.conf', None, 8545, 8545,8545),
|
||||
'etc': cd('Ethereum Classic','Ethereum','parity', 'parity', 'parity.conf', None, 8545, 8545,8545)
|
||||
'eth': cd('Ethereum', 'Ethereum','openethereum','openethereum','parity.conf', None, 8545, 8545,8545),
|
||||
'etc': cd('Ethereum Classic','Ethereum','openethereum','openethereum','parity.conf', None, 8545, 8545,8545)
|
||||
}
|
||||
|
||||
def __new__(cls,network_id=None,test_suite=False,flags=None,proto=None):
|
||||
|
|
@ -557,7 +557,7 @@ class MoneroDaemon(CoinDaemon):
|
|||
|
||||
class EthereumDaemon(CoinDaemon):
|
||||
|
||||
exec_fn_mswin = 'parity.exe'
|
||||
exec_fn_mswin = 'openethereum.exe'
|
||||
ps_pid_mswin = True
|
||||
|
||||
def subclass_init(self):
|
||||
|
|
@ -575,7 +575,7 @@ class EthereumDaemon(CoinDaemon):
|
|||
return ['--ports-shift={}'.format(self.port_shift),
|
||||
'--base-path={}'.format(self.chaindir),
|
||||
'--config=dev',
|
||||
'--log-file={}'.format(os.path.join(self.datadir,'parity.log')) ]
|
||||
'--log-file={}'.format(os.path.join(self.datadir,'openethereum.log')) ]
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class GlobalContext(Lockable):
|
|||
author = 'The MMGen Project'
|
||||
email = '<mmgen@tuta.io>'
|
||||
Cdates = '2013-2020'
|
||||
keywords = 'Bitcoin, BTC, Ethereum, ETH, Monero, XMR, ERC20, cryptocurrency, wallet, BIP32, cold storage, offline, online, spending, open-source, command-line, Python, Linux, Bitcoin Core, bitcoind, hd, deterministic, hierarchical, secure, anonymous, Electrum, seed, mnemonic, brainwallet, Scrypt, utility, script, scriptable, blockchain, raw, transaction, permissionless, console, terminal, curses, ansi, color, tmux, remote, client, daemon, RPC, json, entropy, xterm, rxvt, PowerShell, MSYS, MSYS2, MinGW, MinGW64, MSWin, Armbian, Raspbian, Raspberry Pi, Orange Pi, BCash, BCH, Litecoin, LTC, altcoin, ZEC, Zcash, DASH, Dashpay, SHA256Compress, monerod, EMC, Emercoin, token, deploy, contract, gas, fee, smart contract, solidity, Parity, testnet, devmode, Kovan'
|
||||
keywords = 'Bitcoin, BTC, Ethereum, ETH, Monero, XMR, ERC20, cryptocurrency, wallet, BIP32, cold storage, offline, online, spending, open-source, command-line, Python, Linux, Bitcoin Core, bitcoind, hd, deterministic, hierarchical, secure, anonymous, Electrum, seed, mnemonic, brainwallet, Scrypt, utility, script, scriptable, blockchain, raw, transaction, permissionless, console, terminal, curses, ansi, color, tmux, remote, client, daemon, RPC, json, entropy, xterm, rxvt, PowerShell, MSYS, MSYS2, MinGW, MinGW64, MSWin, Armbian, Raspbian, Raspberry Pi, Orange Pi, BCash, BCH, Litecoin, LTC, altcoin, ZEC, Zcash, DASH, Dashpay, SHA256Compress, monerod, EMC, Emercoin, token, deploy, contract, gas, fee, smart contract, solidity, Parity, OpenEthereum, testnet, devmode, Kovan'
|
||||
max_int = 0xffffffff
|
||||
|
||||
stdin_tty = sys.stdin.isatty()
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ class CoinProtocol(MMGenObject):
|
|||
base_coin = 'ETH'
|
||||
pubkey_type = 'std' # required by DummyWIF
|
||||
|
||||
daemon_family = 'parity'
|
||||
daemon_family = 'openethereum'
|
||||
coin_amt = ETHAmt
|
||||
max_tx_fee = ETHAmt('0.005')
|
||||
chain_name = 'foundation'
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ async def rpc_init(proto,backend=None):
|
|||
from .daemon import CoinDaemon
|
||||
rpc = await {
|
||||
'bitcoind': BitcoinRPCClient,
|
||||
'parity': EthereumRPCClient,
|
||||
'openethereum': EthereumRPCClient,
|
||||
}[proto.daemon_family](
|
||||
proto = proto,
|
||||
daemon = CoinDaemon(proto=proto,test_suite=g.test_suite),
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ EXAMPLES:
|
|||
Supported external tools:
|
||||
|
||||
+ ethkey (for ETH,ETC)
|
||||
https://github.com/paritytech/parity-ethereum
|
||||
https://github.com/openethereum/openethereum
|
||||
(build with 'cargo build -p ethkey-cli --release')
|
||||
|
||||
+ zcash-mini (for Zcash Z-addresses)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ from .common import *
|
|||
del_addrs = ('4','1')
|
||||
dfl_sid = '98831F3A'
|
||||
|
||||
# The Parity dev address with lots of coins. Create with "ethkey -b info ''":
|
||||
# The OpenEthereum dev address with lots of coins. Create with "ethkey -b info ''":
|
||||
dfl_addr = '00a329c0648769a73afac7f9381e08fb43dbea72'
|
||||
dfl_addr_chk = '00a329c0648769A73afAc7F9381E08FB43dBEA72'
|
||||
dfl_privkey = '4d5db4107d237df6a3d58ee5f70ae63d73d7658d4026f2eefd2f204c81682cb7'
|
||||
|
|
@ -42,8 +42,7 @@ burn_addr = 'deadbeef'*5
|
|||
amt1 = '999999.12345689012345678'
|
||||
amt2 = '888.111122223333444455'
|
||||
|
||||
parity_pid_fn = 'parity.pid'
|
||||
parity_key_fn = 'parity.devkey'
|
||||
openethereum_key_fn = 'openethereum.devkey'
|
||||
|
||||
# Token sends require varying amounts of gas, depending on compiler version
|
||||
def get_solc_ver():
|
||||
|
|
@ -146,12 +145,12 @@ class TestSuiteEthdev(TestSuiteBase,TestSuiteShared):
|
|||
solc_vers = ('0.5.1','0.5.3') # 0.5.1: Raspbian Stretch, 0.5.3: Ubuntu Bionic
|
||||
color = True
|
||||
cmd_group = (
|
||||
('setup', 'Ethereum Parity dev mode tests for coin {} (start parity)'.format(coin)),
|
||||
('setup', 'OpenEthereum dev mode tests for coin {} (start openethereum)'.format(coin)),
|
||||
('wallet_upgrade1', 'upgrading the tracking wallet (v1 -> v2)'),
|
||||
('wallet_upgrade2', 'upgrading the tracking wallet (v2 -> v3)'),
|
||||
('addrgen', 'generating addresses'),
|
||||
('addrimport', 'importing addresses'),
|
||||
('addrimport_dev_addr', "importing Parity dev address 'Ox00a329c..'"),
|
||||
('addrimport_dev_addr', "importing OpenEthereum dev address 'Ox00a329c..'"),
|
||||
|
||||
('txcreate1', 'creating a transaction (spend from dev address to address :1)'),
|
||||
('txview1_raw', 'viewing the raw transaction'),
|
||||
|
|
@ -303,7 +302,7 @@ class TestSuiteEthdev(TestSuiteBase,TestSuiteShared):
|
|||
('token_remove_addr1','removing addr #{} from {} token tracking wallet'.format(del_addrs[0],coin)),
|
||||
('token_remove_addr2','removing addr #{} from {} token tracking wallet'.format(del_addrs[1],coin)),
|
||||
|
||||
('stop', 'stopping parity'),
|
||||
('stop', 'stopping openethereum'),
|
||||
)
|
||||
|
||||
def __init__(self,trunner,cfgs,spawn):
|
||||
|
|
@ -409,7 +408,7 @@ class TestSuiteEthdev(TestSuiteBase,TestSuiteShared):
|
|||
|
||||
def txsign(self,ni=False,ext='{}.regtest.rawtx',add_args=[]):
|
||||
ext = ext.format('-α' if g.debug_utf8 else '')
|
||||
keyfile = joinpath(self.tmpdir,parity_key_fn)
|
||||
keyfile = joinpath(self.tmpdir,openethereum_key_fn)
|
||||
write_to_file(keyfile,dfl_privkey+'\n')
|
||||
txfile = self.get_file_with_ext(ext,no_dot=True)
|
||||
t = self.spawn( 'mmgen-txsign',
|
||||
|
|
@ -511,7 +510,7 @@ class TestSuiteEthdev(TestSuiteBase,TestSuiteShared):
|
|||
def bal5(self): return self.bal(n='5')
|
||||
|
||||
#bal_corr = Decimal('0.0000032') # gas use for token sends varies between ETH and ETC!
|
||||
bal_corr = Decimal('0.0000000') # update: Parity team seems to have corrected this
|
||||
bal_corr = Decimal('0.0000000') # update: OpenEthereum team seems to have corrected this
|
||||
|
||||
def bal(self,n):
|
||||
t = self.spawn('mmgen-tool', self.eth_args + ['twview','wide=1'])
|
||||
|
|
@ -612,7 +611,7 @@ class TestSuiteEthdev(TestSuiteBase,TestSuiteShared):
|
|||
return await tx.get_exec_status(txid,True)
|
||||
|
||||
async def token_deploy(self,num,key,gas,mmgen_cmd='txdo',tx_fee='8G'):
|
||||
keyfile = joinpath(self.tmpdir,parity_key_fn)
|
||||
keyfile = joinpath(self.tmpdir,openethereum_key_fn)
|
||||
fn = joinpath(self.tmpdir,'mm'+str(num),key+'.bin')
|
||||
os.environ['MMGEN_BOGUS_SEND'] = ''
|
||||
args = ['-B',
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ from mmgen.rpc import rpc_init,MoneroWalletRPCClient
|
|||
from mmgen.daemon import CoinDaemon,MoneroWalletDaemon
|
||||
|
||||
def auth_test(proto,d):
|
||||
d.stop()
|
||||
if g.platform != 'win':
|
||||
qmsg(f'\n Testing authentication with credentials from {d.cfg_file}:')
|
||||
d.remove_datadir()
|
||||
|
|
@ -71,6 +70,7 @@ def run_test(coin,auth):
|
|||
for backend in g.autoset_opts['rpc_backend'].choices:
|
||||
run_session(getattr(init_test,coin)(proto,backend),backend=backend)
|
||||
|
||||
d.stop()
|
||||
if auth:
|
||||
auth_test(proto,d)
|
||||
qmsg(' OK')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue