oasisprotocol / oasisprotocol/rofl-app

Take paidUntil into account while showing statuses

Open
#187 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1
Forks
1
Avg merge
46m
Merged PRs (30d)
1

Description

  • wrong active app label in machine details, should be last active app
    Image

  • app card and app details page. Status says active even if app has no running machines

If we show app status we need to fetch machines and check whether all machines are expired

  const {
    data: machinesData,
  } = useGetRuntimeRoflmarketInstances(network, 'sapphire', {
    deployed_app_id: id,
  })

Image

sample responses for app "running" with expired machine ( date past paid_until, but still remove: false ):

machine remove prop will be updated in a next epoch?

{
    "admin": "oasis1qzgc7dvlls36q47z5y6dvu6ylaa78rkrduqtxgdr",
    "cmd_count": 0,
    "cmd_next_id": "0000000000000000",
    "cmds": [],
    "created_at": "2025-07-04T07:49:12Z",
    "creator": "oasis1qzgc7dvlls36q47z5y6dvu6ylaa78rkrduqtxgdr",
    "deployment": {
        "app_id": "rofl1qzrlp6sq640t4zx5hgd9kug5h8k7nlqxuyuy5j99",
        "manifest_hash": "729f512976c710052a2cb6cd7b9cdd8951bf3fb2d06f98ac9e6d82cc6e48263b",
        "metadata": {
            "net.oasis.deployment.orc.ref": "rofl.sh/163a8ce6-86cc-45ec-aa09-defbc7fc449f:1751615336@sha256:57ea536c236a0b828982204767e9ac57a8a2af35ea0139a9fd14591bf703c568"
        }
    },
    "id": "000000000000011f",
    "metadata": {
        "net.oasis.scheduler.rak": "ejF2x2BVg67z4xctpi2sOPCCP7BsZsU4Ef18As4sfkc="
    },
    "node_id": "1owPK3eT21k0ajRG7VfHRgp4JPXobCQtzuglz6ZSJis=",
    "offer_id": "0000000000000003",
    "paid_from": "2025-07-04T07:49:12Z",
    "paid_until": "2025-07-04T08:49:12Z",
    "payment": {
        "native": {
            "denomination": "",
            "terms": {
                "1": "5000000000000000000"
            }
        }
    },
    "payment_address": "9882830c1bf10eeec4514475603fde4b9662c5a3",
    "provider": "oasis1qp2ens0hsp7gh23wajxa4hpetkdek3swyyulyrmz",
    "refund_data": "00918f359ffc23a057c2a134d67344ff7be38ec36f",
    "removed": false,
    "resources": {
        "cpus": 2,
        "memory": 4096,
        "storage": 20000,
        "tee": 2
    },
    "status": 1,
    "updated_at": "2025-07-04T07:49:47Z"
}

app: (above machine expired already, but active_instances and num_active_instances are still showing machines)


