What happens to a transaction after you clicked 'send' in Ethereum network?[Transaction life cycle at the EVM and P2P networking level]?










1















Ref: What happens when you type in an URL in the browser



So in a web browser, it's kinda easy to reason the life cycle of an HTTP request, how it moves down the network stack, reach the server, get a response and travel back up to my browser and gets rendered as a web page.



var contractAbi = eth.contract(AbiOfContract);
var myContract = contractAbi.at(contractAddress);
// suppose you want to call a function named myFunction of myContract
var getData = myContract.myFunction.getData(function parameters);
//finally paas this data parameter to send Transaction
web3.eth.sendTransaction(to:Contractaddress, from:Accountaddress, data: getData);


What happens when I type the following code in a geth console of a 2 node private Ethereum network(1 full pair node, 1 mining node)? Let's say we are running a light client.



  1. The raw request(JSON RPC) would be sent to 1 of the 2 nodes or broadcast to both of the 2 node at the same time?

  2. How is the p2p module involved in the whole picture? Just maintain the alist of nodes in the entire 2-node network or just a subset?

  3. What happens when the raws request reach the first Ethereum node or second? Does it differ (first or sencond)?

  4. How is EVM work in the picture if I treat it as an blackbox? How the interface look like(input, output)?

EDIT 1: Let's assumming we are using POW. But since there is only one single mining node, POA is fine as well?



EDIT 2: In terms of performing the computation of the transaction(eg. 1+1), how do the mining node(say POA) and normal peer full node differ if they do differ?



EDIT 3: This articledid a great job at explaining on a higher level how a transaction get validated by all the nodes and only get "run" by the mining node, and after being included into the mining node, how a block get broadcasted and its transactions get further validated and propagated until the sender pickup the EVM logs. But how exactly EVM "crunch" the transactions and mutate the state? and how the p2p modules maintain all the nodes?



EDIT 4: this is another nice short read summarizing it as : construct->sign->broadcast->mine



enter image description here
found this cool image here










