update coin daemon support
DAEMON VERSION - Bitcoin Core: 25.1.0 - Bitcoin Cash Node: 26.1.0 - Geth: 1.13.4
This commit is contained in:
parent
cc1d7edad3
commit
00a8ff30ad
4 changed files with 68 additions and 35 deletions
|
|
@ -1 +1 @@
|
||||||
14.0.dev12
|
14.0.dev13
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ from ...util import list_gen
|
||||||
from ...daemon import CoinDaemon,_nw,_dd
|
from ...daemon import CoinDaemon,_nw,_dd
|
||||||
|
|
||||||
class bitcoin_core_daemon(CoinDaemon):
|
class bitcoin_core_daemon(CoinDaemon):
|
||||||
daemon_data = _dd('Bitcoin Core', 250000, '25.0.0')
|
daemon_data = _dd('Bitcoin Core', 250100, '25.1.0')
|
||||||
exec_fn = 'bitcoind'
|
exec_fn = 'bitcoind'
|
||||||
cli_fn = 'bitcoin-cli'
|
cli_fn = 'bitcoin-cli'
|
||||||
testnet_dir = 'testnet3'
|
testnet_dir = 'testnet3'
|
||||||
|
|
@ -122,7 +122,7 @@ class bitcoin_core_daemon(CoinDaemon):
|
||||||
return e.args[0]
|
return e.args[0]
|
||||||
|
|
||||||
class bitcoin_cash_node_daemon(bitcoin_core_daemon):
|
class bitcoin_cash_node_daemon(bitcoin_core_daemon):
|
||||||
daemon_data = _dd('Bitcoin Cash Node', 26000000, '26.0.0')
|
daemon_data = _dd('Bitcoin Cash Node', 26010000, '26.1.0')
|
||||||
exec_fn = 'bitcoind-bchn'
|
exec_fn = 'bitcoind-bchn'
|
||||||
cli_fn = 'bitcoin-cli-bchn'
|
cli_fn = 'bitcoin-cli-bchn'
|
||||||
rpc_ports = _nw(8432, 18432, 18543) # use non-standard ports (core+100)
|
rpc_ports = _nw(8432, 18432, 18543) # use non-standard ports (core+100)
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ class parity_daemon(openethereum_daemon):
|
||||||
exec_fn = 'parity'
|
exec_fn = 'parity'
|
||||||
|
|
||||||
class geth_daemon(ethereum_daemon):
|
class geth_daemon(ethereum_daemon):
|
||||||
daemon_data = _dd('Geth', 1011006, '1.11.6')
|
daemon_data = _dd('Geth', 1013004, '1.13.4')
|
||||||
version_pat = r'Geth/v(\d+)\.(\d+)\.(\d+)'
|
version_pat = r'Geth/v(\d+)\.(\d+)\.(\d+)'
|
||||||
exec_fn = 'geth'
|
exec_fn = 'geth'
|
||||||
use_pidfile = False
|
use_pidfile = False
|
||||||
|
|
|
||||||
|
|
@ -73,16 +73,28 @@ amt2 = '888.111122223333444455'
|
||||||
|
|
||||||
parity_devkey_fn = 'parity.devkey'
|
parity_devkey_fn = 'parity.devkey'
|
||||||
|
|
||||||
|
def set_vbals(daemon_id):
|
||||||
|
global vbal1, vbal2, vbal3, vbal4, vbal5, vbal6, vbal7, vbal9
|
||||||
|
if daemon_id == 'geth':
|
||||||
|
vbal1 = '1.2288347'
|
||||||
|
vbal2 = '99.996561415'
|
||||||
|
vbal3 = '1.23141825'
|
||||||
|
vbal4 = '127.0287847'
|
||||||
|
vbal5 = '1000126.14775300512345678'
|
||||||
|
vbal6 = '1000126.14880300512345678'
|
||||||
|
vbal7 = '1000124.91891830512345678'
|
||||||
|
vbal9 = '1.22625235'
|
||||||
|
else:
|
||||||
vbal1 = '1.2288409'
|
vbal1 = '1.2288409'
|
||||||
vbal9 = '1.22626295'
|
|
||||||
vbal2 = '99.997088755'
|
vbal2 = '99.997088755'
|
||||||
vbal3 = '1.23142525'
|
vbal3 = '1.23142525'
|
||||||
vbal4 = '127.0287909'
|
vbal4 = '127.0287909'
|
||||||
vbal5 = '1000126.14828654512345678'
|
vbal5 = '1000126.14828654512345678'
|
||||||
vbal6 = '1000126.14933654512345678'
|
vbal6 = '1000126.14933654512345678'
|
||||||
vbal7 = '1000124.91944564512345678'
|
vbal7 = '1000124.91944564512345678'
|
||||||
|
vbal9 = '1.22626295'
|
||||||
|
|
||||||
bals = {
|
bals = lambda k: {
|
||||||
'1': [ ('98831F3A:E:1','123.456')],
|
'1': [ ('98831F3A:E:1','123.456')],
|
||||||
'2': [ ('98831F3A:E:1','123.456'),('98831F3A:E:11','1.234')],
|
'2': [ ('98831F3A:E:1','123.456'),('98831F3A:E:11','1.234')],
|
||||||
'3': [ ('98831F3A:E:1','123.456'),('98831F3A:E:11','1.234'),('98831F3A:E:21','2.345')],
|
'3': [ ('98831F3A:E:1','123.456'),('98831F3A:E:11','1.234'),('98831F3A:E:21','2.345')],
|
||||||
|
|
@ -114,9 +126,9 @@ bals = {
|
||||||
('98831F3A:E:12',vbal2),
|
('98831F3A:E:12',vbal2),
|
||||||
('98831F3A:E:21','2.345'),
|
('98831F3A:E:21','2.345'),
|
||||||
(burn_addr + r'\s+non-MMGen',amt1)]
|
(burn_addr + r'\s+non-MMGen',amt1)]
|
||||||
}
|
}[k]
|
||||||
|
|
||||||
token_bals = {
|
token_bals = lambda k: {
|
||||||
'1': [ ('98831F3A:E:11','1000','1.234')],
|
'1': [ ('98831F3A:E:11','1000','1.234')],
|
||||||
'2': [ ('98831F3A:E:11','998.76544',vbal3,'a1'),
|
'2': [ ('98831F3A:E:11','998.76544',vbal3,'a1'),
|
||||||
('98831F3A:E:12','1.23456','0')],
|
('98831F3A:E:12','1.23456','0')],
|
||||||
|
|
@ -136,11 +148,12 @@ token_bals = {
|
||||||
('98831F3A:E:12','43.21',vbal2),
|
('98831F3A:E:12','43.21',vbal2),
|
||||||
('98831F3A:E:13','1.23456','0'),
|
('98831F3A:E:13','1.23456','0'),
|
||||||
(burn_addr + r'\s+non-MMGen',amt2,amt1)]
|
(burn_addr + r'\s+non-MMGen',amt2,amt1)]
|
||||||
}
|
}[k]
|
||||||
token_bals_getbalance = {
|
|
||||||
|
token_bals_getbalance = lambda k: {
|
||||||
'1': (vbal4,'999999.12345689012345678'),
|
'1': (vbal4,'999999.12345689012345678'),
|
||||||
'2': ('111.888877776666555545','888.111122223333444455')
|
'2': ('111.888877776666555545','888.111122223333444455')
|
||||||
}
|
}[k]
|
||||||
|
|
||||||
coin = cfg.coin
|
coin = cfg.coin
|
||||||
|
|
||||||
|
|
@ -393,6 +406,8 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared):
|
||||||
from mmgen.daemon import CoinDaemon
|
from mmgen.daemon import CoinDaemon
|
||||||
self.daemon = CoinDaemon( cfg, self.proto.coin+'_rt', test_suite=True )
|
self.daemon = CoinDaemon( cfg, self.proto.coin+'_rt', test_suite=True )
|
||||||
|
|
||||||
|
set_vbals(self.daemon.id)
|
||||||
|
|
||||||
self.using_solc = check_solc_ver()
|
self.using_solc = check_solc_ver()
|
||||||
if not self.using_solc:
|
if not self.using_solc:
|
||||||
omsg(yellow('Using precompiled contract data'))
|
omsg(yellow('Using precompiled contract data'))
|
||||||
|
|
@ -503,16 +518,32 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared):
|
||||||
'byzantiumBlock': 0,
|
'byzantiumBlock': 0,
|
||||||
'constantinopleBlock': 0,
|
'constantinopleBlock': 0,
|
||||||
'petersburgBlock': 0,
|
'petersburgBlock': 0,
|
||||||
'clique': {
|
'istanbulBlock': 0,
|
||||||
'period': 0,
|
'muirGlacierBlock': 0,
|
||||||
'epoch': 30000
|
'berlinBlock': 0,
|
||||||
}
|
'londonBlock': 0,
|
||||||
|
'arrowGlacierBlock': 0,
|
||||||
|
'grayGlacierBlock': 0,
|
||||||
|
'shanghaiTime': 0,
|
||||||
|
'terminalTotalDifficulty': 0,
|
||||||
|
'terminalTotalDifficultyPassed': True,
|
||||||
|
'isDev': True
|
||||||
},
|
},
|
||||||
'difficulty': '1',
|
'nonce': '0x0',
|
||||||
'gasLimit': '8000000',
|
'timestamp': '0x0',
|
||||||
'extradata': '0x' + 64*'0' + signer_addr + 130*'0',
|
'extraData': '0x',
|
||||||
|
'gasLimit': '0xaf79e0',
|
||||||
|
'difficulty': '0x0',
|
||||||
|
'mixHash': '0x0000000000000000000000000000000000000000000000000000000000000000',
|
||||||
|
'coinbase': '0x0000000000000000000000000000000000000000',
|
||||||
|
'number': '0x0',
|
||||||
|
'gasUsed': '0x0',
|
||||||
|
'parentHash': '0x0000000000000000000000000000000000000000000000000000000000000000',
|
||||||
|
'baseFeePerGas': '0x3b9aca00',
|
||||||
|
'excessBlobGas': None,
|
||||||
|
'blobGasUsed': None,
|
||||||
'alloc': {
|
'alloc': {
|
||||||
prealloc_addr: { 'balance': str(prealloc_amt.toWei()) }
|
prealloc_addr: { 'balance': hex(prealloc_amt.toWei()) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -853,7 +884,7 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared):
|
||||||
def bal(self,n):
|
def bal(self,n):
|
||||||
t = self.spawn('mmgen-tool', self.eth_args + ['twview','wide=1'])
|
t = self.spawn('mmgen-tool', self.eth_args + ['twview','wide=1'])
|
||||||
text = t.read(strip_color=True)
|
text = t.read(strip_color=True)
|
||||||
for b in bals[n]:
|
for b in bals(n):
|
||||||
addr,amt,adj = b if len(b) == 3 else b + (False,)
|
addr,amt,adj = b if len(b) == 3 else b + (False,)
|
||||||
if adj and self.proto.coin == 'ETC':
|
if adj and self.proto.coin == 'ETC':
|
||||||
amt = str(Decimal(amt) + Decimal(adj[1]) * self.bal_corr)
|
amt = str(Decimal(amt) + Decimal(adj[1]) * self.bal_corr)
|
||||||
|
|
@ -866,7 +897,7 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared):
|
||||||
def token_bal(self,n=None):
|
def token_bal(self,n=None):
|
||||||
t = self.spawn('mmgen-tool', self.eth_args + ['--token=mm1','twview','wide=1'])
|
t = self.spawn('mmgen-tool', self.eth_args + ['--token=mm1','twview','wide=1'])
|
||||||
text = t.read(strip_color=True)
|
text = t.read(strip_color=True)
|
||||||
for b in token_bals[n]:
|
for b in token_bals(n):
|
||||||
addr,_amt1,_amt2,adj = b if len(b) == 4 else b + (False,)
|
addr,_amt1,_amt2,adj = b if len(b) == 4 else b + (False,)
|
||||||
if adj and self.proto.coin == 'ETC':
|
if adj and self.proto.coin == 'ETC':
|
||||||
_amt2 = str(Decimal(_amt2) + Decimal(adj[1]) * self.bal_corr)
|
_amt2 = str(Decimal(_amt2) + Decimal(adj[1]) * self.bal_corr)
|
||||||
|
|
@ -877,8 +908,8 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared):
|
||||||
return t
|
return t
|
||||||
|
|
||||||
def bal_getbalance(self,sid,idx,etc_adj=False,extra_args=[]):
|
def bal_getbalance(self,sid,idx,etc_adj=False,extra_args=[]):
|
||||||
bal1 = token_bals_getbalance[idx][0]
|
bal1 = token_bals_getbalance(idx)[0]
|
||||||
bal2 = token_bals_getbalance[idx][1]
|
bal2 = token_bals_getbalance(idx)[1]
|
||||||
bal1 = Decimal(bal1)
|
bal1 = Decimal(bal1)
|
||||||
if etc_adj and self.proto.coin == 'ETC':
|
if etc_adj and self.proto.coin == 'ETC':
|
||||||
bal1 += self.bal_corr
|
bal1 += self.bal_corr
|
||||||
|
|
@ -1264,13 +1295,15 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared):
|
||||||
self._do_confirm_send(t,quiet=not cfg.debug,sure=False)
|
self._do_confirm_send(t,quiet=not cfg.debug,sure=False)
|
||||||
return t
|
return t
|
||||||
|
|
||||||
def txcreate_refresh_balances(
|
def txcreate_refresh_balances(self):
|
||||||
self,
|
return self._txcreate_refresh_balances(
|
||||||
bals = ['2','3'],
|
bals = ['2','3'],
|
||||||
args = ['-B','--cached-balances','-i'],
|
args = ['-B','--cached-balances','-i'],
|
||||||
total = vbal5,
|
total = vbal5,
|
||||||
adj_total = True,
|
adj_total = True,
|
||||||
total_coin = None):
|
total_coin = None)
|
||||||
|
|
||||||
|
def _txcreate_refresh_balances(self,bals,args,total,adj_total,total_coin):
|
||||||
|
|
||||||
if total_coin is None:
|
if total_coin is None:
|
||||||
total_coin = self.proto.coin
|
total_coin = self.proto.coin
|
||||||
|
|
@ -1296,7 +1329,7 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared):
|
||||||
add_args = ['--token=mm1','98831F3A:E:12,43.21'] )
|
add_args = ['--token=mm1','98831F3A:E:12,43.21'] )
|
||||||
|
|
||||||
def token_txcreate_refresh_balances(self):
|
def token_txcreate_refresh_balances(self):
|
||||||
return self.txcreate_refresh_balances(
|
return self._txcreate_refresh_balances(
|
||||||
bals = ['1','2'],
|
bals = ['1','2'],
|
||||||
args = ['--token=mm1','-B','--cached-balances','-i'],
|
args = ['--token=mm1','-B','--cached-balances','-i'],
|
||||||
total = '1000',
|
total = '1000',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue