hirosystems / hirosystems/stacks-blockchain-api

Missing stackers in "stackers-for-signer-in-cycle" endpoint when pool uses multiple signers

Open
#2,356 0 comments 1 reaction 1 assignee Claimed by @rafaelcr View on GitHub
Dominant language
TypeScript
Stars
193
Forks
127
Avg merge
16h 35m
Merged PRs (30d)
46

Description

**Describe the bug**

When a Stacks Pool (a signle Stacks address) uses multiple signers, the ["stackers-for-signer-in-cycle"](https://docs.hiro.so/en/apis/stacks-blockchain-api/reference/proof-of-transfer/stackers-for-signer-in-cycle) endpoint incorrectly returns the stackers assigned to each signer.

**To Reproduce**

Consistent reproduction of the issue can be achieved using clarinet:

**1.** Create a pool key + address

Can use one of the pre-seeded wallets, e.g. `wallet_5` as the Pool Admin.

**2.** Set up clarinet with three signers.

Add the private keys to `settings/Devnet.toml`:

```toml
[devnet]
stacks_signers_keys = [
"1234...0001",
"1234...0002",
"1234...0003"
]
# ... other props
```

**3.** Stack against these signers

Create a few (e.g. 100) random wallets, fund them by pulling funds from the pre-seeded wallets, and delegate their funds to the pool.

The pool admin then stacks these funds, evenly distributing them among the three signers.

**Expected behavior**

When querying the "stackers-for-signer-in-cycle" endpoint, each signer should have the stackers it was assigned.

**Actual behavior**

Two things stand out:

**Bug 1**: The API seems to assign all stackers to a single signer. The results for each signer will look something like:

```
Signer 1: 100 stackers
Signer 2: 0 stackers
Signer 3: 0 stackers
```

**Bug 2**: As stackers continue to be added, the API will at some point start to "drop" them. For example, after stacking ~400 stackers, the API will return something like:

```
Signer 1: 233 stackers (expecting 400)
Signer 2: 0 stackers
Signer 3: 0 stackers
```

**Desktop (please complete the following information):**
- OS: MacOS 15.5
- Clarinet: clarinet 3.7.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.