Skip to content

Proposals for Blockstore scaling #196

@shea256

Description

@shea256

@muneeb-ali @jcnelson @guylepage3 and I all had a discussion about the updates we can make to scale Blockstore, and I would like to continue our discussion here.

We discussed a bunch of ideas, and here are the ones I suggest we focus on:

1. Use mutable storage for profile updates

At the moment, each profile update results in a transaction on the bitcoin network, updating the immutable data item associated with a name.

In the very near future, we are going to move to a system where the data item associated with a name is simply instructions for how to resolve names to profile data. This is just like the zone files used by the traditional DNS system, which provide instructions for how to resolve names to IP addresses.

This allows us to cut our update transactions down to 1 per user upon registration, plus 1 for each time a user updates its data storage provider.

2. Pack multiple name registrations into OP_RETURN transactions

We could start packing multiple name registration operations into each transaction. We could have the operation data start with the prefix and end with a TLD that applies to all names in the operation. Then, in the center we pack all the names and separate them by commas.

In addition, we could bump up our OP_RETURN data usage from 40 bytes to 80 bytes, giving us even more room.

For perspective, we'd be able to register the following number of names:

2 x 37-character names
4 x 18-character names
6 x 12-character names
8 x 9-character names
10 x 7-character names
12 x 6-character names

Note: the character counts given above do not include the TLDs

3. Implement operation packing for updates, revokes, and renews

We've discussed how operation packing for updates is very simple. Each update tree can be processed independently and if a tree gets missed, the system can still make progress.

The same is actually true for revokes and renews.

Transfers are more complicated, however. If one transfer is missed, nodes cannot know that they have the right name ownership information.

4. Implement operation chaining to allow for transfer packing

We can support transfer packing by using name-specific operation chaining, where each name operation references the previous operation. Thus, if a node sees a transfer or update, it will be able to determine whether it was valid or not because it can simply see if it has the full chain since registration.

Registration packing, though, is a completely different beast. Essentially, missing individual name registrations is an unacceptable scenario and results in very bad things. Thus, perfect operation tree broadcasting is a pre-requisite. We've discussed ways to accomplish this, but it seems that things got complicated very quickly and I don't think we've fully thought through all possible failure scenarios. There's a much longer conversation to be had here, but I think we should push off registration packing for now.

Where this will get us

At the current block size of 1MB, miners can pack up to about 2000 transactions per block. At that rate, the bitcoin blockchain can support 100M transactions per year.

2000*144*365 = 105,120,000

Conceivably, in the best best case scenario of blockchain ID registration growth, we could make up 10% of Bitcoin transaction volume, in which case, we'd be able to do 10M transactions per year at current block sizes.

If all non-registration operations were packed and all preorders were bulk preorders, the vast majority of this (99.9%) would be registration transactions. That means that 5M name registration transactions could be issued per year.

Now... it is very realistic that blocks will hit 8MB in 5 years time. In that case, we'd be able to do 80M name registrations per year (if we packed two names in per TX), which should be more than enough.

Remember that these calculations are just for ensuring that we can handle a scenario where this system gets as big as Facebook. This is not expected, and so we do not have any expectations or plans to clog up bitcoin transaction volume.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions