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

New CAIP - Block Addressing model #220

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bumblefudge
Copy link
Collaborator

No description provided.

@bumblefudge bumblefudge changed the title Strawman of block-addressing CAIP New CAIP - Block Addressing model Mar 20, 2023
@obstropolos
Copy link
Contributor

obstropolos commented Apr 6, 2023

Hey @TimDaub @titusz @ntn-x2 @sposth - would love your eyes on this - it's just a strawman for now, so nothing too formal.

Copy link

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

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

Promi

CAIPs/caip-220.md Outdated Show resolved Hide resolved

```
block_address: chain_id + ":block/" + account_address + ["." + property]?
chain_id: [-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32} (See [CAIP-2][])
Copy link

Choose a reason for hiding this comment

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

Do we need to repeat the definition of chain_id in all documents that use it? Wouldn't just linking to it be enough? I see that otherwise managing all occurrences might be hell.

```
block_address: chain_id + ":block/" + account_address + ["." + property]?
chain_id: [-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32} (See [CAIP-2][])
block_height: [-%a-zA-Z0-9]{1,128}
Copy link

Choose a reason for hiding this comment

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

I guess this has been superseded by the property field?

Blocks are addressed as follows:

```
block_address: chain_id + ":block/" + account_address + ["." + property]?
Copy link

Choose a reason for hiding this comment

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

How is account_address defined?

block_address: chain_id + ":block/" + account_address + ["." + property]?
chain_id: [-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32} (See [CAIP-2][])
block_height: [-%a-zA-Z0-9]{1,128}
property (optional): (hash|height|time|nonce|prev|txncount|data)
Copy link

Choose a reason for hiding this comment

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

Do we care about aliasing? For some chains, hash and height can be used interchangeably. So we would have to different identifiers for the same resource.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i think the semantics of this enum, and more importantly the valid SUBSET of it, would be defined per-namespace in profiles, right? that's a really good shout-out, i should update the normative text to make this more explicit.

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.

4 participants