Need help understanding a few technicalities about the working of Steemit.com. Discussions are appreciated and encouraged.

in #steemit7 years ago (edited)

Hi, I hope you all are doing well. It's been quite a while since made my last post. I have also been inactive in the chats because I don't remember my passwords and google is unable to verify me without the OTP sent to my (inactive) phone number. Anyway, I thought I'd ask these questions personally on chat to the crypto-experts but being locked out, this post is my alternative.

Q1. How does the data flow on Steemit i.e. what exactly happens after I click the post button?

A] How exactly are the blocks produced by the witness nodes and how are the transactions processed? 

B] If a witness has never missed a block since the genesis block, does it mean
   that the witness node has stored all the data ever written on the steem blockchain?

C] Assuming we don't have a PoW consensus: if no accounts are created
   and no posts/comments/upvotes are made after block N, 
   do the witness nodes remain idle until a transaction is initiated 
   or a new block N+1 with no transactions is created  after 3 seconds anyway?
                         
 D] When I read a post on Steemit, where is the data fetched and rendered from? Is it fetched from Steemit servers
       or is it fetched from one of the witness nodes - since it is supposed to be decentralized?

E] Taking an example of the [first steemit post](https://steemd.com/b/174444) by @steemit, I'd like to understand what role
    did witness @fattire's node play in creation and writing of the post on the blockchain. *It relates to the sub-question A.*



Q2. How do witnesses sign the transactions and what are the differences between the marked transactions?
understandingSteem.PNG

Any feedback would be valuable.

Sort:  

No takers?
Well then...

1A] Transactions are hashed and signed with the sender's key, all the valid unconfirmed transactions are hashed and signed with the witnesses' key.

1B] Every node has all blocks. A witness missing a block means it's not produced one when it should have. This means that the unconfirmed transactions need 3s more to get a confirmation by the next witness.

1C] Blocks can be empty

1D] Steemit runs its own servers, and could theoretically deliver whatever they want. But everyone can get their own copy of the blockchain to confirm. Witness nodes are not related to that - they only sign and broadcast the blocks that every other node adds to their own copy of the chain. They do not serve data, those servers are highly secured and locked down.

1E] I assume he created the block - that means it was his turn to produce a block when the post was published, and he did his job.

Q2 see 1A

Thanks a lot @pharesim!
In 1A, you mentioned

all the valid unconfirmed transactions are hashed and signed with the witnesses' key.

What exactly makes a transaction valid or invalid?

From the steemit github code of transaction.cpp

 void transaction::validate() const
 {
   FC_ASSERT( operations.size() > 0, "A transaction must have at least one operation", ("trx",*this) );
   for( const auto& op : operations )
   operation_validate(op);
}

In line number 37,

FC_ASSERT( operations.size() > 0, "A transaction must have at least one operation", ("trx",*this) );

Is that the condition that makes any transaction valid?
I'm assuming that a witness node also verifies whether the signature of the poster on the transaction is valid or invalid. If it does verify the signature, how does it do it exactly?

1D] So, is it really decentralized if all the operations always hit the Steemit servers?

1A] That's one condition. There are others, operations need to be in a specific format for example. And the signature gets checked of course. There's a function to receive the signer's public key from it.

1D] steemIT is a centralized service using the decentralized steem blockchain. You always interact with one node only, and by using this site you choose the one it communicates with. Other platforms like busy.org or eSteem probably use another node. The nodes are all in consensus, so it doesn't really matter as long as you trust the service provider to run an unmodified steem node.

Thanks a ton! Makes it a lot clearer now. I'll try to find that function and will try to look a little deeper into it. Thanks again! I hope you're doing well.

Coin Marketplace

STEEM 0.36
TRX 0.12
JST 0.040
BTC 70446.49
ETH 3571.68
USDT 1.00
SBD 4.73