New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use transaction delay_sec in get_required_keys determination #5291

Merged
merged 15 commits into from Aug 22, 2018

Conversation

Projects
None yet
4 participants
@heifner
Contributor

heifner commented Aug 16, 2018

Resolves #5281

  • Use the transaction delay_sec in the determination of required keys.-

conr2d and others added some commits Aug 15, 2018

Merge pull request #5253 from conr2d/fix-typo
Fix typos in contracts/eosiolib/types.h documentation
Fix for nullptr deref when producers are waiting
#4972 created a different calling path into `producer_plugin_impl::calculate_next_block_time` where there was no pending block state.  As a result when the following conditions were met the code would dereference a null ptr:

* the node was a producer, who _had_ produced during this processes lifetime OR replayed a block where they produced (so they have watermark data)
* still in the active schedule of producers
* experienced a gap in blocks of > 5 seconds (so they moved to our “waiting” mode)

Credit goes to @heifner for the find
Merge pull request #5256 from EOSIO/feature/fix-null-ptr-on-waiting-p…
…roducer

Fix for nullptr deref when producers are waiting
Merge pull request #5254 from conr2d/cleos
Remove unused variable

@heifner heifner requested a review from arhag Aug 16, 2018

@jjnetcn

This comment has been minimized.

Contributor

jjnetcn commented Aug 17, 2018

pretty_input.delay_sec is unsigned_int transacton::delay_sec;
get_required_keys param provided_delay is fc::microseconds.
it will cast thought
template
unsigned_int::operator T() const { return static_cast(value); } with T = fc::microseconds,
and static_cast call explicit fc::microseconds::microseconds(int64_t c) to set member variable _count to c.

so, call inline function fc::seconds(pretty_input.delay_sec) to replace pretty_input.delay_sec,
set _count=delay_sec*1000000

@wanderingbort

It looks like there was accidental drive in the fc submodule. Also, I'm going to rebase this to release/1.2.x so that it can be included as a bugfix in a patch release (it does seem like a bug)

totally wrong

@heifner

This comment has been minimized.

Contributor

heifner commented Aug 22, 2018

Although not strictly needed for the this change the fc submodule update was intentional for the changes to varint.hpp.

@heifner heifner changed the base branch from develop to release/1.2.x Aug 22, 2018

@wanderingbort wanderingbort merged commit 81c88f7 into release/1.2.x Aug 22, 2018

14 checks passed

buildkite/eosio Build #3003 passed (34 minutes, 10 seconds)
Details
buildkite/eosio/aws-build Passed (9 minutes, 8 seconds)
Details
buildkite/eosio/aws-tests Passed (19 minutes, 10 seconds)
Details
buildkite/eosio/centos-build Passed (9 minutes, 5 seconds)
Details
buildkite/eosio/centos-tests Passed (18 minutes, 51 seconds)
Details
buildkite/eosio/darwin-build Passed (8 minutes, 10 seconds)
Details
buildkite/eosio/darwin-tests Passed (23 minutes, 31 seconds)
Details
buildkite/eosio/fedora-build Passed (9 minutes, 18 seconds)
Details
buildkite/eosio/fedora-tests Passed (18 minutes, 38 seconds)
Details
buildkite/eosio/pipeline Passed (4 seconds)
Details
buildkite/eosio/ubuntu-18-dot-04-build Passed (6 minutes, 42 seconds)
Details
buildkite/eosio/ubuntu-18-dot-04-tests Passed (19 minutes, 7 seconds)
Details
buildkite/eosio/ubuntu-build Passed (8 minutes, 31 seconds)
Details
buildkite/eosio/ubuntu-tests Passed (24 minutes, 37 seconds)
Details

@wanderingbort wanderingbort deleted the gh#5281-required-keys-delay branch Aug 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment