Skip to content

Identicons for contracts#266

Open
friedger wants to merge 4 commits into
stacksgov:mainfrom
friedger:feat/sip-identicon-for-contracts
Open

Identicons for contracts#266
friedger wants to merge 4 commits into
stacksgov:mainfrom
friedger:feat/sip-identicon-for-contracts

Conversation

@friedger
Copy link
Copy Markdown
Contributor

This SIP describes how contracts can be identified by visual identifiers. It used (clarity-hash? current-contract) for minidenticons as used in source-of-clarity:

image

Copy link
Copy Markdown
Contributor

@314159265359879 314159265359879 left a comment

Choose a reason for hiding this comment

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

Thanks for creating this SIP @friedger this sounds convenient way to verify contract code copies. This is already of high quality and almost ready for editor sign-off.

I have added some in line editorial comments when I'd like something rewritten I do my best to offer concrete suggestions to choose from or use for your own rewrite.

I would like to suggest one important design clarification which can be added as a separate section.


Design clarification: code identity vs principal identity

The code identicon is advisory and supplements the contract principal. To prevent visual conflation of code identity with address identity, implementations SHOULD:

  • Display the code identicon adjacent to the contract principal ({deployer}.{name}) with a clear visual hierarchy or label indicating it represents source code, not contract address.
  • Optionally display a separate principal-based identicon (derived from SHA-256(principal)) to make address divergence visually apparent. Two deployments of identical code to different principals would then show: identical code icons, distinct address icons.

This dual approach prevents users from assuming 'same icon = same contract' when they may be interacting with different deployments.

Comment thread sips/sip-xxx/sip-xxx-identicon-for-contracts.md Outdated
Comment thread sips/sip-xxx/sip-xxx-identicon-for-contracts.md Outdated
Comment thread sips/sip-xxx/sip-xxx-identicon-for-contracts.md Outdated
Comment thread sips/sip-xxx/sip-xxx-identicon-for-contracts.md Outdated
Comment thread sips/sip-xxx/sip-xxx-identicon-for-contracts.md Outdated
Comment thread sips/sip-xxx/sip-xxx-identicon-for-contracts.md Outdated
@friedger
Copy link
Copy Markdown
Contributor Author

Thank you for the feedback. Comments have been incorporated @314159265359879

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.

2 participants