{
    "active_instances": [
        {
            "endorsing_node_id": "1owPK3eT21k0ajRG7VfHRgp4JPXobCQtzuglz6ZSJis=",
            "expiration_epoch": 45567,
            "extra_keys": [
                "{\"secp256k1\":\"Aor0+oNzyqSaTAeAJOhwL1Tg0m28N9un/AIn32vLkKyr\"}"
            ],
            "rak": "ENgWXV0qgUa4NkEbP0FD+YGb+c0IVTuLO09Dwzhjv8w=",
            "rek": "HqCeAx9uGz+nSWy5vmY4nG2B6tZM21RlDM1BHQzjlT4="
        }
    ],
    "admin": "oasis1qzgc7dvlls36q47z5y6dvu6ylaa78rkrduqtxgdr",
    "admin_eth": "0x705b2433b76c383C20AE0d60803334f0AD13b6e8",
    "date_created": "2025-07-04T07:48:03Z",
    "id": "rofl1qzrlp6sq640t4zx5hgd9kug5h8k7nlqxuyuy5j99",
    "last_activity": "2025-07-04T08:48:22Z",
    "last_activity_tx": {
        "amount": "0",
        "body": {
            "app": "rofl1qzrlp6sq640t4zx5hgd9kug5h8k7nlqxuyuy5j99",
            "ect": {
                "capability_tee": {},
                "node_endorsement": {
                    "public_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
                    "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
                }
            },
            "expiration": 45567,
            "extra_keys": [
                {
                    "secp256k1": "Aor0+oNzyqSaTAeAJOhwL1Tg0m28N9un/AIn32vLkKyr"
                }
            ]
        },
        "charged_fee": "13611800000000000",
        "fee": "13611800000000000",
        "fee_proxy_id": "AIfw6gDVXrqI1LoaW3EUue3p/Abh",
        "fee_proxy_module": "rofl",
        "fee_symbol": "TEST",
        "gas_limit": 136118,
        "gas_used": 113415,
        "hash": "cefab0107875e8c6fef7b066aa0c70a8a941f0318191d3b1ac96cb8041f17233",
        "index": 4,
        "is_likely_native_token_transfer": false,
        "method": "rofl.Register",
        "nonce_0": 2,
        "round": 12418444,
        "sender_0": "oasis1qr7qrwhdf8c586sedulpk2cgv99xemjgu5v2nket",
        "signers": [
            {
                "address": "oasis1qr7qrwhdf8c586sedulpk2cgv99xemjgu5v2nket",
                "nonce": 2
            },
            {
                "address": "oasis1qptyuqjdedfdytjlvf4x0ln6y2w7kjdykv4v3zdl",
                "address_eth": "0x22A048aeA884Ee9d24CBD49Fdfb3766e2B32451A",
                "nonce": 2
            }
        ],
        "size": 11415,
        "success": true,
        "timestamp": "2025-07-04T08:48:22Z"
    },
    "metadata": {
        "net.oasis.rofl.author": "",
        "net.oasis.rofl.description": "Confidential chatbot running inside a TEE. No prompts leave the secure enclave. Define your bot's behavior with system prompt.",
        "net.oasis.rofl.homepage": "",
        "net.oasis.rofl.name": "AI Telegram Chatbot",
        "net.oasis.rofl.version": "0.1.0",
        "net.oasis.roflapp.created_using_commit": "eb62fc481290e6df451ea8aad5d2676adaed56ef\n",
        "net.oasis.roflapp.template": "tgbot"
    },
    "num_active_instances": 1,
    "policy": {
        "enclaves": [
            "YTYl99e3sUwtpZDShZoUGn4VSl+RMFYHmsrbu+hYz+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
            "m+9vIPd0lHWzdGf+bz7s1VmSySwRieB5/y00H4knVEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
        ],
        "endorsements": [
            {
                "any": {}
            }
        ],
        "fees": 2,
        "max_expiration": 3,
        "quotes": {
            "pcs": {
                "min_tcb_evaluation_data_number": 18,
                "tcb_validity_period": 30,
                "tdx": {}
            }
        }
    },
    "removed": false,
    "secrets": {
        "OLLAMA_MODEL": "pGJwa1gg4C8IUl8g/Gda0D1FtKD3Y2Kplgedjo59kU6Sw/rObA9kbmFtZVgcW/B1WvL+++4raJw8ecX5htnJQL1oHXzurNPEA2Vub25jZU9sN/k1g5lHdg90y68/j61ldmFsdWVYGQaxiGlYwyWFzGB+eKyzmRX+l1eu14KZMAg=",
        "OLLAMA_SYSTEM_PROMPT": "pGJwa1ggq070L7uulWRROZLPt5IwiN2ZC7x40twfto2dtxsH7wZkbmFtZVgkz49M0s9hkqBnMqDdB1qZDUwWVv6gYl+LPZvcjRzsZneitn4KZW5vbmNlTzm45PP+tNgqOoMz7PYn7WV2YWx1ZVZ5bLLrnsXzcTcSuCLztKqT57Mg9HT5",
        "TOKEN": "pGJwa1ggAxNYFib8ojGCdCuv14KUGIG8jikNIW7GI+icN4xyY0lkbmFtZVWYQ6w0TChhT4qC+mZoKny2ArAGiEhlbm9uY2VPmFUSzsFDJDUFDJUwfKICZXZhbHVlU+of7WaZ5RITxZ+WoR9/eqpqXV4="
    },
    "sek": "f8QIS2XyGveoGZHQNgeXBku4tFU2KjepJZvWR/5Z+yE=",
    "stake": "100000000000000000000"
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the machine-details, app-card, and app-details views, then inspect the useGetRuntimeRoflmarketInstances entry point and its paid_until data. Verify the status logic against expired machines and confirm that machine details identify the last active app; done means the displayed statuses and labels match those conditions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.