Skip to content

Commit

Permalink
Merge pull request steemit#1664 from steemit/1655-max-block-size-soft…
Browse files Browse the repository at this point in the history
…fork

Max Block Size Soft Fork
  • Loading branch information
Michael Vandeberg authored Oct 17, 2017
2 parents 06217d5 + 7ae40bb commit 56c4d89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions libraries/chain/steem_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ void witness_update_evaluator::do_apply( const witness_update_operation& o )
wlog( "Wrong fee symbol in block ${b}", ("b", _db.head_block_num()+1) );
}

#pragma message( "TODO: This needs to be part of HF 20 and moved to validate if not triggered in previous blocks" )
if( _db.is_producing() )
{
FC_ASSERT( o.props.maximum_block_size <= STEEMIT_SOFT_MAX_BLOCK_SIZE, "Max block size cannot be more than 2MiB" );
}

const auto& by_witness_name_idx = _db.get_index< witness_index >().indices().get< by_name >();
auto wit_itr = by_witness_name_idx.find( o.owner );
if( wit_itr != by_witness_name_idx.end() )
Expand Down
1 change: 1 addition & 0 deletions libraries/protocol/get_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ fc::variant_object get_config()
result["STEEMIT_MAX_ASSET_WHITELIST_AUTHORITIES"] = STEEMIT_MAX_ASSET_WHITELIST_AUTHORITIES;
result["STEEMIT_MAX_AUTHORITY_MEMBERSHIP"] = STEEMIT_MAX_AUTHORITY_MEMBERSHIP;
result["STEEMIT_MAX_BLOCK_SIZE"] = STEEMIT_MAX_BLOCK_SIZE;
result["STEEMIT_SOFT_MAX_BLOCK_SIZE"] = STEEMIT_SOFT_MAX_BLOCK_SIZE;
result["STEEMIT_MAX_CASHOUT_WINDOW_SECONDS"] = STEEMIT_MAX_CASHOUT_WINDOW_SECONDS;
result["STEEMIT_MAX_COMMENT_DEPTH"] = STEEMIT_MAX_COMMENT_DEPTH;
result["STEEMIT_MAX_COMMENT_DEPTH_PRE_HF17"] = STEEMIT_MAX_COMMENT_DEPTH_PRE_HF17;
Expand Down
3 changes: 2 additions & 1 deletion libraries/protocol/include/steemit/protocol/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
#pragma once

#define STEEMIT_BLOCKCHAIN_VERSION ( version(0, 19, 2) )
#define STEEMIT_BLOCKCHAIN_VERSION ( version(0, 19, 3) )
#define STEEMIT_BLOCKCHAIN_HARDFORK_VERSION ( hardfork_version( STEEMIT_BLOCKCHAIN_VERSION ) )

#ifdef IS_TEST_NET
Expand Down Expand Up @@ -226,6 +226,7 @@
#define STEEMIT_MAX_TRANSACTION_SIZE (1024*64)
#define STEEMIT_MIN_BLOCK_SIZE_LIMIT (STEEMIT_MAX_TRANSACTION_SIZE)
#define STEEMIT_MAX_BLOCK_SIZE (STEEMIT_MAX_TRANSACTION_SIZE*STEEMIT_BLOCK_INTERVAL*2000)
#define STEEMIT_SOFT_MAX_BLOCK_SIZE (2*1024*1024)
#define STEEMIT_MIN_BLOCK_SIZE 115
#define STEEMIT_BLOCKS_PER_HOUR (60*60/STEEMIT_BLOCK_INTERVAL)
#define STEEMIT_FEED_INTERVAL_BLOCKS (STEEMIT_BLOCKS_PER_HOUR)
Expand Down

0 comments on commit 56c4d89

Please sign in to comment.