Skip to content

Commit

Permalink
Merge pull request EOSIO#24 from Game-X-Coin/upstream-1.6.3
Browse files Browse the repository at this point in the history
Merge changes from upstream v1.6.3
  • Loading branch information
conr2d authored Mar 10, 2019
2 parents 69f25f4 + e89a3ae commit 6bfd6ea
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ cd eos/Docker
docker build . -t eosio/eos
```

The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the 1.6.2 tag, you could do the following:
The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the 1.6.3 tag, you could do the following:

```bash
docker build -t eosio/eos:v1.6.2 --build-arg branch=1.6.2 .
docker build -t eosio/eos:v1.6.3 --build-arg branch=v1.6.3 .
```

By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,31 @@ $ brew remove eosio
```
#### Ubuntu 18.04 Debian Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.2/eosio_1.6.2-1-ubuntu-18.04_amd64.deb
$ sudo apt install ./eosio_1.6.2-1-ubuntu-18.04_amd64.deb
$ wget https://github.com/eosio/eos/releases/download/v1.6.3/eosio_1.6.3-1-ubuntu-18.04_amd64.deb
$ sudo apt install ./eosio_1.6.3-1-ubuntu-18.04_amd64.deb
```
#### Ubuntu 16.04 Debian Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.2/eosio_1.6.2-1-ubuntu-16.04_amd64.deb
$ sudo apt install ./eosio_1.6.2-1-ubuntu-16.04_amd64.deb
$ wget https://github.com/eosio/eos/releases/download/v1.6.3/eosio_1.6.3-1-ubuntu-16.04_amd64.deb
$ sudo apt install ./eosio_1.6.3-1-ubuntu-16.04_amd64.deb
```
#### Debian Package Uninstall
```sh
$ sudo apt remove eosio
```
#### Centos RPM Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.2/eosio-1.6.2-1.el7.x86_64.rpm
$ sudo yum install ./eosio-1.6.2-1.el7.x86_64.rpm
$ wget https://github.com/eosio/eos/releases/download/v1.6.3/eosio-1.6.3-1.el7.x86_64.rpm
$ sudo yum install ./eosio-1.6.3-1.el7.x86_64.rpm
```
#### Centos RPM Package Uninstall
```sh
$ sudo yum remove eosio.cdt
```
#### Fedora RPM Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.2/eosio-1.6.2-1.fc27.x86_64.rpm
$ sudo yum install ./eosio-1.6.2-1.fc27.x86_64.rpm
$ wget https://github.com/eosio/eos/releases/download/v1.6.3/eosio-1.6.3-1.fc27.x86_64.rpm
$ sudo yum install ./eosio-1.6.3-1.fc27.x86_64.rpm
```
#### Fedora RPM Package Uninstall
```sh
Expand Down
11 changes: 6 additions & 5 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,9 @@ struct controller_impl {
transaction_trace_ptr trace;
try {
auto start = fc::time_point::now();
const bool check_auth = !self.skip_auth_check() && !trx->implicit;
// call recover keys so that trx->sig_cpu_usage is set correctly
const flat_set<public_key_type>& recovered_keys = check_auth ? trx->recover_keys( chain_id ) : flat_set<public_key_type>();
if( !explicit_billed_cpu_time ) {
fc::microseconds already_consumed_time( EOS_PERCENT(trx->sig_cpu_usage.count(), conf.sig_cpu_bill_pct) );

Expand Down Expand Up @@ -1031,15 +1034,13 @@ struct controller_impl {

trx_context.delay = fc::seconds(trn.delay_sec);

if( !self.skip_auth_check() && !trx->implicit ) {
if( check_auth ) {
authorization.check_authorization(
trn.actions,
trx->recover_keys( chain_id ),
recovered_keys,
{},
trx_context.delay,
[](){}
/*std::bind(&transaction_context::add_cpu_usage_and_check_time, &trx_context,
std::placeholders::_1)*/,
[&trx_context](){ trx_context.checktime(); },
false
);
}
Expand Down
17 changes: 16 additions & 1 deletion plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@ namespace eosio {
void rejected_block(const block_id_type& id);

void recv_block(const connection_ptr& conn, const block_id_type& msg, uint32_t bnum);
void expire_blocks( uint32_t bnum );
void recv_transaction(const connection_ptr& conn, const transaction_id_type& id);
void recv_notice(const connection_ptr& conn, const notice_message& msg, bool generated);

Expand Down Expand Up @@ -1656,11 +1657,23 @@ namespace eosio {
}

void dispatch_manager::rejected_block(const block_id_type& id) {
fc_dlog(logger,"not sending rejected transaction ${tid}",("tid",id));
fc_dlog( logger, "rejected block ${id}", ("id", id) );
auto range = received_blocks.equal_range(id);
received_blocks.erase(range.first, range.second);
}

void dispatch_manager::expire_blocks( uint32_t lib_num ) {
for( auto i = received_blocks.begin(); i != received_blocks.end(); ) {
const block_id_type& blk_id = i->first;
uint32_t blk_num = block_header::num_from_id( blk_id );
if( blk_num <= lib_num ) {
i = received_blocks.erase( i );
} else {
++i;
}
}
}

void dispatch_manager::bcast_transaction(const transaction_metadata_ptr& ptrx) {
std::set<connection_ptr> skips;
const auto& id = ptrx->id;
Expand Down Expand Up @@ -2565,6 +2578,7 @@ namespace eosio {
}
else {
sync_master->rejected_block(c, blk_num);
dispatcher->rejected_block( blk_id );
}
}

Expand Down Expand Up @@ -2626,6 +2640,7 @@ namespace eosio {

controller& cc = chain_plug->chain();
uint32_t lib = cc.last_irreversible_block_num();
dispatcher->expire_blocks( lib );
for ( auto &c : connections ) {
auto &stale_txn = c->trx_state.get<by_block_num>();
stale_txn.erase( stale_txn.lower_bound(1), stale_txn.upper_bound(lib) );
Expand Down

0 comments on commit 6bfd6ea

Please sign in to comment.