Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Request JSONs need to be pre-processed to prefix bytes with leading `0x` if not present

オープン
#349 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

PostFarmerRequest、PutFarmerRequest、PostPartialRequest の JSON パースのエントリポイントを特定し、それぞれの bytes フィールドが現在どのようにデコードされているかを確認します。各リクエストのペイロードを前処理して、先頭に 0x がない bytes を受け入れられるようにし、既存のプレフィックスは引き続き有効にします。3 つすべてのリクエスト型が両方の形式を一貫して処理できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

With chia-blockchain moving to chia_rs, bytes values parsed from JSON are now enforced to have a leading 0x: https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/bytes.rs#L97-L101. According to https://github.com/Chia-Network/chia-blockchain/issues/13623, this enforcement is the expected and desired behaviour.

The Chia Pool Protocol 1.0 specification, however, allows bytes to be sent without leading 0x: "All bytes values are encoded as hex with optional 0x in front" (https://github.com/Chia-Network/pool-reference/blob/main/SPECIFICATION.md#https-endpoints-summary).

There are farmer implementations in the wild which send some values without a 0x prefix.

Thus, parsing of all JSON request payloads (PostFarmerRequest, PutFarmerRequest, and PostPartialRequest) needs to be adjusted to pre-process the JSON payload and prepend 0x in bytes field where the 0x is not present.

主要言語
Python
スター
429
フォーク
189
平均マージ
54分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Chia-Network/pool-reference のほかの issue

Chia-Network/pool-reference の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。