-
Notifications
You must be signed in to change notification settings - Fork 723
Feat/blocksimulate endpoint #6724
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
Open
rob-stacks
wants to merge
11
commits into
stacks-network:develop
Choose a base branch
from
rob-stacks:feat/blocksimulate_endpoint
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c0ab371
added no_fees mode
rob-stacks 33fd1e2
Merge branch 'develop' into feat/blocksimulate_endpoint
rob-stacks de360c6
refactored block_replay and block_simulate
rob-stacks 736c416
merged with develop
rob-stacks efc925e
merged with develop [2]
rob-stacks bf25dfb
updated openapi
rob-stacks a2232de
added test infrastructure
rob-stacks 6866632
fixed block simulation tests
rob-stacks 70b7b22
fixed typo
rob-stacks 7efbdcb
Merge branch 'develop' into feat/blocksimulate_endpoint
rob-stacks 04b6bbe
updated CHANGELOG
rob-stacks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I'm wrong, but the purpose of this endpoint is to faithfully re-execute a block. The block will almost certainly contain transactions for transferring assets between accounts (including STX). Disabling fee payment along with the commensurate nonce increment would likely invalidate or otherwise alter the execution of transactions, leading to an unfaithful block re-execution.
Can you help me understand what purpose is served by this feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The block simulator allows you to execute "brand-new" transactions in a block (mainly as a quick-test mechanism). The (current) main usage is to run contract deploys and calls at specific heights (for example i am using it as the base for some integration tests for the python bindings). It happens sometime (especially when randomly generating keys) that having STXs is convoluted (in practice you are running your functions in the past). For this reason having the ability to run stuff "for free" is quite handy. Obviously if it does pose some risk it is definitely a feature that can be removed without harming the main goal of the patch.