-
Notifications
You must be signed in to change notification settings - Fork 118
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
Not possible to import BNS data without first syncing #1327
Comments
Makes sense. One of the reasons for this change was to get the genesis block info required for correctly importing BNS, which we can't know if importing from scratch. We still have the Perhaps we could add a new field like @rafaelcr thoughts? |
That's a good idea @zone117x ... we should aim for a solution that works both for event replay and genesis sync, and this sounds like it could fit the bill. |
Fixed in #1441 |
From conversation with @rafaelcr and related issue: stacks-network/stacks-blockchain-docker#90
With the release of v5.0.0,
BNS_IMPORT_DIR
is no longer used during starting the API normally.In previous versions of the API, with this env var defined - the API would process the BNS data and add DB records.
In v5.0.0, i understand this work is being offloaded to the event-replay function. In my testing, i noticed that starting the API normally alongside postgres and a stacks-blockchain node (with
STACKS_EXPORT_EVENTS_FILE
defined) works as expected and the tsv file is populated with blocks.Stopping the API after a few blocks, then running the event-replay allows the BNS data to be imported normally.
What doesn't work (and i think this would be the use case for most people) is importing BNS data before running the API normally (i.e. syncing from genesis).
import-events
function will fail on file not found (expected)tl;dr - it's not possible to import BNS data until you've started the API normally and synced a few blocks. I believe it should be possible via cmd-line switch or natively to import this BNS data before you start syncing the API.
The text was updated successfully, but these errors were encountered: