Skip to content

v2: increase transactions per tick to 4096 and drop pkg/errors#35

Merged
0xluk merged 3 commits into
mainfrom
34-increase-number-of-transactions-per-tick
May 13, 2026
Merged

v2: increase transactions per tick to 4096 and drop pkg/errors#35
0xluk merged 3 commits into
mainfrom
34-increase-number-of-transactions-per-tick

Conversation

@0xluk

@0xluk 0xluk commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

1024 → 4096 sites

NumberOfTransactionsPerTick is raised from 1024 to 4096 in types/tick.go:10. The following struct fields are sized off that constant and therefore grow on the wire:

Field File:line Size before → after
TickData.TransactionDigests types/tick.go:25[NumberOfTransactionsPerTick][32]byte 32 KiB → 128 KiB
TransactionStatus.MoneyFlew types/transaction.go:222[(NumberOfTransactionsPerTick + 7) / 8]byte 128 B → 512 B
RequestTickTransactions.TransactionFlags (anonymous struct in GetTickTransactions) qubic.go:201[types.NumberOfTransactionsPerTick / 8]uint8 128 B → 512 B

TickData.ContractFees is not scaled with this constant — it is indexed by contract, not by transaction. It now uses a new MaxNumberOfContracts = 1024 constant (types/tick.go:11, field at types/tick.go:27) and keeps its original size.

Other changes

  • Module path updated to github.com/qubic/go-node-connector/v2 per Go's major version suffix rule; all internal imports updated to match. Breaking change — consumers must update import paths and bump to @v2.
  • Migrates from github.com/pkg/errors to stdlib: errors.Wrap/Wrapffmt.Errorf("...: %w", err), errors.Errorffmt.Errorf, errors.New kept against the stdlib package. pkg/errors is no longer a direct dependency (remains // indirect via go-schnorrq). Imports regrouped stdlib / external.
  • Flips integration test build tag from !ci (exclude-in-CI) to integration (opt-in), and drops -tags ci from the CI workflow so default go test ./... skips network-dependent tests.
  • Bumps Go toolchain to 1.26 and refreshes direct/indirect dependencies.

Test plan

  • go build ./... is clean
  • go test ./... (no tags) passes locally and in CI
  • go test -tags=integration ./... is the new opt-in for network tests
  • On merge, tag v2.0.0 so go get github.com/qubic/go-node-connector/v2 resolves

0xluk added 2 commits May 13, 2026 12:32
Raises NumberOfTransactionsPerTick from 1024 to 4096. Struct sizes
that derive from it (TickData.TransactionDigests/ContractFees,
TransactionStatus.MoneyFlew, RequestTickTransactions.TransactionFlags)
resize automatically; remaining hardcoded [1024] occurrences now use
the named constant. Module path updated to /v2 per Go module
versioning rules so consumers can `go get @v2`. Integration test
build tag flipped from `!ci` (exclude-in-CI) to `integration`
(opt-in), and the CI workflow drops the `-tags ci` flag. Go toolchain
bumped to 1.26 and direct/indirect dependencies refreshed.
@0xluk 0xluk linked an issue May 13, 2026 that may be closed by this pull request
0xluk added a commit to qubic/go-archiver-v2 that referenced this pull request May 13, 2026
Bumps go-node-connector to v2 (pseudo-version from
qubic/go-node-connector#35), which raises NumberOfTransactionsPerTick
from 1024 to 4096. Resizes archiver-v2's hardcoded [1024] / [128]byte
literals to use the named constant so future bumps auto-scale.
Migrates the remaining pkg/errors call sites in this repo to stdlib
errors / fmt.Errorf so we can drop the direct dependency.

@LINCKODE LINCKODE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The ContractFees array is indexed by contract, not by transaction, so
it should not scale with NumberOfTransactionsPerTick. Reintroduce the
distinct constant (kept at 1024) and update the affected test fixtures.
0xluk added a commit to qubic/go-archiver-v2 that referenced this pull request May 13, 2026
Upstream reverted the accidental ContractFees bump in
qubic/go-node-connector#35: the field is now sized by
MaxNumberOfContracts (1024) rather than NumberOfTransactionsPerTick
(4096). Bump the pseudo-version to the revert commit and adjust
contractFeesToProto + its test fixture to match.
@0xluk 0xluk merged commit 282f3ba into main May 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increase number of transactions per tick

3 participants