Forum Home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    Feathercoin Core 0.11.1.1 Launch

    Feathercoin Discussion
    7
    55
    41552
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Wellenreiter
      Wellenreiter Moderators @ghostlander last edited by

      @ghostlander said:

      @lizhi Most pools use v0.8. We can patch v0.9 to 100 confirmations.

      I support that!!

      Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
      Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

      1 Reply Last reply Reply Quote 0
      • Wellenreiter
        Wellenreiter Moderators last edited by

        I’ve checked the code for 0.8.7.3 and 0.9.3.1 and I think the problem which was observed by Lizhi only exists in the test net.

        On main net we are in COINBASE_MATURITY = 240 already:

        From main.h:

        /** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
        static const int COINBASE_MATURITY = 30;
        /** Coinbase maturity after block 145000 **/
        static const int COINBASE_MATURITY_NEW = 60*4;
        /** Block at which COINBASE_MATURITY_NEW comes into effect **/
        static const int COINBASE_MATURITY_SWITCH = 145000;
        

        As we passed block 145000 long ago, we are on COINBASE_MATURTY= 60 *4

        Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
        Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

        1 Reply Last reply Reply Quote 1
        • lizhi
          lizhi last edited by

          No , I don’t think so. COINBASE_MATURITY_NEW is unuesd in main.cpp . We check Inputs with COINBASE_MATURITY.

          Wellenreiter 1 Reply Last reply Reply Quote 0
          • lizhi
            lizhi last edited by

            set COINBASE_MATURITY to 100

            https://github.com/FeatherCoin/Feathercoin/commit/d8d8e80e98e2f1af09a7c15293368972fb2ed43c

            1 Reply Last reply Reply Quote 0
            • Wellenreiter
              Wellenreiter Moderators @lizhi last edited by Wellenreiter

              @lizhi said:

              No , I don’t think so. COINBASE_MATURITY_NEW is unuesd in main.cpp . We check Inputs with COINBASE_MATURITY.

              There are two different procedures in main.cpp, with different return values:

              Around line 1068:

              int CMerkleTx::GetBlocksToMaturity() const
              {
                  if (!IsCoinBase())
                      return 0;
                  return max(0, (COINBASE_MATURITY+1) - GetDepthInMainChain());
              }
              

              Around line 1710:

              int GetRequiredMaturityDepth(int nHeight)
              {
              
                  if (nHeight >= COINBASE_MATURITY_SWITCH)
              {
                      return COINBASE_MATURITY_NEW;
                  }
                  else
                  {
                      return COINBASE_MATURITY;
                  }
              }
              

              and finally around line 1747:

              if (coins.IsCoinBase()) {
                              if (nSpendHeight - coins.nHeight < COINBASE_MATURITY)
                                  return state.Invalid(
                                      error("CheckInputs() : tried to spend coinbase at depth %d",   nSpendHeight - coins.nHeight),
                                      REJECT_INVALID, "bad-txns-premature-spend-of-coinbase");
                          }
              

              The last one is in procedure checkinputs, so I think it is not critical.

              I think the 2nd one would create errors, if not returning the same value for all clients, at least for mining clients, but again, as the code is the same in 0.8.7.3 and 0.9.3.1 I don’t see a problem here.

              Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
              Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

              1 Reply Last reply Reply Quote 0
              • lizhi
                lizhi last edited by

                GetRequiredMaturityDepth is unused . No switch to COINBASE_MATURITY_NEW.
                COINBASE_MATURITY is used, but it is 30 .

                Wellenreiter 1 Reply Last reply Reply Quote 0
                • Wellenreiter
                  Wellenreiter Moderators @lizhi last edited by Wellenreiter

                  @lizhi
                  Then let’s patch it to 100 ! :-)

                  We even may use COINBASE_MATURITY_NEW, if there is no other way to switch back to maturity 100

                  Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
                  Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

                  1 Reply Last reply Reply Quote 0
                  • lizhi
                    lizhi last edited by

                    Compatible COINBASE_MATURITY = 100

                    0.11.2.2
                    https://github.com/FeatherCoin/Feathercoin/commit/8709f1902ae3432569b3e8e9430d7055b0d7fd5e
                    https://github.com/FeatherCoin/Feathercoin/commit/6e80bff85e7549bfa220a15d794abf4756f47f10

                    alt text

                    1 Reply Last reply Reply Quote 0
                    • AcidD
                      AcidD Moderators last edited by

                      Should I upgrade my node to 0.11.2.2 ?

                      • FTC Block Explorer + API @ https://fsight.chain.tips
                      • FTC Beer Money: 6x4LEQV88zRnBvZoH6ZNK6SeRxx4KiTyJs
                      • FTC bech32 address: fc1q4tclm3cv4v86ez6el76ewmharexfapxhek5a03
                      • BTC bech32 address: bc1qk8umuccapuafspk9e5szahvp0detafuzugv4ay

                      1 Reply Last reply Reply Quote 0
                      • lizhi
                        lizhi last edited by

                        No, your 0.11.2.1 should work right if you don’t run pool.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post