Bitcoin Forum
May 25, 2024, 02:05:33 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Setting Up a Service Need Advise  (Read 568 times)
Emerge (OP)
Legendary
*
Offline Offline

Activity: 854
Merit: 1000



View Profile
December 09, 2016, 12:27:46 AM
 #1

I've been working to create an API Service around Bitcoin. However there are a few things I dont understand yet, and I need simpler if not lay man's terms..

What exactly does SegWit do?
What would that mean if SegWit is used? and is it automatic?

Also,

Would Blockchain pruning have anything to do with the performance if I had to use it?
I'm using a development server and the entire blockchain cannot fit.

Regards,
JM Erestain
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6653


Just writing some code


View Profile WWW
December 09, 2016, 12:41:27 AM
 #2

What exactly does SegWit do?
Segwit removes the signatures from the txid calculation, does some stuff to increase the number of transactions to fit in a block, and makes sighashing O(n) instead of the current O(n^2).

What would that mean if SegWit is used?
Transactions that spend from segwit outputs will have a lower transaction fee that those that spend from non-segwit outputs. The txids of transactions that are composed entirely of segwit inputs (inputs spending from segwit outputs) have only one txid and cannot be malleated.

and is it automatic?
What do you mean by that?

Segwit is opt-in, i.e. you have to create transactions with segwit outputs in order to use segwit.

Would Blockchain pruning have anything to do with the performance if I had to use it?
I'm using a development server and the entire blockchain cannot fit.
It should not impact performance. However if something were to corrupt bitcoind's database, then you will have to redownload the entire blockchain.

Emerge (OP)
Legendary
*
Offline Offline

Activity: 854
Merit: 1000



View Profile
December 09, 2016, 02:57:47 PM
 #3

What exactly does SegWit do?
Segwit removes the signatures from the txid calculation, does some stuff to increase the number of transactions to fit in a block, and makes sighashing O(n) instead of the current O(n^2).

What would that mean if SegWit is used?
Transactions that spend from segwit outputs will have a lower transaction fee that those that spend from non-segwit outputs. The txids of transactions that are composed entirely of segwit inputs (inputs spending from segwit outputs) have only one txid and cannot be malleated.

and is it automatic?
What do you mean by that?

Segwit is opt-in, i.e. you have to create transactions with segwit outputs in order to use segwit.

Would Blockchain pruning have anything to do with the performance if I had to use it?
I'm using a development server and the entire blockchain cannot fit.
It should not impact performance. However if something were to corrupt bitcoind's database, then you will have to redownload the entire blockchain.

Thank you for your answers!!

Quote
What would that mean if SegWit is used?
Transactions that spend from segwit outputs will have a lower transaction fee that those that spend from non-segwit outputs. The txids of transactions that are composed entirely of segwit inputs (inputs spending from segwit outputs) have only one txid and cannot be malleated.

Does that mean that each transaction won't have a separate txid for itself? You'll have to look for the specific transaction inside 1 txid?

Would that mean if SegWit was used for a service then people would have to wait for a specific time for a withdrawal (for example)
I guess that would be great for faucet services or get paid to services and such if I understand this correctly
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6653


Just writing some code


View Profile WWW
December 09, 2016, 03:12:36 PM
 #4

Does that mean that each transaction won't have a separate txid for itself? You'll have to look for the specific transaction inside 1 txid?
No. A transaction without segwit inputs can be mslleated, meaning that it essentially can have more than one txid. A transaction with only segwit inputs cannot be malleated and thus it only has one txid.

This actually makes it easier for services as they only have to track one transaction for confirmations instead of all transactions related to an address.

Decoded
Legendary
*
Offline Offline

Activity: 1232
Merit: 1030


give me your cryptos


View Profile
December 14, 2016, 04:35:34 AM
 #5

Does that mean that each transaction won't have a separate txid for itself? You'll have to look for the specific transaction inside 1 txid?
No. A transaction without segwit inputs can be mslleated, meaning that it essentially can have more than one txid. A transaction with only segwit inputs cannot be malleated and thus it only has one txid.

This actually makes it easier for services as they only have to track one transaction for confirmations instead of all transactions related to an address.

I have a question. When it comes to transaction fees, I understand that transactions using the segwit protocol will have a smaller fee, because they have a smaller transaction size as the fee is calculated in a Satoshi to byte ratio.

So currently if I switch to Segwit, will my transactions be rejected by the network until we reach a 95% consensus? Or will segwit not be enabled until my client sees that 95% or more of the network is using segwit compatible clients and they all will turn in at the same time?

Because if I can currently make a legitimate transaction through segwit, I can spend less on fees and/or get priority over transactions with my same fee.

looking for a signature campaign, dm me for that
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6653


Just writing some code


View Profile WWW
December 14, 2016, 04:41:43 AM
 #6

So currently if I switch to Segwit, will my transactions be rejected by the network until we reach a 95% consensus? Or will segwit not be enabled until my client sees that 95% or more of the network is using segwit compatible clients and they all will turn in at the same time?
If you were to make a segwit transaction now, it would not work. The rules for segwit only become active after deployment is complete. Deployment is not related to how many nodes are running segwit nodes but rather how many blocks in the last retarget period signalled support for segwit.

If you were to make a segwit transaction now, it would be seen as a non-standard anyone-can-spend transaction. The segwit serialization format would also not be active so nodes would not recognize that you sent a valid transaction.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!