Skip to content
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

Expose epoch manager information #4885

Open
mfornet opened this issue Sep 27, 2021 · 5 comments
Open

Expose epoch manager information #4885

mfornet opened this issue Sep 27, 2021 · 5 comments
Labels
A-transaction-runtime Area: transaction runtime (transaction and receipts processing, state transition, etc) C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@mfornet
Copy link
Member

mfornet commented Sep 27, 2021

Feature request
Create a host function to give access to epoch manager information. In particular I'm thinking about having a function that given a block_height returns the expected block_producer for that block. Notice that block_height can be from the future, as long as it is part of the current epoch and this information is already available.

Somehow related, is this change: #2504

Additional context
This can be achieved today without any protocol change, but it is inconvenient, by running a NEAR Light Client as a smart contract on top of NEAR (similar to the rainbow-bridge implementation). It is inconvenient because data must be relayed at least once per epoch.

@mfornet mfornet added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Sep 27, 2021
@bowenwang1996 bowenwang1996 added the A-transaction-runtime Area: transaction runtime (transaction and receipts processing, state transition, etc) label Sep 27, 2021
@bowenwang1996
Copy link
Collaborator

Could you explain the use case here? Unless there is a strong reason, we usually do not consider adding new host functions. This is also related to #2745

@mfornet
Copy link
Member Author

mfornet commented Sep 30, 2021

My specific use case is that I want to disallow some validators from being able to run my tx, by making the tx fail if the validator is in a blacklist.

Thinking about a more generic approach, instead of explicitly giving this info, we can expose the hash of the previous block. This is enough to proof anything that happened previously, in particular I think this is enough (with extra data) to proof who is the current block producer.

@bowenwang1996
Copy link
Collaborator

Should we revive the discussion on host function for block hash 😄

@stale
Copy link

stale bot commented Dec 29, 2021

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months.
It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the S-stale label Dec 29, 2021
@stale
Copy link

stale bot commented Mar 31, 2022

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months.
It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the S-stale label Mar 31, 2022
@akhi3030 akhi3030 removed the S-stale label Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-transaction-runtime Area: transaction runtime (transaction and receipts processing, state transition, etc) C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

3 participants