Skip to content

Conversation

@buffrr
Copy link
Member

@buffrr buffrr commented Nov 19, 2025

Breaking Changes:

  • Commitments now require 144-block finality window before confirmation
  • Non-finalized commitments are replaced when new ones are submitted
  • PTR database has been updated.

Updates:

  • Support commitment rollback (if not finalized)
  • Enable batch commitment submission for multiple spaces in single transaction
  • Implement dual PTR transfer modes:
    • Index-preserving transfers: PTR spent at input N creates output at index N when values match (enables operator-assisted transfers)
    • Standard transfers: Maintains PTR tradability similar to spaces when values don't match. input N, output N+1
  • Trust anchors file now includes ptrs_root and spaces_root

RPC updates:

  • Support for PTR indexing now works with the same --block-index flag
  • New RPC command getptrblockmeta: returns something like this:
{
    "jsonrpc": "2.0",
    "result": {
        "hash": "000000001fb8d5f7d9ddb2efc13255946d870954cabcbb5d510a86c8b6ccc468",
        "height": 105986,
        "tx_meta": [
            {
                "txid": "951c4172472a2f7d30ccd3bc30167da9633b56dc937d8e890a6a02fcb578d20c",
                "spends": [
                    0
                ],
                "creates": [
                    {
                        "n": 1,
                        "id": "sptr1r5vd6za4rmmdwy2urtqs0w3rq5ja6ar5p7ak7fcmseu64fn37y0qg9e9q3",
                        "data": null,
                        "value": 1007,
                        "script_pubkey": "5120c740369227c9090a3de4fb9dbf1fc13a2f74f4b5d4c961c147fedde2c0352751"
                    }
                ],
                "commitments": {
                    "@112": {
                        "state_root": "d513cb28dd4806e4386c632bfdcf12c324c51821a6b9d1ff909e97423a1372e2",
                        "prev_root": null,
                        "history_hash": "d513cb28dd4806e4386c632bfdcf12c324c51821a6b9d1ff909e97423a1372e2",
                        "block_height": 105986
                    }
                },
                "revoked_commitments": [],
                "revoked_delegations": [],
                "new_delegations": []
            }
        ]
    },
    "id": 5
}

Plus more tests.

Breaking Changes:
- Commitments now require 144-block finality window before confirmation
- Non-finalized commitments are replaced when new ones are submitted
- PTR database has been updated.

Updates:
- Support commitment rollback (if not finalized)

- Enable batch commitment submission for multiple spaces in single transaction

- Implement dual PTR transfer modes:
  * Index-preserving transfers: PTR spent at input N creates output at index N
    when values match (enables operator-assisted transfers)
  * Standard transfers: Maintains PTR tradability similar to spaces when values don't match. input N, output N+1
@buffrr
Copy link
Member Author

buffrr commented Nov 20, 2025

New updates to the RPC structure:

Examples:

{
    "jsonrpc": "2.0",
    "result": {
        "hash": "0000000000000000440b372e79bd79b6fddcfce6c0b45c2da78d34fcfc907b41",
        "height": 105016,
        "tx_meta": [
            {
                "txid": "476c1aa6d3a92ec70d2e0fef8575eab74538e1cbb344a94bc4c2abaca62b02a1",
                "spends": [
                    1
                ],
                "creates": [],
                "commitments": [],
                "revoked_commitments": [],
                "revoked_delegations": [
                    {
                        "space": "@space",
                        "sptr": "sptr1ha6deqv7p0lp8f7qt3j4tym8dp4vgq36y7h4lvm2ltkh8ljz57hqpdj7j6"
                    }
                ],
                "new_delegations": [
                    {
                        "space": "@space",
                        "sptr": "sptr1yehmfzsu2rr7tsxd5d5ehflgmvww9twqflq2x5es8na728jtx66sfqlk06"
                    }
                ]
            },
            {
                "txid": "20887fdf1f585527fb3c90402b460a4d5c2b9cf4ad10bf78c1b9a4c2b77ce041",
                "spends": [],
                "creates": [],
                "commitments": [],
                "revoked_commitments": [],
                "revoked_delegations": [
                    {
                        "space": "@101",
                        "sptr": "sptr1tquvje06x2h47uqtf6eyktcme72ffycqrutty5ga0a6dk30xvkjqx08hrd"
                    }
                ],
                "new_delegations": [
                    {
                        "space": "@101",
                        "sptr": "sptr1xwfnwt72kr63hef8zhf85ngpzsnktar949u5dj8wc8fyw8jrx5sqcv9nnf"
                    }
                ]
            },
            {
                "txid": "806c2748e42179714896102bb105138e6ab9565340d91975a8350415b6b7746a",
                "spends": [],
                "creates": [],
                "commitments": [],
                "revoked_commitments": [],
                "revoked_delegations": [
                    {
                        "space": "@112",
                        "sptr": "sptr1qw9glc4chdk6t937s80wa4zuhrj93xkj5pp78uxeqeua9f29v3zq5xw8sh"
                    }
                ],
                "new_delegations": []
            },
            {
                "txid": "83c098e09619abf109cc1f1edbf085d13dbfe404ef7c454af1908847915bc853",
                "spends": [],
                "creates": [],
                "commitments": [],
                "revoked_commitments": [],
                "revoked_delegations": [
                    {
                        "space": "@111",
                        "sptr": "sptr1n69nqsgnq35hsp04wkju9sykj7smjzl7eskungf2gjn5j8xy688q9lklqk"
                    }
                ],
                "new_delegations": []
            }
        ]
    },
    "id": 5
}

