Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Grace period after maxAllocationEpochs on closeAllocation by delegator

未关闭
#417 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
solidity
领域
blockchain

调研方向

首先审查 closeAllocation() 以及 issue 中描述的现有 maxAllocationEpochs 行为。确定宽限期将如何区分软惩罚和硬惩罚,然后记录该决定以及任何所需的契约变更;当行为和范围达成一致后,该 issue 即完成。

由索引模型根据 Issue 内容生成。

描述

discussion

closeAllocation() is the function that allows unallocating tokens assigned to a particular subgraph and eventually collecting all funds from state channels.

To avoid an indexer never closing an allocation and as a consequence never distributing the funds, we allow delegators to force close an allocation after maxAllocationEpochs.

An indexer would want to close the allocation before maxAllocationEpochs. It has two incentives to do so:

  1. Effective allocation stops counting after maxAllocationEpochs.
  2. If a delegators close the allocation a POI won't be able to be presented and no rewards are distributed.

I wonder if it is a good idea to also include a grace period after maxAllocationEpochs to detach these two times.

  • indexers can close any time
  • soft penalty: no effective allocation is counted after maxAllocationEpochs
  • hard penalty: delegators can force close after maxAllocationEpochs + gracePeriod

For simplicity we can keep only maxAllocationEpochs and then add a grace period if necessary.

主要语言
Solidity
星标
373
派生
175
平均合并
17 小时 29 分钟
30 天内合并 PR
3

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

graphprotocol/contracts 的其他 Issue

查看 graphprotocol/contracts 的全部 Issue

相似的 Issue

更多 Blockchain Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。