chore: charge 100 TRUF per stream on stream creation#1384
Conversation
Time Submission Status
You can submit time with the command. Example: See available commands to help comply with our Guidelines. |
📝 WalkthroughWalkthroughThis PR implements a universal per-stream creation fee model: all callers are charged 100 TRUF per stream created, unconditionally, replacing prior role-gated flat-fee logic. Fee constants are added, migration actions are rewritten, test helpers are updated, and comprehensive test scenarios verify the new deductions and ledger behavior. ChangesUniversal Per-Stream Creation Fees
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@holdex pr submit-time 4h |
resolves: https://github.com/truflation/website/issues/3971
Summary
create_streamswith 100 TRUF × N (issue truflation/website#3971) — pricing now scales with stream count so batch dumps can't piggyback storage growth on one tx.system:fee_requiredrole gate fromcreate_streamsonly; charging is now universal.insert_records/insert_taxonomykeep the phased-rollout gate, andcreate_data_provider'snetwork_writerrequirement is unchanged.eth_trufoverride viascripts/generate_prod_migrations.py.Test plan
kwil-cli utils parseclean on both001-common-actions.sqland.prod.sqlgo vet -tags kwiltest ./...cleanTestStreamCreationFees(7 cases rewritten for per-stream math + universal charging)TestInsertRecordsFees,TestTransactionEventsLedger,TestTransactionInputActions,TestTransactionIDTracking,TestAllowZerosCombinationsall greenTestSettlementIntegrationgreenInsufficient balance for stream creation. Required: 100 TRUF per streamSummary by CodeRabbit