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

Implementation of Box.getReg #416

Open
kushti opened this issue Mar 6, 2019 · 2 comments
Open

Implementation of Box.getReg #416

kushti opened this issue Mar 6, 2019 · 2 comments
Labels
A-consensus Area: Code used in consensus (i.e. transaction validation) Bounty - 200 ERG C-feature Category: Feature request or PR P3-low Priority: Low soft-fork Implementation requires soft-fork
Milestone

Comments

@kushti
Copy link
Member

kushti commented Mar 6, 2019

Related to #481
Implement Box.getReg. Currently ignored tests related to getReg:
"Box.getReg"
"Box.getReg equivalence"

Also search TODOs referring to this issue

@kushti kushti added this to the Mainnet milestone Mar 6, 2019
@kushti kushti assigned ergomorphic and aslesarenko and unassigned ergomorphic Mar 6, 2019
@aslesarenko aslesarenko assigned greenhat and unassigned aslesarenko Apr 3, 2019
@greenhat greenhat added the S-wip Status: Work in progress label Apr 28, 2019
@aslesarenko aslesarenko modified the milestones: Mainnet, After Mainnet May 7, 2019
@aslesarenko aslesarenko added soft-fork Implementation requires soft-fork and removed S-wip Status: Work in progress labels Oct 2, 2019
@aslesarenko aslesarenko added A-consensus Area: Code used in consensus (i.e. transaction validation) C-feature Category: Feature request or PR P3-low Priority: Low labels Dec 23, 2019
@aslesarenko aslesarenko changed the title Finish implementation of Box.getReg Implementation of Box.getReg Dec 23, 2019
@aslesarenko aslesarenko modified the milestones: v6.0, v5.0 Sep 16, 2020
@aslesarenko aslesarenko added the 16h Approximately 16 hours or work label Sep 16, 2020
@aslesarenko aslesarenko modified the milestones: v5.0, v6.0 Apr 4, 2021
@greenhat greenhat removed their assignment Oct 8, 2021
@kushti
Copy link
Member Author

kushti commented Apr 15, 2024

could be done in frontend just ?

@aslesarenko
Copy link
Member

@kushti, no, it requires also a new ErgoTree operation.
This is because ExtractRegisterAs have registerId: RegisterId, which means it should be a concrete constant and cannot be an expression (because RegisterId is not Value).

The idea behind this method was to enable something like:

val regId = getVar[Int](1).get    // get register id from context
val regValue = box.getReg[Int](regId).get  //  get register value

@aslesarenko aslesarenko self-assigned this May 12, 2024
@kushti kushti added Bounty - 200 ERG and removed 16h Approximately 16 hours or work labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-consensus Area: Code used in consensus (i.e. transaction validation) Bounty - 200 ERG C-feature Category: Feature request or PR P3-low Priority: Low soft-fork Implementation requires soft-fork
Projects
None yet
Development

No branches or pull requests

4 participants