Skip to content

Legacy gas limits prohibit Livepeer Payments in BYOC #3746

@its-DeFine

Description

@its-DeFine

might be Relevant to the issue: #3744

Impact: High. Cannot process BYOC jobs into Livepeer.

Problem: When trying to sent Micropayments to a Bring your own container(BYOC) type of job using the Livepeer go implementation for a Gateway and Orchestrator the job request is not able to be processed. The Orchestrator and gateway containers show the following errors:

  • Gateway Error:
    job_id= capability=<capability name> processing job request job_id= capability=<capability name> Failed to get token from Orchestrator [<orchestrator url>⁠](<orchestrator url>) err=<nil>

  • Orchestrator error:
    could not get ticket params err=insufficient sender reserve but is think it s on your side now

Gateway Config

`services:
gateway:
image: livepeer/go-livepeer:latest
container_name: vtuber_network-gateway-test
volumes:
- ./data/gateway:/data
ports:
- 9999:9999
command: [
"-gateway",
"-orchAddr=,
"-orchSecret=${LIVEPEER_ORCH_SECRET:-orch-secret}",
"-httpAddr=gateway:9999",
"-httpIngest=true",
"-maxTicketEV=17000000000000",
"-maxTotalEV=17000000000000",
"-maxFaceValue=1000000000000000",
"-maxPricePerUnit=17000000000000",
"-network=arbitrum-one-mainnet",
"-ethUrl=https://arb1.arbitrum.io/rpc",
"-ethPassword=",
"-dataDir=/data",
"-v=6",
]
networks:
- default

networks:
default:
name: vtuber_network
external: true`

Orchestrator Config
`#############################################

Livepeer VTuber environment

#############################################

------------ Livepeer orchestrator (go-livepeer) ------------

LIVEPEER_NETWORK=arbitrum-one-mainnet
ORCHESTRATOR_PORT=9995
LIVEPEER_ORCH_SECRET=
ETH_RPC_URL=
ETH_PASSWORD_FILE=/root/.lpData/.ethpass # Mount config/ethpass with the keystore password
ETH_ADDRESS=
ETH_ORCH_ADDRESS=
PRICE_PER_UNIT=16000000000000
TICKET_EV=16000000000000
AUTO_ADJUST_PRICE=false
MAX_GAS_PRICE=1000000000

------------ Worker registration ------------

LIVEPEER_ORCH_URL=https://vtuber.ultimaratio.link:9995
LIVEPEER_ORCH_SKIP_VERIFY=true
ORCHESTRATOR_HOST=# public IP or hostname for serviceAddr, e.g. 65.188.126.223
CAPABILITY_NAME=Frank111 # IMPORTANT: Fill the capability name that you gave us in the form here!

CAPABILITY_PRICE_PER_UNIT=16000000000000

CAPABILITY_PRICE_PER_UNIT=0

------------ Pixel Streaming / Unreal ------------

VTUBER_SESSION_DIR=/home/ubuntu/vtuber_sessions
VTUBER_TCP_HOST=host.docker.internal
VTUBER_TCP_PORT=7777`

Livepeer request code:

` def create_livepeer_headers(self, capability_config: Dict[str, str]) -> Dict[str, str]:
"""Create proper Livepeer headers for gateway requests, including extra timeouts"""
job_header = base64.b64encode(json.dumps({
"request": json.dumps({"run": capability_config["run_command"]}),
"parameters": json.dumps({}),
"capability": capability_config["capability_name"],
"timeout_seconds": 1
}).encode()).decode()

    headers = {
        'Content-Type': 'application/json',
        'Livepeer': job_header,
        'Livepeer-Orch-Search-Timeout': '2s',
        'Livepeer-Orch-Search-Resp-Timeout': '1s'
    }
    return headers
    `

How our logic works:
Our script sends one payment request x seconds, you can think of this as Total Ticket EV = Payment for x seconds of hosting our app.

What is happening:
Legacy network perceives this as a "transcoding" request offered for a huge payment. From a logical perspective such edge cases where either prohibited from Go-Livepeer logic or if not programmatically prohibited should had received less rigorous testing. But could also be due to incorrect gas calculation from Legacy Arbitrum state

Suggestion for resolution:
As a temporary solution we can set a tested PRICE_PER_UNIT variable and multiply with y = timeout_seconds variableto reach TICKET_EV=16000000000000 then still route that job request as we would normally do. But this is not guarantee to work properly at all times if the issue is due to legacy gas calculation rather than hardcoded limits

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: triagethis issue has not been evaluated yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions