Skip to content

Update to peer_keys_db_t to match changes in eos-system-contracts pr 185 #1316

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

Merged
merged 35 commits into from
Apr 16, 2025

Conversation

greg7mdp
Copy link
Contributor

@greg7mdp greg7mdp commented Apr 3, 2025

Resolves #1183.

Updates for changes in VaultaFoundation/system-contracts#185.

@greg7mdp greg7mdp changed the title Update to peer_keys_db_t to match changes in eos-system-contracts pr #185 Update to peer_keys_db_t to match changes in eos-system-contracts pr 185 Apr 3, 2025
@greg7mdp greg7mdp marked this pull request as draft April 4, 2025 19:39
…ntegration tests.

In that case the return value is an empty vector.
const auto& gpo = db.get<global_property_object>();

auto trace = push_transaction(metadata, fc::time_point::maximum(), fc::microseconds::maximum(),
gpo.configuration.min_transaction_cpu_usage, true, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use gpo.configuration.min_transaction_cpu_usage for read-only, use 0 for billed_cpu_time_us. explicit_billed_cpu_time should be false not true. I think max_transaction_time can probably be left as maximum although we might consider using a smaller value. For block_deadline, if you are going to call this from producer_plugin then I think you should go ahead and use the actual block_deadline.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arhag any opinion on if we should set a limit on the read-only trx? Maybe something like 10ms?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gdb4713
gdb4713 previously approved these changes Apr 10, 2025
@greg7mdp greg7mdp marked this pull request as ready for review April 11, 2025 14:56

trx.actions.emplace_back(std::move(act));
trx.set_reference_block(chain_head.id());
set_trx_expiration(trx);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we require tapos & expiration on read only trx? You might be able to skip these couple lines

Either way, set_trx_expiration() does a set_reference_block() anyways so seems at least that line is redundant

using getpeerkeys_res_t = std::vector<peerkeys_t>;

struct peer_info_t {
uint32_t rank; // rank by `total_votes` of all producers, active or not, may not match schedule rank
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe consider default initializing this to something

@greg7mdp greg7mdp merged commit 99febb5 into main Apr 16, 2025
36 checks passed
@greg7mdp greg7mdp deleted the gh_1183_3 branch April 16, 2025 14:13
spoonincode added a commit that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for accessing the on-chain peer public keys
4 participants