Post
Topic
Board Development & Technical Discussion
Merits 5 from 4 users
Re: Sharding strategy held together by atomic swaps
by
aliashraf
on 14/02/2019, 12:17:55 UTC
⭐ Merited by ETFbitcoin (2) ,fatca (1) ,LeGaulois (1) ,mda (1)
Do you think that a sharding strategy for bitcoin could be viable? If not, let me know your objections!
A sharding strategy works, but not yours ...

Quote
If you hold funds on network 47, and you need to pay to network 12, it means that there needs to be an atomic swap network,
It is the problem you are apparently trying to solve. But why this problem does ever exist? Because of your bad sharding strategy.

Firstly it is impractical:
  • We have P2SH and segwit transactions that doesn't include RIPEMD-160 hash of a public key (a bitcoin address)
  • We have m of n type utxos with multiple addresses included
  • We have other non-standard transaction types as well.
.
Generally speaking, Utxos are not about addresses that receive money they are output scripts that may or may not contain one or more bitcoin addresses, hence it is not feasible to partition them with an address base strategy.

Secondly it causes the intra-shard problem (you try to solve by atomic swaps between shards) which is not solvable anyway unless for very simple use cases and with higher fees and it disturbs user experience and destroys seamless monolithic behavior of the network.

Thirdly your proposal is silent about the most important sharding problem: sharding of the state

Alternatively I support sharding based on transaction hash i.e. state sharding.
It would be easy to avoid intra-shard transactions (instead of dealing with them) by requiring wallets to follow simple rules that guarantees two key points:
1- Always spend from same shard in each transaction.
2- Make transaction to fall in the same shard as inputs by using a small entropy(nonce).

See? No intra-shard transactions, no need to swaps, no headaches. There is more to discuss about this scheme but I'm really busy with more urgent problems in bitcoin, so accept my apologies for not contributing actively.