I created two transactions on Electrum Mac client. The first tranaction is replaceable and the other is non-Replaceable. The followings are the results of get-rawtransaction of the the two transactions. How can I identify from the two raw-transactions whether replaceable or not. I guess that "sequence=4294967295" means Non-replaceable.

Replaceable:

{
    "result": {
        "hex": "0100000001344620a6c74ecc9df79d035f6c470c9fcada00e6103b8aa6da55b2eced1161f7000000006a473044022039a9d24c53605797c7fe74f69e97564b6e9346779ce32e208624049011fcbc04022010d481a6ca5aa88e0891b30caba160675ad21bf29dffa6bee63c2e6c98ac43bb01210228a0fc2a9872fab14eab65f3994089c2c285a549dbcbf0924788fee759960a96fdffffff0210270000000000001976a9141485d9d03b41aaa9dca7d70d7f63ff4a0826100e88acc0a20100000000001976a914e6df3a7f505b79b8da79c6fc6f5444ffe843f5f588ac00000000",
        "txid": "43f882c7ab0cf18678b171a69278cd496a85152bd88b66b73562601485ff3725",
        "hash": "43f882c7ab0cf18678b171a69278cd496a85152bd88b66b73562601485ff3725",
        "size": 225,
        "vsize": 225,
        "version": 1,
        "locktime": 0,
        "vin": [
            {
                "txid": "f76111edecb255daa68a3b10e600daca9f0c476c5f039df79dcc4ec7a6204634",
                "vout": 0,
                "scriptSig": {
                    "asm": "3044022039a9d24c53605797c7fe74f69e97564b6e9346779ce32e208624049011fcbc04022010d481a6ca5aa88e0891b30caba160675ad21bf29dffa6bee63c2e6c98ac43bb[ALL] 0228a0fc2a9872fab14eab65f3994089c2c285a549dbcbf0924788fee759960a96",
                    "hex": "473044022039a9d24c53605797c7fe74f69e97564b6e9346779ce32e208624049011fcbc04022010d481a6ca5aa88e0891b30caba160675ad21bf29dffa6bee63c2e6c98ac43bb01210228a0fc2a9872fab14eab65f3994089c2c285a549dbcbf0924788fee759960a96"
                },
                "sequence": 4294967293
            }
        ],
        "vout": [
            {
                "value": 0.00010000,
                "n": 0,
                "scriptPubKey": {
                    "asm": "OP_DUP OP_HASH160 1485d9d03b41aaa9dca7d70d7f63ff4a0826100e OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a9141485d9d03b41aaa9dca7d70d7f63ff4a0826100e88ac",
                    "reqSigs": 1,
                    "type": "pubkeyhash",
                    "addresses": [
                        "12sWrxRY7E7Nhmuyjbz4TtGE9jRewGqEZD"
                    ]
                }
            },
            {
                "value": 0.00107200,
                "n": 1,
                "scriptPubKey": {
                    "asm": "OP_DUP OP_HASH160 e6df3a7f505b79b8da79c6fc6f5444ffe843f5f5 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a914e6df3a7f505b79b8da79c6fc6f5444ffe843f5f588ac",
                    "reqSigs": 1,
                    "type": "pubkeyhash",
                    "addresses": [
                        "1N3jqJwykPZGrskiDi2UujWgmaiPqdcaPz"
                    ]
                }
            }
        ]
    },
    "error": null,
    "id": null
}

Non-replaceable:

{
    "result": {
        "hex": "01000000017502aa8b1662b3974e9f36a308d993e5de6d9acc0a417789f763c77cc1b8774b010000006b483045022100c716b5d6d23e6e980a1be76b62033d4d4213e6308684ef18c02449e9c687581d0220565c89f68fd9f220b6007950da1264e1c29edce8caf2600889b5f22f6e6e69fd012102078eb65f8cdfac159ba9babf0fd28b74477ed1ac108a7ec7f50c3c8b0e05647cffffffff0210270000000000001976a9141485d9d03b41aaa9dca7d70d7f63ff4a0826100e88acfc020100000000001976a914beb0e18e168aab7a1b9601430dd317c1c18b286b88ac00000000",
        "txid": "c374698cff5c784f2af87a637ee9ff571bd2951baecf1942ab377002a599cc16",
        "hash": "c374698cff5c784f2af87a637ee9ff571bd2951baecf1942ab377002a599cc16",
        "size": 226,
        "vsize": 226,
        "version": 1,
        "locktime": 0,
        "vin": [
            {
                "txid": "4b77b8c17cc763f78977410acc9a6ddee593d908a3369f4e97b362168baa0275",
                "vout": 1,
                "scriptSig": {
                    "asm": "3045022100c716b5d6d23e6e980a1be76b62033d4d4213e6308684ef18c02449e9c687581d0220565c89f68fd9f220b6007950da1264e1c29edce8caf2600889b5f22f6e6e69fd[ALL] 02078eb65f8cdfac159ba9babf0fd28b74477ed1ac108a7ec7f50c3c8b0e05647c",
                    "hex": "483045022100c716b5d6d23e6e980a1be76b62033d4d4213e6308684ef18c02449e9c687581d0220565c89f68fd9f220b6007950da1264e1c29edce8caf2600889b5f22f6e6e69fd012102078eb65f8cdfac159ba9babf0fd28b74477ed1ac108a7ec7f50c3c8b0e05647c"
                },
                "sequence": 4294967295
            }
        ],
        "vout": [
            {
                "value": 0.00010000,
                "n": 0,
                "scriptPubKey": {
                    "asm": "OP_DUP OP_HASH160 1485d9d03b41aaa9dca7d70d7f63ff4a0826100e OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a9141485d9d03b41aaa9dca7d70d7f63ff4a0826100e88ac",
                    "reqSigs": 1,
                    "type": "pubkeyhash",
                    "addresses": [
                        "12sWrxRY7E7Nhmuyjbz4TtGE9jRewGqEZD"
                    ]
                }
            },
            {
                "value": 0.00066300,
                "n": 1,
                "scriptPubKey": {
                    "asm": "OP_DUP OP_HASH160 beb0e18e168aab7a1b9601430dd317c1c18b286b OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a914beb0e18e168aab7a1b9601430dd317c1c18b286b88ac",
                    "reqSigs": 1,
                    "type": "pubkeyhash",
                    "addresses": [
                        "1JPHHMtzGbATPDKWtSwX9cZ7qq3KNLg1qZ"
                    ]
                }
            }
        ]
    },
    "error": null,
    "id": null
}
up vote 4 down vote accepted

From BIP-125 Opt-in Full Replace-by-Fee Signaling:

This policy specifies two ways a transaction can signal that it is replaceable.

  • Explicit signaling: A transaction is considered to have opted in to allowing replacement of itself if any of its inputs have an nSequence number less than (0xffffffff - 1).
  • Inherited signaling: Transactions that don't explicitly signal replaceability are replaceable under this policy for as long as any one of their ancestors signals replaceability and remains unconfirmed.

Since 0xffffffff = 4294967295, and the first transaction has nSequence = 4294967293, it is signalling so.

I guess that "sequence=4294967295" means Non-replaceable.

correct

here is some reference: https://bitcoin.org/en/developer-guide#locktime-and-sequence-number

Locktime itself is an unsigned 4-byte integer which can be parsed two ways:

If less than 500 million, locktime is parsed as a block height. The transaction can be added to any block which has this height or higher... at least one input must have a sequence number below the maximum.

your sequence number is fdffffff, which is not "ffffffff" as normally used.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.