share|improve this question




























    1















    Ref: What happens when you type in an URL in the browser



    So in a web browser, it's kinda easy to reason the life cycle of an HTTP request, how it moves down the network stack, reach the server, get a response and travel back up to my browser and gets rendered as a web page.



    var contractAbi = eth.contract(AbiOfContract);
    var myContract = contractAbi.at(contractAddress);
    // suppose you want to call a function named myFunction of myContract
    var getData = myContract.myFunction.getData(function parameters);
    //finally paas this data parameter to send Transaction
    web3.eth.sendTransaction(to:Contractaddress, from:Accountaddress, data: getData);


    What happens when I type the following code in a geth console of a 2 node private Ethereum network(1 full pair node, 1 mining node)? Let's say we are running a light client.



    1. The raw request(JSON RPC) would be sent to 1 of the 2 nodes or broadcast to both of the 2 node at the same time?

    2. How is the p2p module involved in the whole picture? Just maintain the alist of nodes in the entire 2-node network or just a subset?

    3. What happens when the raws request reach the first Ethereum node or second? Does it differ (first or sencond)?

    4. How is EVM work in the picture if I treat it as an blackbox? How the interface look like(input, output)?

    EDIT 1: Let's assumming we are using POW. But since there is only one single mining node, POA is fine as well?



    EDIT 2: In terms of performing the computation of the transaction(eg. 1+1), how do the mining node(say POA) and normal peer full node differ if they do differ?



    EDIT 3: This articledid a great job at explaining on a higher level how a transaction get validated by all the nodes and only get "run" by the mining node, and after being included into the mining node, how a block get broadcasted and its transactions get further validated and propagated until the sender pickup the EVM logs. But how exactly EVM "crunch" the transactions and mutate the state? and how the p2p modules maintain all the nodes?



    EDIT 4: this is another nice short read summarizing it as : construct->sign->broadcast->mine



    enter image description here
    found this cool image here










    share|improve this question


























      1












      1








      1


      1






      Ref: What happens when you type in an URL in the browser



      So in a web browser, it's kinda easy to reason the life cycle of an HTTP request, how it moves down the network stack, reach the server, get a response and travel back up to my browser and gets rendered as a web page.



      var contractAbi = eth.contract(AbiOfContract);
      var myContract = contractAbi.at(contractAddress);
      // suppose you want to call a function named myFunction of myContract
      var getData = myContract.myFunction.getData(function parameters);
      //finally paas this data parameter to send Transaction
      web3.eth.sendTransaction(to:Contractaddress, from:Accountaddress, data: getData);


      What happens when I type the following code in a geth console of a 2 node private Ethereum network(1 full pair node, 1 mining node)? Let's say we are running a light client.



      1. The raw request(JSON RPC) would be sent to 1 of the 2 nodes or broadcast to both of the 2 node at the same time?

      2. How is the p2p module involved in the whole picture? Just maintain the alist of nodes in the entire 2-node network or just a subset?

      3. What happens when the raws request reach the first Ethereum node or second? Does it differ (first or sencond)?

      4. How is EVM work in the picture if I treat it as an blackbox? How the interface look like(input, output)?

      EDIT 1: Let's assumming we are using POW. But since there is only one single mining node, POA is fine as well?



      EDIT 2: In terms of performing the computation of the transaction(eg. 1+1), how do the mining node(say POA) and normal peer full node differ if they do differ?



      EDIT 3: This articledid a great job at explaining on a higher level how a transaction get validated by all the nodes and only get "run" by the mining node, and after being included into the mining node, how a block get broadcasted and its transactions get further validated and propagated until the sender pickup the EVM logs. But how exactly EVM "crunch" the transactions and mutate the state? and how the p2p modules maintain all the nodes?



      EDIT 4: this is another nice short read summarizing it as : construct->sign->broadcast->mine



      enter image description here
      found this cool image here










      share|improve this question
















      Ref: What happens when you type in an URL in the browser



      So in a web browser, it's kinda easy to reason the life cycle of an HTTP request, how it moves down the network stack, reach the server, get a response and travel back up to my browser and gets rendered as a web page.



      var contractAbi = eth.contract(AbiOfContract);
      var myContract = contractAbi.at(contractAddress);
      // suppose you want to call a function named myFunction of myContract
      var getData = myContract.myFunction.getData(function parameters);
      //finally paas this data parameter to send Transaction
      web3.eth.sendTransaction(to:Contractaddress, from:Accountaddress, data: getData);


      What happens when I type the following code in a geth console of a 2 node private Ethereum network(1 full pair node, 1 mining node)? Let's say we are running a light client.



      1. The raw request(JSON RPC) would be sent to 1 of the 2 nodes or broadcast to both of the 2 node at the same time?

      2. How is the p2p module involved in the whole picture? Just maintain the alist of nodes in the entire 2-node network or just a subset?

      3. What happens when the raws request reach the first Ethereum node or second? Does it differ (first or sencond)?

      4. How is EVM work in the picture if I treat it as an blackbox? How the interface look like(input, output)?

      EDIT 1: Let's assumming we are using POW. But since there is only one single mining node, POA is fine as well?



      EDIT 2: In terms of performing the computation of the transaction(eg. 1+1), how do the mining node(say POA) and normal peer full node differ if they do differ?



      EDIT 3: This articledid a great job at explaining on a higher level how a transaction get validated by all the nodes and only get "run" by the mining node, and after being included into the mining node, how a block get broadcasted and its transactions get further validated and propagated until the sender pickup the EVM logs. But how exactly EVM "crunch" the transactions and mutate the state? and how the p2p modules maintain all the nodes?



      EDIT 4: this is another nice short read summarizing it as : construct->sign->broadcast->mine



      enter image description here
      found this cool image here







      go-ethereum evm devp2p mastering-ethereum






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 13 '18 at 9:36







      noooooooob

















      asked Nov 13 '18 at 0:49









      noooooooobnoooooooob

      1649




      1649




















          1 Answer
          1






          active

          oldest

          votes


















          3














          You're missing the mining process. You should really explore it for a better understanding.



          Transactions will be sent to one of the nodes which will broadcast the transaction to the other(s). Concurrency and order isn't important because although the transactions will eventually be known to all nodes, none of the nodes will do any transaction processing at this stage.



          Someone will mine a block. It could be PoA, POW, something else. It doesn't matter as long as all/both nodes can agree on block validity. Eventually, not simultaneously, all nodes will be made aware of the new block.



          Blocks are well-ordered sets of transactions. So, both nodes will eventually agree on a transaction order. By extension, the nodes will agree on the state at each block height.



          Transactions are processed in the order they appear in the mined blocks.



          Hope it helps.






          share|improve this answer























          • So how do EVM "run" an transaction and when does it happen? during propagation or only happens when a miner node decides to include a tx into a block?

            – noooooooob
            Nov 13 '18 at 9:33











          • Nodes run transactions when they appear in a block.

            – Rob Hitchens
            Nov 13 '18 at 13:20










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "642"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fethereum.stackexchange.com%2fquestions%2f62224%2fwhat-happens-to-a-transaction-after-you-clicked-send-in-ethereum-networktran%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          You're missing the mining process. You should really explore it for a better understanding.



          Transactions will be sent to one of the nodes which will broadcast the transaction to the other(s). Concurrency and order isn't important because although the transactions will eventually be known to all nodes, none of the nodes will do any transaction processing at this stage.



          Someone will mine a block. It could be PoA, POW, something else. It doesn't matter as long as all/both nodes can agree on block validity. Eventually, not simultaneously, all nodes will be made aware of the new block.



          Blocks are well-ordered sets of transactions. So, both nodes will eventually agree on a transaction order. By extension, the nodes will agree on the state at each block height.



          Transactions are processed in the order they appear in the mined blocks.



          Hope it helps.






          share|improve this answer























          • So how do EVM "run" an transaction and when does it happen? during propagation or only happens when a miner node decides to include a tx into a block?

            – noooooooob
            Nov 13 '18 at 9:33











          • Nodes run transactions when they appear in a block.

            – Rob Hitchens
            Nov 13 '18 at 13:20















          3














          You're missing the mining process. You should really explore it for a better understanding.



          Transactions will be sent to one of the nodes which will broadcast the transaction to the other(s). Concurrency and order isn't important because although the transactions will eventually be known to all nodes, none of the nodes will do any transaction processing at this stage.



          Someone will mine a block. It could be PoA, POW, something else. It doesn't matter as long as all/both nodes can agree on block validity. Eventually, not simultaneously, all nodes will be made aware of the new block.



          Blocks are well-ordered sets of transactions. So, both nodes will eventually agree on a transaction order. By extension, the nodes will agree on the state at each block height.



          Transactions are processed in the order they appear in the mined blocks.



          Hope it helps.






          share|improve this answer























          • So how do EVM "run" an transaction and when does it happen? during propagation or only happens when a miner node decides to include a tx into a block?

            – noooooooob
            Nov 13 '18 at 9:33











          • Nodes run transactions when they appear in a block.

            – Rob Hitchens
            Nov 13 '18 at 13:20













          3












          3








          3







          You're missing the mining process. You should really explore it for a better understanding.



          Transactions will be sent to one of the nodes which will broadcast the transaction to the other(s). Concurrency and order isn't important because although the transactions will eventually be known to all nodes, none of the nodes will do any transaction processing at this stage.



          Someone will mine a block. It could be PoA, POW, something else. It doesn't matter as long as all/both nodes can agree on block validity. Eventually, not simultaneously, all nodes will be made aware of the new block.



          Blocks are well-ordered sets of transactions. So, both nodes will eventually agree on a transaction order. By extension, the nodes will agree on the state at each block height.



          Transactions are processed in the order they appear in the mined blocks.



          Hope it helps.






          share|improve this answer













          You're missing the mining process. You should really explore it for a better understanding.



          Transactions will be sent to one of the nodes which will broadcast the transaction to the other(s). Concurrency and order isn't important because although the transactions will eventually be known to all nodes, none of the nodes will do any transaction processing at this stage.



          Someone will mine a block. It could be PoA, POW, something else. It doesn't matter as long as all/both nodes can agree on block validity. Eventually, not simultaneously, all nodes will be made aware of the new block.



          Blocks are well-ordered sets of transactions. So, both nodes will eventually agree on a transaction order. By extension, the nodes will agree on the state at each block height.



          Transactions are processed in the order they appear in the mined blocks.



          Hope it helps.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 13 '18 at 1:46









          Rob HitchensRob Hitchens

          28.8k74482




          28.8k74482












          • So how do EVM "run" an transaction and when does it happen? during propagation or only happens when a miner node decides to include a tx into a block?

            – noooooooob
            Nov 13 '18 at 9:33











          • Nodes run transactions when they appear in a block.

            – Rob Hitchens
            Nov 13 '18 at 13:20

















          • So how do EVM "run" an transaction and when does it happen? during propagation or only happens when a miner node decides to include a tx into a block?

            – noooooooob
            Nov 13 '18 at 9:33











          • Nodes run transactions when they appear in a block.

            – Rob Hitchens
            Nov 13 '18 at 13:20
















          So how do EVM "run" an transaction and when does it happen? during propagation or only happens when a miner node decides to include a tx into a block?

          – noooooooob
          Nov 13 '18 at 9:33





          So how do EVM "run" an transaction and when does it happen? during propagation or only happens when a miner node decides to include a tx into a block?

          – noooooooob
          Nov 13 '18 at 9:33













          Nodes run transactions when they appear in a block.

          – Rob Hitchens
          Nov 13 '18 at 13:20





          Nodes run transactions when they appear in a block.

          – Rob Hitchens
          Nov 13 '18 at 13:20

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Ethereum Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fethereum.stackexchange.com%2fquestions%2f62224%2fwhat-happens-to-a-transaction-after-you-clicked-send-in-ethereum-networktran%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

          Crossroads (UK TV series)

          ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế