Skip to content

Conversation

@wileyj
Copy link
Contributor

@wileyj wileyj commented May 9, 2023

Description

This close to a full rewrite of the built image. The filename is also changed to a more appropriate rosetta.Dockerfile

  • runit is removed
  • /entrypoint.sh now starts all processes via single script
  • all logs are printed to stdout
  • remove printf in favor of heredoc
  • add a script to seed the chainstate when env var SEED_CHAINSTATE=true
  • adds a postgres init script in case of genesis sync and DB != postgres

Type of Change

  • New feature
  • Bug fix
  • API reference/documentation update
  • Other

Does this introduce a breaking change?

N/A

Testing information

Tested by building the docker image and launching with:

  • Testnet without seeding the chainstate
  • Testnet with seeding the chainstate
  • Mainnet without seeding the chainstate
  • Mainnet with seeding the chainstate

In all cases, the chain progressed - of note, seeding the chainstate by supplying the env var: SEED_CHAINSTATE=true only works if the archives for the defined versions exists (at this moment, there is not 2.3.0.0.2 archive available, but was tested with 2.3.0.0.1). Also note that the time to process an archive can be highly variable depending on the system.

The other caveat to this change is that when SEED_CHAINSTATE=true, the container will need to be launched with --shm-size.
ex: --shm-size=256MB

Else, postgres will crash with an error regarding "out of space" (this applies to memory, not disk. details here: https://stackoverflow.com/questions/56751565/pq-could-not-resize-shared-memory-segment-no-space-left-on-device )

This close to a full rewrite of the built image.
- runit is removed
- `/entrypoint.sh` now starts all processes via single script
- all logs are piped to stdout
- remove printf in favor of heredoc
- add a script to seed the chainstate when env var `SEED_CHAINSTATE=true`
- adds a postgres init script in case of genesis sync and DB != `postgres`
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Merging #1651 (877d68a) into develop (14bb9f2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1651   +/-   ##
========================================
  Coverage    78.13%   78.13%           
========================================
  Files           79       79           
  Lines        11241    11241           
  Branches      2495     2495           
========================================
  Hits          8783     8783           
  Misses        2344     2344           
  Partials       114      114           

Copy link
Contributor

@zone117x zone117x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @wileyj! This looks super helpful. Awesome way to use the archives 💯

Left a couple minor comments, otherwise LGTM!

Copy link
Contributor

@zone117x zone117x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh there's also a few references to the file that need to be updated with the rename, this CI build in particular here:

file: docker/stx-rosetta.Dockerfile

The others are in markdown docs

@wileyj
Copy link
Contributor Author

wileyj commented May 10, 2023

Oh there's also a few references to the file that need to be updated with the rename, this CI build in particular here:

file: docker/stx-rosetta.Dockerfile

The others are in markdown docs

got it - i'll address when i make the other changes

updating docs where stx-rosetta is used
add some docs around `SEED_CHAINSTATE`
add -W to pg_ctl and removing sleep
@wileyj wileyj requested a review from zone117x May 10, 2023 18:12
@github-actions github-actions bot temporarily deployed to commit May 17, 2023 16:33 Inactive
@github-actions github-actions bot temporarily deployed to pull request May 17, 2023 16:33 Inactive
Copy link
Contributor

@zone117x zone117x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @wileyj!

@zone117x zone117x merged commit b050b1b into hirosystems:develop May 19, 2023
@blockstack-devops
Copy link
Contributor

🎉 This PR is included in version 7.2.0-beta.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@blockstack-devops
Copy link
Contributor

🎉 This PR is included in version 7.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants