Skip to content

feat: runtime chain-hash, chain-id and chain-name#3027

Draft
vmmon wants to merge 7 commits into
Sovereign-Labs:devfrom
vmmon:bk/dynamic-chain-data
Draft

feat: runtime chain-hash, chain-id and chain-name#3027
vmmon wants to merge 7 commits into
Sovereign-Labs:devfrom
vmmon:bk/dynamic-chain-data

Conversation

@vmmon

@vmmon vmmon commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

Summary of the changes...

  • I have updated CHANGELOG.md with a new entry if my PR makes any breaking changes or fixes a bug. If my PR removes a feature or changes its behavior, I provide help for users on how to migrate to the new behavior.
  • I have carefully reviewed all my Cargo.toml changes before opening the PRs. (Are all new dependencies necessary? Is any module dependency leaked into the full-node (hint: it shouldn't)?)

Linked Issues

  • Fixes # (issue, if applicable)
  • Related to # (issue)

Testing

Describe how these changes were tested. If you've added new features, have you added unit tests?

Docs

Describe where this code is documented. If it changes a documented interface, have the docs been updated?

Rendered docs are available at https://sovlabs-ci-rustdoc-artifacts.us-east-1.amazonaws.com/<BRANCH_NAME>/index.html

@vmmon
vmmon force-pushed the bk/dynamic-chain-data branch from 4250f0f to 627d64b Compare July 14, 2026 17:24
@vmmon
vmmon force-pushed the bk/dynamic-chain-data branch 5 times, most recently from 208a8d8 to e4b1ef2 Compare July 14, 2026 23:03
@vmmon
vmmon force-pushed the bk/dynamic-chain-data branch 2 times, most recently from 715c243 to 8dc9a91 Compare July 15, 2026 14:01
@vmmon
vmmon force-pushed the bk/dynamic-chain-data branch from 8dc9a91 to f300b27 Compare July 15, 2026 14:36
@vmmon

vmmon commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Patching the binary on Linux is straightforward with objdump --dump-section and a objdump --update-section.

Patching the binary on MacOS can be done with:

#!/bin/sh

set -e
FILE=$1
OFFSET=$(otool -l $FILE | grep __CONSTANTS -A 5 | grep offset | cut -c 12-)
SIZE=$(otool -l $FILE | grep __CONSTANTS -A 5 | grep size | cut -c 12-)


TMPFILE=$(mktemp)
dd of=$TMPFILE if=$FILE bs=1 skip=$OFFSET count=$SIZE status=none
vi $TMPFILE
dd if=$TMPFILE of=$FILE bs=1 conv=notrunc seek=$OFFSET count=$SIZE status=none
codesign --remove-signature $FILE
codesign -s - $FILE

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

Successfully merging this pull request may close these issues.

1 participant