chore: add stream creation fees#1244
Conversation
Implements transaction fee collection for stream creation operations. Charges 2 TRUF per stream created, with automated systems exempted via role-based access control. Fees are distributed to block proposers to incentivize network participation. - Introduces revenue model for stream creation operations - Preserves zero-fee operations for authorized data providers - Incentivizes validators through fee distribution - Foundation for implementing remaining transaction fee types resolves: trufnetwork/truf-network#1312
WalkthroughAdds 2 TRUF-per-stream fee collection to the create_streams action with exemption for callers holding Changes
Sequence DiagramsequenceDiagram
participant Caller as Caller (wallet)
participant Action as create_streams
participant Auth as Role Check
participant Bridge as Ethereum Bridge
participant Leader as Leader (recipient)
participant Store as Stream Creation
Caller->>Action: Request create_streams (n streams, @leader_sender)
Action->>Auth: are_members_of('system','network_writer', Caller)
alt is network_writer (exempt)
Auth-->>Action: exempt
Action->>Store: create n streams
Store-->>Caller: success
else not exempt
Auth-->>Action: not exempt
Action->>Bridge: balance(Caller)
Bridge-->>Action: current_balance
alt balance >= 2 * n TRUF
Action->>Bridge: transfer(total_fee -> Leader)
Bridge-->>Action: transfer success
Action->>Store: create n streams
Store-->>Caller: success
else insufficient
Action-->>Caller: error "Insufficient balance for stream creation"
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 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 |
Time Submission Status
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
internal/migrations/026-transaction-fees.sql(1 hunks)internal/migrations/0_test_only/transaction-fees-testonly.sql(1 hunks)tests/streams/stream_creation_fee_test.go(1 hunks)tests/streams/utils/setup/common.go(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-23T07:00:26.796Z
Learnt from: williamrusdyputra
Repo: trufnetwork/node PR: 1228
File: internal/migrations/erc20-bridge/000-extension.sql:16-19
Timestamp: 2025-10-23T07:00:26.796Z
Learning: In internal/migrations/erc20-bridge/000-extension.sql, the active sepolia_bridge configuration is intentionally for test environments only and does not include the distribution_period parameter. The commented sepolia_bridge and ethereum_bridge blocks with distribution_period are production configurations.
Applied to files:
internal/migrations/0_test_only/transaction-fees-testonly.sql
🧬 Code graph analysis (2)
tests/streams/stream_creation_fee_test.go (7)
tests/streams/utils/runner.go (1)
RunSchemaTest(37-116)internal/migrations/migration.go (1)
GetSeedScriptPaths(15-48)tests/streams/utils/utils.go (1)
GetTestOptionsWithCache(75-88)tests/streams/utils/setup/roles.go (1)
AddMemberToRoleBypass(73-98)tests/streams/utils/setup/common.go (2)
CreateDataProvider(192-233)CreateDataProviderWithoutRole(242-294)tests/streams/utils/erc20/inject.go (1)
InjectERC20Transfer(24-85)tests/streams/utils/erc20/helper.go (1)
GetUserBalance(49-74)
tests/streams/utils/setup/common.go (1)
tests/streams/utils/setup/roles.go (1)
AddMemberToRoleBypass(73-98)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: lint
- GitHub Check: acceptance-test
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
internal/migrations/001-common-actions.sql (1)
84-86: Normalize leader address with 0x prefix before transfer.Everything else in our ERC-20 helpers and tests passes addresses in 0x-prefixed form. Adding the prefix here keeps formats consistent and avoids relying on the bridge extension to infer it.
- $leader_addr TEXT := encode(@leader_sender, 'hex')::TEXT; + $leader_addr TEXT := '0x' || encode(@leader_sender, 'hex')::TEXT;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
internal/migrations/001-common-actions.sql(1 hunks)internal/migrations/migration.go(1 hunks)tests/streams/roles/permission_gates_test.go(6 hunks)tests/streams/stream_creation_fee_test.go(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-22T13:56:02.283Z
Learnt from: outerlook
Repo: trufnetwork/node PR: 1168
File: internal/migrations/migration.go:22-37
Timestamp: 2025-09-22T13:56:02.283Z
Learning: The `GetSeedScriptPaths()` function in internal/migrations/migration.go is intended for test usage and should include test_only/*.sql files by design, not guard against them.
Applied to files:
internal/migrations/migration.go
🧬 Code graph analysis (2)
tests/streams/roles/permission_gates_test.go (1)
tests/streams/utils/setup/common.go (1)
UntypedCreateStream(59-95)
tests/streams/stream_creation_fee_test.go (7)
tests/streams/utils/runner.go (1)
RunSchemaTest(37-116)internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)tests/streams/utils/utils.go (1)
GetTestOptionsWithCache(75-88)tests/streams/utils/setup/roles.go (1)
AddMemberToRoleBypass(73-98)tests/streams/utils/setup/common.go (2)
CreateDataProvider(193-234)CreateDataProviderWithoutRole(243-295)tests/streams/utils/erc20/inject.go (1)
InjectERC20Transfer(24-85)tests/streams/utils/erc20/helper.go (1)
GetUserBalance(49-74)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: acceptance-test
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (48)
extensions/tn_attestation/harness_integration_test.go(1 hunks)extensions/tn_cache/internal/engine_ops_integration_test.go(2 hunks)extensions/tn_cache/internal/engine_ops_permissions_test.go(1 hunks)internal/benchmark/digest/digest_benchmark_test.go(1 hunks)internal/benchmark/load_test.go(1 hunks)tests/database_size/database_size_v2_test.go(1 hunks)tests/extensions/database-size/database_size_extension_test.go(1 hunks)tests/extensions/erc20/common_test.go(2 hunks)tests/extensions/tn_cache/cache_height_tracking_test.go(1 hunks)tests/extensions/tn_cache/cache_integration_test.go(3 hunks)tests/extensions/tn_cache/cache_observability_test.go(1 hunks)tests/extensions/tn_cache/resolution_transaction_test.go(1 hunks)tests/streams/aggregation/aggr01_basic_aggregation_test.go(1 hunks)tests/streams/aggregation/aggr02_weighted_contributions_test.go(1 hunks)tests/streams/aggregation/aggr03_taxonomy_validity_periods_test.go(1 hunks)tests/streams/aggregation/aggr04_missing_data_handling_test.go(1 hunks)tests/streams/aggregation/aggr05_no_duplicate_child_streams_test.go(1 hunks)tests/streams/aggregation/aggr06_single_active_taxonomy_test.go(1 hunks)tests/streams/aggregation/aggr07_inexistent_streams_test.go(1 hunks)tests/streams/aggregation/aggr08_weight_change_test.go(1 hunks)tests/streams/aggregation/aggr09_duplicate_values_test.go(1 hunks)tests/streams/attestation/attestation_request_test.go(1 hunks)tests/streams/attestation/attestation_retrieval_test.go(2 hunks)tests/streams/auth/auth_test.go(9 hunks)tests/streams/backward_compatibility_test.go(1 hunks)tests/streams/cache_base_time_variants_test.go(1 hunks)tests/streams/common_test.go(4 hunks)tests/streams/complex_composed_test.go(1 hunks)tests/streams/composed_test.go(1 hunks)tests/streams/comprehensive_shared_path_independence_test.go(1 hunks)tests/streams/database_size_test.go(1 hunks)tests/streams/digest/digest_actions_test.go(2 hunks)tests/streams/gamefi_index_test.go(1 hunks)tests/streams/index_change_test.go(1 hunks)tests/streams/multi_level_composed_test.go(1 hunks)tests/streams/other/other_test.go(4 hunks)tests/streams/other/stream_exists_batch_test.go(1 hunks)tests/streams/pending_prune_days_test.go(2 hunks)tests/streams/primitive_batch_insert_alignment_test.go(1 hunks)tests/streams/primitive_test.go(1 hunks)tests/streams/query/metadata_test.go(1 hunks)tests/streams/query/query_test.go(1 hunks)tests/streams/roles/permission_gates_test.go(7 hunks)tests/streams/roles/role_management_test.go(1 hunks)tests/streams/stream_creation_fee_test.go(1 hunks)tests/streams/taxonomy_query_actions_test.go(1 hunks)tests/streams/truflation_composed_frozen_test.go(1 hunks)tests/streams/truflation_primitive_frozen_test.go(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- tests/streams/query/query_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/streams/roles/permission_gates_test.go
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-07-14T18:18:20.905Z
Learnt from: outerlook
Repo: trufnetwork/node PR: 1055
File: extensions/tn_cache/internal/db_ops.go:40-43
Timestamp: 2025-07-14T18:18:20.905Z
Learning: The SetTx method in extensions/tn_cache/internal/db_ops.go is only used in tests that run sequentially, so concurrency concerns about race conditions don't apply to this method.
Applied to files:
tests/extensions/tn_cache/cache_height_tracking_test.goextensions/tn_cache/internal/engine_ops_integration_test.gotests/extensions/tn_cache/cache_integration_test.gotests/extensions/tn_cache/resolution_transaction_test.go
📚 Learning: 2025-09-22T13:56:02.283Z
Learnt from: outerlook
Repo: trufnetwork/node PR: 1168
File: internal/migrations/migration.go:22-37
Timestamp: 2025-09-22T13:56:02.283Z
Learning: The `GetSeedScriptPaths()` function in internal/migrations/migration.go is intended for test usage and should include test_only/*.sql files by design, not guard against them.
Applied to files:
tests/extensions/tn_cache/cache_height_tracking_test.gotests/streams/query/metadata_test.gotests/streams/aggregation/aggr02_weighted_contributions_test.gotests/streams/aggregation/aggr09_duplicate_values_test.gotests/streams/roles/role_management_test.gotests/streams/primitive_test.gotests/streams/aggregation/aggr01_basic_aggregation_test.gotests/streams/attestation/attestation_retrieval_test.gotests/streams/common_test.gotests/streams/digest/digest_actions_test.gotests/streams/multi_level_composed_test.gotests/streams/primitive_batch_insert_alignment_test.goextensions/tn_cache/internal/engine_ops_integration_test.gotests/streams/cache_base_time_variants_test.gotests/streams/aggregation/aggr08_weight_change_test.gointernal/benchmark/digest/digest_benchmark_test.gotests/streams/truflation_primitive_frozen_test.gotests/extensions/erc20/common_test.gotests/database_size/database_size_v2_test.gotests/streams/attestation/attestation_request_test.gotests/streams/backward_compatibility_test.gotests/streams/aggregation/aggr06_single_active_taxonomy_test.gotests/streams/aggregation/aggr04_missing_data_handling_test.gotests/streams/database_size_test.gotests/streams/taxonomy_query_actions_test.gotests/extensions/tn_cache/cache_integration_test.gotests/streams/gamefi_index_test.gotests/streams/aggregation/aggr03_taxonomy_validity_periods_test.gotests/streams/auth/auth_test.gotests/streams/composed_test.goextensions/tn_cache/internal/engine_ops_permissions_test.gotests/streams/complex_composed_test.gotests/streams/comprehensive_shared_path_independence_test.gotests/extensions/tn_cache/cache_observability_test.gotests/streams/pending_prune_days_test.gotests/streams/other/stream_exists_batch_test.goextensions/tn_attestation/harness_integration_test.gotests/streams/index_change_test.gotests/streams/aggregation/aggr07_inexistent_streams_test.gointernal/benchmark/load_test.gotests/extensions/database-size/database_size_extension_test.gotests/extensions/tn_cache/resolution_transaction_test.gotests/streams/aggregation/aggr05_no_duplicate_child_streams_test.gotests/streams/truflation_composed_frozen_test.gotests/streams/other/other_test.go
🧬 Code graph analysis (46)
tests/extensions/tn_cache/cache_height_tracking_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/query/metadata_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/aggregation/aggr02_weighted_contributions_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/aggregation/aggr09_duplicate_values_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/roles/role_management_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/primitive_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/aggregation/aggr01_basic_aggregation_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/attestation/attestation_retrieval_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/common_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/digest/digest_actions_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/multi_level_composed_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/primitive_batch_insert_alignment_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
extensions/tn_cache/internal/engine_ops_integration_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/cache_base_time_variants_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/aggregation/aggr08_weight_change_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
internal/benchmark/digest/digest_benchmark_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/truflation_primitive_frozen_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/stream_creation_fee_test.go (7)
tests/streams/utils/runner.go (1)
RunSchemaTest(37-116)internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)tests/streams/utils/utils.go (1)
GetTestOptionsWithCache(75-88)tests/streams/utils/setup/roles.go (1)
AddMemberToRoleBypass(73-98)tests/streams/utils/setup/common.go (2)
CreateDataProvider(193-234)CreateDataProviderWithoutRole(243-295)tests/streams/utils/erc20/inject.go (1)
InjectERC20Transfer(24-85)tests/streams/utils/erc20/helper.go (1)
GetUserBalance(49-74)
tests/extensions/erc20/common_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/database_size/database_size_v2_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/attestation/attestation_request_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/backward_compatibility_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/aggregation/aggr06_single_active_taxonomy_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/aggregation/aggr04_missing_data_handling_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/database_size_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/taxonomy_query_actions_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/extensions/tn_cache/cache_integration_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/gamefi_index_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/aggregation/aggr03_taxonomy_validity_periods_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/auth/auth_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/composed_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
extensions/tn_cache/internal/engine_ops_permissions_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/complex_composed_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/comprehensive_shared_path_independence_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/extensions/tn_cache/cache_observability_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/pending_prune_days_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/other/stream_exists_batch_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
extensions/tn_attestation/harness_integration_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/index_change_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/aggregation/aggr07_inexistent_streams_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
internal/benchmark/load_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/extensions/database-size/database_size_extension_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/extensions/tn_cache/resolution_transaction_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/aggregation/aggr05_no_duplicate_child_streams_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/truflation_composed_frozen_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
tests/streams/other/other_test.go (1)
internal/migrations/migration.go (1)
GetSeedScriptStatements(60-109)
🪛 GitHub Actions: CI
tests/streams/auth/auth_test.go
[error] 45-45: undefined: testutils.RunSchemaTest
🔇 Additional comments (45)
tests/streams/primitive_batch_insert_alignment_test.go (1)
35-35: Seed data migration looks good.The switch from
SeedScriptstoSeedStatementsaligns with the repository-wide migration to inline seed statements, and the test logic remains unchanged.tests/streams/aggregation/aggr02_weighted_contributions_test.go (1)
37-37: Seed data migration looks good.The switch from
SeedScriptstoSeedStatementsaligns with the repository-wide migration to inline seed statements, and the test logic remains unchanged.tests/streams/other/stream_exists_batch_test.go (1)
27-27: Seed data migration looks good.The switch from
SeedScriptstoSeedStatementsaligns with the repository-wide migration to inline seed statements, and the test logic remains unchanged.tests/extensions/tn_cache/cache_height_tracking_test.go (1)
35-35: Seed data migration looks good.The switch from
SeedScriptstoSeedStatementsaligns with the repository-wide migration to inline seed statements, and the test logic remains unchanged.tests/streams/taxonomy_query_actions_test.go (1)
36-36: Seed data migration looks good.The switch from
SeedScriptstoSeedStatementsaligns with the repository-wide migration to inline seed statements, and the test logic remains unchanged.tests/streams/auth/auth_test.go (2)
47-47: Seed data migration looks good.The switch from
SeedScriptstoSeedStatementsacross all test functions aligns with the repository-wide migration to inline seed statements. The test logic remains unchanged.Also applies to: 58-58, 179-179, 300-300, 465-465, 534-534, 631-631, 859-859, 926-926
45-45: Compilation error claim is unfounded; remove this comment.The
testutilspackage is properly imported as"github.com/trufnetwork/node/tests/streams/utils", and theRunSchemaTestfunction exists and is exported intests/streams/utils/runner.go:37. The function is called correctly throughout the file. The review comment references a stale or false pipeline error; the code compiles without the claimedundefined: testutils.RunSchemaTesterror.Likely an incorrect or invalid review comment.
extensions/tn_cache/internal/engine_ops_integration_test.go (1)
35-35: Seed data migration looks good.The switch from
SeedScriptstoSeedStatementsin both test functions aligns with the repository-wide migration to inline seed statements, and the test logic remains unchanged.Also applies to: 334-334
tests/streams/attestation/attestation_request_test.go (1)
28-28: Seed data migration looks good.The switch from
SeedScriptstoSeedStatementsaligns with the repository-wide migration to inline seed statements, and the test logic remains unchanged.extensions/tn_cache/internal/engine_ops_permissions_test.go (1)
29-29: LGTM: Seed data source migration.The switch from
SeedScriptstoSeedStatementsaligns with the broader test infrastructure refactor. The newGetSeedScriptStatements()function centralizes seed data loading and applies test-specific transformations internally, which is cleaner than the previous path-based approach.tests/streams/aggregation/aggr03_taxonomy_validity_periods_test.go (1)
40-40: LGTM: Seed data source migration.Consistent with the repository-wide migration from path-based to statement-based seed data provisioning.
tests/streams/comprehensive_shared_path_independence_test.go (1)
37-37: LGTM: Seed data source migration.The migration to
SeedStatementsis consistent with the broader test infrastructure refactor across the codebase.tests/extensions/tn_cache/cache_observability_test.go (1)
34-34: LGTM: Seed data source migration.Aligns with the repository-wide switch to statement-based seed data provisioning.
tests/streams/roles/role_management_test.go (1)
86-86: LGTM: Seed data source migration.Consistent with the test infrastructure refactor that centralizes seed data loading and test-specific transformations.
tests/streams/common_test.go (1)
46-46: LGTM: Seed data source migration.All four test configurations in this file consistently migrate from
SeedScriptstoSeedStatements, aligning with the broader test infrastructure refactor.tests/streams/primitive_test.go (1)
26-26: LGTM: Seed data source migration.The switch to
SeedStatementsis consistent with the repository-wide test infrastructure refactor.tests/streams/aggregation/aggr09_duplicate_values_test.go (1)
46-46: LGTM: Seed data source migration.Consistent with the broader migration to statement-based seed data provisioning via
GetSeedScriptStatements().tests/database_size/database_size_v2_test.go (1)
38-38: LGTM! Consistent seed data migration.The migration from
SeedScriptstoSeedStatementsaligns with the project-wide refactoring to inline seed statements rather than using script paths. This change has no functional impact on the test.tests/streams/other/other_test.go (1)
33-33: LGTM! Consistent seed data migration across multiple tests.All four test functions correctly migrate from
SeedScriptstoSeedStatementsusing the newGetSeedScriptStatements()helper. The changes are consistent and have no functional impact on test behavior.Also applies to: 93-93, 204-204, 255-255
tests/streams/truflation_primitive_frozen_test.go (1)
29-29: LGTM! Seed data migration applied correctly.The change from
SeedScriptstoSeedStatementsis consistent with the project-wide refactoring to use inline seed statements.tests/streams/aggregation/aggr04_missing_data_handling_test.go (1)
39-39: LGTM! Seed data migration applied correctly.The migration to
SeedStatementswithGetSeedScriptStatements()is consistent with the repository-wide refactoring and has no functional impact on the aggregation test.tests/streams/truflation_composed_frozen_test.go (1)
34-34: LGTM! Seed data migration applied correctly.The change to
SeedStatementsusingGetSeedScriptStatements()aligns with the project-wide refactoring effort. No functional changes to the frozen composed stream tests.tests/streams/cache_base_time_variants_test.go (1)
35-35: LGTM! Seed data migration applied correctly.The migration to
SeedStatementsis consistent with the broader refactoring to use inline seed statements rather than script paths.tests/streams/aggregation/aggr01_basic_aggregation_test.go (1)
37-37: LGTM! Seed data migration applied correctly.The change from
SeedScriptstoSeedStatementsis part of the repository-wide migration to inline seed statements and has no impact on the basic aggregation test logic.internal/benchmark/load_test.go (1)
244-246: LGTM! Seed data migration applied correctly.The migration from
SeedScriptstoSeedStatementsin the benchmark test setup is consistent with the project-wide refactoring. The change has no functional impact on benchmark execution.tests/streams/composed_test.go (1)
29-29: LGTM! Seed data migration completed correctly.The migration from path-based to statement-based seed provisioning is correct and consistent with the broader refactoring across the test suite.
tests/streams/pending_prune_days_test.go (1)
26-26: LGTM! Both test functions migrated consistently.Both test initialization blocks correctly updated to use the statement-based seed provisioning approach.
Also applies to: 37-37
internal/benchmark/digest/digest_benchmark_test.go (1)
201-201: LGTM! Benchmark test seed provisioning updated correctly.tests/streams/aggregation/aggr06_single_active_taxonomy_test.go (1)
36-36: LGTM! Aggregation test updated correctly.tests/streams/index_change_test.go (1)
27-27: LGTM! Index change test updated correctly.tests/streams/aggregation/aggr07_inexistent_streams_test.go (1)
32-32: LGTM! Test updated correctly.tests/extensions/erc20/common_test.go (1)
31-31: LGTM! ERC20 test helper updated correctly.The seed provisioning migration is implemented correctly with the variable declaration and field assignment both updated consistently.
Also applies to: 53-55
tests/streams/database_size_test.go (1)
28-28: LGTM! Database size test updated correctly.tests/streams/attestation/attestation_retrieval_test.go (2)
23-23: LGTM! Seed data migration applied correctly.The migration from
SeedScriptstoSeedStatementsis consistent with the repository-wide refactor to use inline seed statements instead of script paths.
111-111: LGTM! Consistent seed data migration.Second test properly updated with the same
SeedStatementspattern.tests/extensions/tn_cache/resolution_transaction_test.go (1)
28-28: LGTM! Seed migration correctly applied.Consistent with the repository-wide migration to inline seed statements.
tests/streams/complex_composed_test.go (1)
35-35: LGTM! Seed data migration applied.Follows the consistent pattern for migrating to inline seed statements.
tests/extensions/database-size/database_size_extension_test.go (1)
30-30: LGTM! Consistent seed migration.Properly migrated to use
SeedStatementswith the new helper function.tests/streams/query/metadata_test.go (1)
49-49: LGTM! Migration applied correctly.Seed data now uses inline statements as intended by the repository-wide refactor.
extensions/tn_attestation/harness_integration_test.go (1)
83-83: LGTM! Seed migration in harness test.Correctly migrated to use inline seed statements via
GetSeedScriptStatements().tests/streams/backward_compatibility_test.go (1)
18-18: LGTM! Backward compatibility test updated.Seed migration applied consistently with other test files.
tests/extensions/tn_cache/cache_integration_test.go (3)
39-39: LGTM! Cache integration test migrated.First of three tests in this file correctly updated to use inline seed statements.
221-221: LGTM! Include children test migrated.Second test properly updated with the seed migration pattern.
243-243: LGTM! Base time variants test migrated.Third test consistently updated to use inline seed statements.
tests/streams/gamefi_index_test.go (1)
103-103: Line 103 change is correct, but cannot verify test execution due to unrelated compilation errors in test infrastructure.The change from
SeedScripts: migrations.GetSeedScriptPaths()toSeedStatements: migrations.GetSeedScriptStatements()is correct and properly uses the new seed provisioning API. However, the test suite has compilation failures in unrelated test files (cache_base_time_variants_test.go,complex_composed_test.go) that appear to be pre-existing infrastructure issues with testutils type exports. These prevent verification that the test passes with the new fee system.Action required: Verify that:
- The unrelated compilation errors are resolved or pre-existing
TestGamefiIndexpasses with the fee system active (lines 165, 334 create streams which now incur fees)
|
It is now ready to review again @outerlook |
Implements transaction fee collection for stream creation operations. Charges 2 TRUF per stream created, with automated systems exempted via role-based access control. Fees are distributed to block proposers to incentivize network participation.
resolves: https://github.com/trufnetwork/truf-network/issues/1312
Summary by CodeRabbit