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

Change behavior of START_BLOCKHEIGHT when testing #417

Open
SebastienGllmt opened this issue Aug 11, 2024 · 0 comments
Open

Change behavior of START_BLOCKHEIGHT when testing #417

SebastienGllmt opened this issue Aug 11, 2024 · 0 comments

Comments

@SebastienGllmt
Copy link
Contributor

Thematically related to #414 and #413

Right now, when using Paima, resetting your database also resets the START_BLOCKHEIGHT. This makes sense in two ways:

  1. It avoids replaying any history from previous testing which might contain data you want to ignore
  2. You want to avoid spending time waiting for historical data to sync

However, this feature was built at a time before localhost testing was a thing. It makes both of these points mostly useless because

  1. You can just restart the chain entirely if you want to remove previous data
  2. You're just syncing locally, so it's really fast anyway

That is to say, this feature is not only unnecessary in the average case, it's also dangerous because of timers. By resetting your START_BLOCKHEIGHT, it will not affect standard transactions (which still trigger during the presync), but it will not trigger time-based actions (which don't run during the presync, and probably can't run then)

Ways we can solve this

  1. Remove the START_BLOCKHEIGHT reset (maybe make it optional behind a flag, since it is very situationally useful)
  2. Add a warn/error if a time-based action gets added to Paima while presync is happening
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

No branches or pull requests

1 participant