How to start multiple validators in hyperledger sawtooth?












0















How to start multiple validators in hyperledger sawtooth and synchronize them?



Deploy same transaction processor on both of them ?










share|improve this question



























    0















    How to start multiple validators in hyperledger sawtooth and synchronize them?



    Deploy same transaction processor on both of them ?










    share|improve this question

























      0












      0








      0








      How to start multiple validators in hyperledger sawtooth and synchronize them?



      Deploy same transaction processor on both of them ?










      share|improve this question














      How to start multiple validators in hyperledger sawtooth and synchronize them?



      Deploy same transaction processor on both of them ?







      hyperledger hyperledger-sawtooth






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 26 '18 at 6:59









      yash vadhvaniyash vadhvani

      1508




      1508
























          2 Answers
          2






          active

          oldest

          votes


















          0














          If you want multiple nodes on the same machine, with no VM, you need to have each node with its own set of TCP ports and own log/data file directories.



          Use $SAWTOOTH_HOME to set a different base directory for each node.
          Use the sawtooth-validator --bind options to set different ports for each node (network, component, consensus) and for the REST API in sawtooth-rest-api --bind and --connect options.



          Here's an example for one node:
          sudo -u sawtooth sawtooth-validator
          --bind component:tcp://127.0.0.1:4004
          --bind network:tcp://127.0.0.1:8800
          --endpoint tcp://127.0.0.1:8800
          --peering static --peers tcp://127.0.0.1:8801



          And for the REST API:
          sudo -u sawtooth sawtooth-rest-api --connect tcp://127.0.0.1:4004
          --bind 127.0.0.1:8008

          Then setup another node using port 8801, 4005 and 8009, for example, for the network, component, and REST API ports. Set $SAWTOOTH_HOME to be different for each one.



          Here's a full working example, similar to the above (just extract the command line parts and run directly):
          https://lists.hyperledger.org/g/sawtooth/topic/networking_validators_running/18059074?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,80,18059074






          share|improve this answer































            2














            Basically it is starting all the same things you started on the first machine on each subsequent node with a few exceptions:




            • Only one node should establish the genesis batch

            • You may or may not need to set the -peers list on the validator command line or configuration file

            • The validators will find each other and synchronize the blocks. This is why you must run the same transaction processors (TPs) on each node as well.






            share|improve this answer
























            • How to run a TP on both Validators?

              – yash vadhvani
              Nov 27 '18 at 5:28











            • I am not able to run two validators please provide me the command

              – yash vadhvani
              Nov 27 '18 at 6:08











            • Can You tell me how to do this practically

              – yash vadhvani
              Nov 27 '18 at 6:20











            • Are you running from Docker or the command line?

              – Frank C.
              Nov 27 '18 at 10:44






            • 1





              Here are the docs for 1.0.5 sawtooth-core: sawtooth.hyperledger.org/docs/core/releases/1.0.5/…

              – Frank C.
              Nov 27 '18 at 18:37











            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fstackoverflow.com%2fquestions%2f53476092%2fhow-to-start-multiple-validators-in-hyperledger-sawtooth%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            If you want multiple nodes on the same machine, with no VM, you need to have each node with its own set of TCP ports and own log/data file directories.



            Use $SAWTOOTH_HOME to set a different base directory for each node.
            Use the sawtooth-validator --bind options to set different ports for each node (network, component, consensus) and for the REST API in sawtooth-rest-api --bind and --connect options.



            Here's an example for one node:
            sudo -u sawtooth sawtooth-validator
            --bind component:tcp://127.0.0.1:4004
            --bind network:tcp://127.0.0.1:8800
            --endpoint tcp://127.0.0.1:8800
            --peering static --peers tcp://127.0.0.1:8801



            And for the REST API:
            sudo -u sawtooth sawtooth-rest-api --connect tcp://127.0.0.1:4004
            --bind 127.0.0.1:8008

            Then setup another node using port 8801, 4005 and 8009, for example, for the network, component, and REST API ports. Set $SAWTOOTH_HOME to be different for each one.



            Here's a full working example, similar to the above (just extract the command line parts and run directly):
            https://lists.hyperledger.org/g/sawtooth/topic/networking_validators_running/18059074?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,80,18059074






            share|improve this answer




























              0














              If you want multiple nodes on the same machine, with no VM, you need to have each node with its own set of TCP ports and own log/data file directories.



              Use $SAWTOOTH_HOME to set a different base directory for each node.
              Use the sawtooth-validator --bind options to set different ports for each node (network, component, consensus) and for the REST API in sawtooth-rest-api --bind and --connect options.



              Here's an example for one node:
              sudo -u sawtooth sawtooth-validator
              --bind component:tcp://127.0.0.1:4004
              --bind network:tcp://127.0.0.1:8800
              --endpoint tcp://127.0.0.1:8800
              --peering static --peers tcp://127.0.0.1:8801



              And for the REST API:
              sudo -u sawtooth sawtooth-rest-api --connect tcp://127.0.0.1:4004
              --bind 127.0.0.1:8008

              Then setup another node using port 8801, 4005 and 8009, for example, for the network, component, and REST API ports. Set $SAWTOOTH_HOME to be different for each one.



              Here's a full working example, similar to the above (just extract the command line parts and run directly):
              https://lists.hyperledger.org/g/sawtooth/topic/networking_validators_running/18059074?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,80,18059074






              share|improve this answer


























                0












                0








                0







                If you want multiple nodes on the same machine, with no VM, you need to have each node with its own set of TCP ports and own log/data file directories.



                Use $SAWTOOTH_HOME to set a different base directory for each node.
                Use the sawtooth-validator --bind options to set different ports for each node (network, component, consensus) and for the REST API in sawtooth-rest-api --bind and --connect options.



                Here's an example for one node:
                sudo -u sawtooth sawtooth-validator
                --bind component:tcp://127.0.0.1:4004
                --bind network:tcp://127.0.0.1:8800
                --endpoint tcp://127.0.0.1:8800
                --peering static --peers tcp://127.0.0.1:8801



                And for the REST API:
                sudo -u sawtooth sawtooth-rest-api --connect tcp://127.0.0.1:4004
                --bind 127.0.0.1:8008

                Then setup another node using port 8801, 4005 and 8009, for example, for the network, component, and REST API ports. Set $SAWTOOTH_HOME to be different for each one.



                Here's a full working example, similar to the above (just extract the command line parts and run directly):
                https://lists.hyperledger.org/g/sawtooth/topic/networking_validators_running/18059074?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,80,18059074






                share|improve this answer













                If you want multiple nodes on the same machine, with no VM, you need to have each node with its own set of TCP ports and own log/data file directories.



                Use $SAWTOOTH_HOME to set a different base directory for each node.
                Use the sawtooth-validator --bind options to set different ports for each node (network, component, consensus) and for the REST API in sawtooth-rest-api --bind and --connect options.



                Here's an example for one node:
                sudo -u sawtooth sawtooth-validator
                --bind component:tcp://127.0.0.1:4004
                --bind network:tcp://127.0.0.1:8800
                --endpoint tcp://127.0.0.1:8800
                --peering static --peers tcp://127.0.0.1:8801



                And for the REST API:
                sudo -u sawtooth sawtooth-rest-api --connect tcp://127.0.0.1:4004
                --bind 127.0.0.1:8008

                Then setup another node using port 8801, 4005 and 8009, for example, for the network, component, and REST API ports. Set $SAWTOOTH_HOME to be different for each one.



                Here's a full working example, similar to the above (just extract the command line parts and run directly):
                https://lists.hyperledger.org/g/sawtooth/topic/networking_validators_running/18059074?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,80,18059074







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 27 '18 at 18:11









                Dan AndersonDan Anderson

                1,067213




                1,067213

























                    2














                    Basically it is starting all the same things you started on the first machine on each subsequent node with a few exceptions:




                    • Only one node should establish the genesis batch

                    • You may or may not need to set the -peers list on the validator command line or configuration file

                    • The validators will find each other and synchronize the blocks. This is why you must run the same transaction processors (TPs) on each node as well.






                    share|improve this answer
























                    • How to run a TP on both Validators?

                      – yash vadhvani
                      Nov 27 '18 at 5:28











                    • I am not able to run two validators please provide me the command

                      – yash vadhvani
                      Nov 27 '18 at 6:08











                    • Can You tell me how to do this practically

                      – yash vadhvani
                      Nov 27 '18 at 6:20











                    • Are you running from Docker or the command line?

                      – Frank C.
                      Nov 27 '18 at 10:44






                    • 1





                      Here are the docs for 1.0.5 sawtooth-core: sawtooth.hyperledger.org/docs/core/releases/1.0.5/…

                      – Frank C.
                      Nov 27 '18 at 18:37
















                    2














                    Basically it is starting all the same things you started on the first machine on each subsequent node with a few exceptions:




                    • Only one node should establish the genesis batch

                    • You may or may not need to set the -peers list on the validator command line or configuration file

                    • The validators will find each other and synchronize the blocks. This is why you must run the same transaction processors (TPs) on each node as well.






                    share|improve this answer
























                    • How to run a TP on both Validators?

                      – yash vadhvani
                      Nov 27 '18 at 5:28











                    • I am not able to run two validators please provide me the command

                      – yash vadhvani
                      Nov 27 '18 at 6:08











                    • Can You tell me how to do this practically

                      – yash vadhvani
                      Nov 27 '18 at 6:20











                    • Are you running from Docker or the command line?

                      – Frank C.
                      Nov 27 '18 at 10:44






                    • 1





                      Here are the docs for 1.0.5 sawtooth-core: sawtooth.hyperledger.org/docs/core/releases/1.0.5/…

                      – Frank C.
                      Nov 27 '18 at 18:37














                    2












                    2








                    2







                    Basically it is starting all the same things you started on the first machine on each subsequent node with a few exceptions:




                    • Only one node should establish the genesis batch

                    • You may or may not need to set the -peers list on the validator command line or configuration file

                    • The validators will find each other and synchronize the blocks. This is why you must run the same transaction processors (TPs) on each node as well.






                    share|improve this answer













                    Basically it is starting all the same things you started on the first machine on each subsequent node with a few exceptions:




                    • Only one node should establish the genesis batch

                    • You may or may not need to set the -peers list on the validator command line or configuration file

                    • The validators will find each other and synchronize the blocks. This is why you must run the same transaction processors (TPs) on each node as well.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 26 '18 at 9:44









                    Frank C.Frank C.

                    5,88532639




                    5,88532639













                    • How to run a TP on both Validators?

                      – yash vadhvani
                      Nov 27 '18 at 5:28











                    • I am not able to run two validators please provide me the command

                      – yash vadhvani
                      Nov 27 '18 at 6:08











                    • Can You tell me how to do this practically

                      – yash vadhvani
                      Nov 27 '18 at 6:20











                    • Are you running from Docker or the command line?

                      – Frank C.
                      Nov 27 '18 at 10:44






                    • 1





                      Here are the docs for 1.0.5 sawtooth-core: sawtooth.hyperledger.org/docs/core/releases/1.0.5/…

                      – Frank C.
                      Nov 27 '18 at 18:37



















                    • How to run a TP on both Validators?

                      – yash vadhvani
                      Nov 27 '18 at 5:28











                    • I am not able to run two validators please provide me the command

                      – yash vadhvani
                      Nov 27 '18 at 6:08











                    • Can You tell me how to do this practically

                      – yash vadhvani
                      Nov 27 '18 at 6:20











                    • Are you running from Docker or the command line?

                      – Frank C.
                      Nov 27 '18 at 10:44






                    • 1





                      Here are the docs for 1.0.5 sawtooth-core: sawtooth.hyperledger.org/docs/core/releases/1.0.5/…

                      – Frank C.
                      Nov 27 '18 at 18:37

















                    How to run a TP on both Validators?

                    – yash vadhvani
                    Nov 27 '18 at 5:28





                    How to run a TP on both Validators?

                    – yash vadhvani
                    Nov 27 '18 at 5:28













                    I am not able to run two validators please provide me the command

                    – yash vadhvani
                    Nov 27 '18 at 6:08





                    I am not able to run two validators please provide me the command

                    – yash vadhvani
                    Nov 27 '18 at 6:08













                    Can You tell me how to do this practically

                    – yash vadhvani
                    Nov 27 '18 at 6:20





                    Can You tell me how to do this practically

                    – yash vadhvani
                    Nov 27 '18 at 6:20













                    Are you running from Docker or the command line?

                    – Frank C.
                    Nov 27 '18 at 10:44





                    Are you running from Docker or the command line?

                    – Frank C.
                    Nov 27 '18 at 10:44




                    1




                    1





                    Here are the docs for 1.0.5 sawtooth-core: sawtooth.hyperledger.org/docs/core/releases/1.0.5/…

                    – Frank C.
                    Nov 27 '18 at 18:37





                    Here are the docs for 1.0.5 sawtooth-core: sawtooth.hyperledger.org/docs/core/releases/1.0.5/…

                    – Frank C.
                    Nov 27 '18 at 18:37


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f53476092%2fhow-to-start-multiple-validators-in-hyperledger-sawtooth%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

                    A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

                    Calculate evaluation metrics using cross_val_predict sklearn

                    Insert data from modal to MySQL (multiple modal on website)