Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 763a6a6

Browse files
committed
Made logging more silent
1 parent 4a73f8a commit 763a6a6

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

ethereum/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def set_execution_results(state, block):
134134
block.header.state_root = state.trie.root_hash
135135
block.header.gas_used = state.gas_used
136136
block.header.bloom = state.bloom
137-
log.info('Block pre-sealed, %d gas used' % state.gas_used)
137+
log.debug('Block pre-sealed, %d gas used' % state.gas_used)
138138

139139
# Verify state root, receipt root, etc
140140
def verify_execution_results(state, block):

ethereum/meta.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def make_head_candidate(chain, txqueue=None,
4545
coinbase=b'\x35'*20,
4646
extra_data='moo ha ha says the laughing cow.',
4747
min_gasprice=0):
48-
log.info('Creating head candidate')
48+
log.debug('Creating head candidate')
4949
if parent is None:
5050
temp_state = State.from_snapshot(chain.state.to_snapshot(root_only=True), chain.env)
5151
else:
@@ -65,5 +65,5 @@ def make_head_candidate(chain, txqueue=None,
6565
cs.finalize(temp_state, blk)
6666
# Set state root, receipt root, etc
6767
set_execution_results(temp_state, blk)
68-
log.info('Created head candidate successfully')
68+
log.debug('Created head candidate successfully')
6969
return blk, temp_state

ethereum/opcodes.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161
0xa2: ['LOG2', 4, 0, 1125],
6262
0xa3: ['LOG3', 5, 0, 1500],
6363
0xa4: ['LOG4', 6, 0, 1875],
64-
0xe1: ['SLOADBYTES', 3, 0, 50], # to be discontinued
65-
0xe2: ['SSTOREBYTES', 3, 0, 0], # to be discontinued
66-
0xe3: ['SSIZE', 1, 1, 50], # to be discontinued
64+
#0xe1: ['SLOADBYTES', 3, 0, 50], # to be discontinued
65+
#0xe2: ['SSTOREBYTES', 3, 0, 0], # to be discontinued
66+
#0xe3: ['SSIZE', 1, 1, 50], # to be discontinued
6767
0xf0: ['CREATE', 3, 1, 32000],
6868
0xf1: ['CALL', 7, 1, 40], # 700 now
6969
0xf2: ['CALLCODE', 7, 1, 40], # 700 now
@@ -143,4 +143,3 @@
143143
CALL_CHILD_LIMIT_NUM = 63
144144
CALL_CHILD_LIMIT_DENOM = 64
145145
SUICIDE_SUPPLEMENTAL_GAS = 5000
146-

ethereum/pow/chain.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
log = get_logger('eth.chain')
25-
config_string = ':info,eth.chain:debug'
25+
config_string = ':info' #,eth.chain:debug'
2626
#config_string = ':info,eth.vm.log:trace,eth.vm.op:trace,eth.vm.stack:trace,eth.vm.exit:trace,eth.pb.msg:trace,eth.pb.tx:debug'
2727
configure_logging(config_string=config_string)
2828

@@ -250,7 +250,7 @@ def add_block(self, block):
250250
return False
251251
# Is the block being added to the head?
252252
if block.header.prevhash == self.head_hash:
253-
log.info('Adding to head', head=encode_hex(block.header.prevhash))
253+
log.info('Adding to head', head=encode_hex(block.header.prevhash[:4]))
254254
self.state.deletes = []
255255
self.state.changed = {}
256256
try:
@@ -366,15 +366,15 @@ def add_block(self, block):
366366
self.db.put('head_hash', self.head_hash)
367367
self.db.put(block.hash, rlp.encode(block))
368368
self.db.put(b'changed:'+block.hash, b''.join(list(changed.keys())))
369-
print('Saved %d address change logs' % len(changed.keys()))
369+
log.debug('Saved %d address change logs' % len(changed.keys()))
370370
self.db.put(b'deletes:'+block.hash, b''.join(deletes))
371-
print('Saved %d trie node deletes for block %d (%s)' % (len(deletes), block.number, utils.encode_hex(block.hash)))
371+
log.debug('Saved %d trie node deletes for block %d (%s)' % (len(deletes), block.number, utils.encode_hex(block.hash)))
372372
# Delete old junk data
373373
old_block_hash = self.get_blockhash_by_number(block.number - self.max_history)
374374
if old_block_hash:
375375
try:
376376
deletes = self.db.get(b'deletes:'+old_block_hash)
377-
print('Deleting up to %d trie nodes' % (len(deletes) // 32))
377+
log.debug('Deleting up to %d trie nodes' % (len(deletes) // 32))
378378
rdb = RefcountDB(self.db)
379379
for i in range(0, len(deletes), 32):
380380
rdb.delete(deletes[i: i+32])

ethereum/vm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def vm_execute(ext, msg, code):
245245
if _prevop in ('MLOAD', 'MSTORE', 'MSTORE8', 'SHA3', 'CALL',
246246
'CALLCODE', 'CREATE', 'CALLDATACOPY', 'CODECOPY',
247247
'EXTCODECOPY'):
248-
if len(compustate.memory) < 1024:
248+
if len(compustate.memory) < 4096:
249249
trace_data['memory'] = \
250250
''.join([encode_hex(ascii_chr(x)) for x
251251
in compustate.memory])

0 commit comments

Comments
 (0)