and

{
    "jsonrpc": "2.0",
    "result": {
        "hash": "00000000ea9f7ddf48bcc5a4b050d6ca45503ffb80ed5ded5aa0428bb884dec0",
        "height": 109051,
        "tx_meta": [
            {
                "txid": "74337307d84253c31914f236b1314d9afeceda4783c3f467f25fb7232b4d7aa7",
                "spends": [
                    0
                ],
                "creates": [
                    {
                        "n": 1,
                        "id": "sptr1az4txmr6qp9qyp6m5rtg4vu6rx8z5l3f8wstf96kht9teyh4tz3qjfakjh",
                        "data": null,
                        "value": 1007,
                        "script_pubkey": "5120ff2c834ea3d5ecd3b7b80dadac517d0d56296799cd87db96d9ca102f684c7991"
                    }
                ],
                "commitments": [
                    {
                        "space": "@space",
                        "state_root": "74ae8295ca53465d2766fd52065e6bf1cbe511ef651dbe2fee38634b49abf120",
                        "prev_root": "218a9d0f6041aa54b785e7c850b00da6a1df544fb81456a13001d386cb02d57b",
                        "history_hash": "738007a5cffe70fe8565ca3b98507d29801813b7096c623d3564c8362c7e9df8",
                        "block_height": 109051
                    }
                ],
                "revoked_commitments": [
                    {
                        "space": "@space",
                        "state_root": "100a481b50e620829982e2af9c1ca2ecd0aac2d6d543da0bdc6667a951b137aa",
                        "prev_root": "218a9d0f6041aa54b785e7c850b00da6a1df544fb81456a13001d386cb02d57b",
                        "history_hash": "f6347a688ab01eaec8fa5690441acbfc3c6c4285e2609ee20e95f737bdec6dab",
                        "block_height": 109044
                    }
                ],
                "revoked_delegations": [],
                "new_delegations": []
            },
            {
                "txid": "d812ebd5122e68ad1b4af22b53baf280c50a66d848886b5b8c31af9f12c6af5e",
                "spends": [],
                "creates": [
                    {
                        "n": 0,
                        "id": "sptr1yvnr5dvpt5rwwtea2nrzyuzsfl5f44jwhk7734acvjlarymc0l9szm4nk0",
                        "data": null,
                        "value": 1007,
                        "script_pubkey": "51206454b5ddb90f4423011789b4c04f81a5e24a5a2c97725a288ce8539fcafc32e9"
                    }
                ],
                "commitments": [],
                "revoked_commitments": [],
                "revoked_delegations": [],
                "new_delegations": []
            }
        ]
    },
    "id": 5
}

@buffrr
Copy link
Member Author

buffrr commented Nov 23, 2025

  • Included additional RPC commands to create proofs for ptrs and commitments.
  • Updated veritas to support verifying ptrs
  • Add last update to sptr and changed the outpoint key in the database

@buffrr
Copy link
Member Author

buffrr commented Nov 24, 2025

Added support for associating data with sptrs. The setrawfallback command now accepts either a space or an sptr as input.
This completes the changes for this PR.

@buffrr buffrr merged commit 9060210 into spacesprotocol:subspaces Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant