Repository navigation
Replies: 4 comments 7 replies
|
If the owner is unable to pay and deletes the service, the service users will be shut down because of a single owner. A decentralized mechanism is needed to allow for renewals or other changes. What was previously decentralized is now becoming centralized because of a single owner. |
|
Feedback from Discord (summary) A validator on the Pactus Discord raised the storage expiry question, which connects to the point above about a single owner:
Clarified on Discord from the PIP text:
Open questions for the authors, combining both comments:
|
|
Open question: how to bound execution @b00f, two points came up in the PIP-56 amendment (#330, section "Working with PIP-58") that I promised to bring here. 1. Timeout and block validity PIP-58 accepts a non-deterministic guard on purpose, for native speed. The consequence: with a wall-clock timeout, whether a block is valid can depend on the machine. A call that takes 0.9 s on a fast node and 1.2 s on a slow one makes them disagree on the same block, and a node that syncs old blocks has to decide whether to apply the timeout at all. carbonflake suggests a counted bound: stop a call after a fixed number of steps, counted the same way on every node, with the abort at the same point everywhere. It is a counter, not a price list, so the fee can stay based on bytes. The node's clock would still decide what a proposer puts in its block, but never a vote or the validity of a block. For reference, Wasmer has a metering middleware that is compiled into the native code, where every operator can cost the same (1), so it works as a plain step counter. Do you want to keep the timeout as the only guard, or add a step limit for validity and keep the timeout only for what a proposer includes? 2. Given-up owner Writing a given-up owner as 21 zero bytes means the field holds the treasury address. Since |
|
Some notes and concerns: 1. This is a new proposalPR #331 introduces a completely new idea and a different set of protocol changes. I suggest drafting a separate PIP for it so we can have independent discussions and reviews without mixing different proposals and architectural decisions. 2. Focus on the overall architectureAt this stage, I think we should focus on the overall architecture rather than discussing implementation details. First, we need to agree on the general architecture and the fundamental design principles. Once we have a clear architectural direction, we can define the details of transactions, application calls, state management, and other protocol-level changes in separate proposals. I believe getting the architecture right first will help us avoid making isolated decisions that could introduce unnecessary complexity or limit our flexibility in the future. 3. Step counter / execution meteringBased on my understanding, implementing a step counter requires instrumenting the compiled binary by injecting additional instructions to count execution steps. This is essentially the same as gas metering, just with different terminology. My main concern with this approach is that it introduces two significant drawbacks:
Even if we accept the performance overhead and try to optimize the implementation, I believe complexity remains the bigger problem. If you have followed Ethereum and its EVM, you will probably agree that gas metering is one of the most complicated parts of the execution environment. Its pricing rules and metering mechanisms have required considerable adjustments over time, sometimes introducing compatibility concerns. CosmWasm is another example worth studying. Its gas-metering implementation has faced several issues. It's also important to understand why Polkadot is moving towards a RISC-V-based executor before making similar architectural decisions. My preference is to allow applications to be compiled into native binaries using native tools, similar to how modern WebAssembly engines in browsers compile Wasm code into native machine instructions for execution. Of course, we still need appropriate safeguards against malicious or resource-intensive applications. We should investigate execution time limits and other external resource constraints to prevent abuse. **My general preference is simplicity and performance. ** |
Uh oh!
There was an error while loading. Please reload this page.
PIP-58: Pactus Sandbox Applications
Each Application gets one renewable storage file that holds its code and data. Code is WASM compiled to native machine code. Instead of gas, the fee is based on the bytes the Application reads and writes plus the allocated memory, and a timeout stops runaway code. Storage is rented: it is renewed, or it expires and is deleted after a grace period.
To get the discussion started:
Please keep each reply to one topic, and describe changes as Problem / Proposal / Trade-off. Agreed points will be summarized here and proposed as PRs to PIP-58.
All reactions