Skip to content

New Group Functionality - #362

Open
QortalSeth wants to merge 23 commits into
Qortal:developfrom
QortalSeth:develop
Open

New Group Functionality#362
QortalSeth wants to merge 23 commits into
Qortal:developfrom
QortalSeth:develop

Conversation

@QortalSeth

Copy link
Copy Markdown

non-owner admins can kick/ban users

Added new Group Join fee set by owner.

QortalSeth and others added 23 commits April 24, 2026 16:06
Group Admins can now Kick/Ban members of a group
Fixed bug that promotes kicked/banned accounts in a group to Admins of that group.

Added CLAUDE.md to make it easier to use AI on the Core.
    a. Added join_fee column to the Groups table in HSQLDBDatabaseUpdates.java (case 52)
    b. Added join_fee column to the GroupInvites table
    c. Added join_fee column to the CreateGroupTransactions table
    d. Added new_join_fee column to the UpdateGroupTransactions table
    e. Added join_fee column to the GroupInviteTransactions table

2. Data Model Updates
    a. Updated GroupData.java to include the join_fee field
    b. Updated CreateGroupTransactionData.java to include the join_fee parameter
    c. Updated UpdateGroupTransactionData.java to include the newJoinFee parameter
    d. Updated GroupInviteTransactionData.java to include the join_fee field
    e. Updated GroupInviteData.java to include the join_fee field

3. Transaction Processing
    a. Modified JoinGroupTransaction.java to check for join_fee and validate balance
    b. Modified GroupInviteTransaction.java to check for join_fee and validate balance
    c. Updated Group.java to handle join_fee when joining groups
    d. Added validation for negative join fees in CreateGroupTransaction.java, UpdateGroupTransaction.java, and GroupInviteTransaction.java
    e. Added INVALID_GROUP_JOIN_FEE to the ValidationResult enum

4. Repository Updates
    a. Updated HSQLDBGroupRepository.java to save/retrieve join_fee
    b. Updated transaction repositories to bind join_fee values when saving transactions
    c. Updated SQL queries to include join_fee fields
5. Transaction Transformers
    a. Updated all relevant transaction transformers to handle join_fee in serialization/deserialization

6. Comprehensive Testing
    a. Created 14 comprehensive tests in JoinFeeTests.java covering:
    b. Creating groups with join fees before and after feature trigger
    c. Updating group join fees before and after feature trigger
    d. Joining groups with join fees before and after feature trigger
    e. Group invites with join fees before and after feature trigger
    f. Balance transfers when joining groups with join fees
    g. Backward compatibility with block heights below feature trigger
    h. Edge cases: insufficient balance, negative join fees, updating join fees

7. Bug Fixes
    a. Fixed double transaction fee deduction during validation
    b. Fixed "Genesis asset 0 missing" error by preventing deletion of genesis assets during orphaning
    c. Fixed balance mismatches in tests by using a dedicated minter account
    d. Fixed orphanCheck issues by adding a flag to skip it for specific tests
Join Fee of 0L added to all tests with joinGroupTransactionData
Group Admins can now Kick/Ban members of a group
Fixed bug that promotes kicked/banned accounts in a group to Admins of that group.

Added CLAUDE.md to make it easier to use AI on the Core.
    a. Added join_fee column to the Groups table in HSQLDBDatabaseUpdates.java (case 52)
    b. Added join_fee column to the GroupInvites table
    c. Added join_fee column to the CreateGroupTransactions table
    d. Added new_join_fee column to the UpdateGroupTransactions table
    e. Added join_fee column to the GroupInviteTransactions table

2. Data Model Updates
    a. Updated GroupData.java to include the join_fee field
    b. Updated CreateGroupTransactionData.java to include the join_fee parameter
    c. Updated UpdateGroupTransactionData.java to include the newJoinFee parameter
    d. Updated GroupInviteTransactionData.java to include the join_fee field
    e. Updated GroupInviteData.java to include the join_fee field

3. Transaction Processing
    a. Modified JoinGroupTransaction.java to check for join_fee and validate balance
    b. Modified GroupInviteTransaction.java to check for join_fee and validate balance
    c. Updated Group.java to handle join_fee when joining groups
    d. Added validation for negative join fees in CreateGroupTransaction.java, UpdateGroupTransaction.java, and GroupInviteTransaction.java
    e. Added INVALID_GROUP_JOIN_FEE to the ValidationResult enum

4. Repository Updates
    a. Updated HSQLDBGroupRepository.java to save/retrieve join_fee
    b. Updated transaction repositories to bind join_fee values when saving transactions
    c. Updated SQL queries to include join_fee fields
5. Transaction Transformers
    a. Updated all relevant transaction transformers to handle join_fee in serialization/deserialization

6. Comprehensive Testing
    a. Created 14 comprehensive tests in JoinFeeTests.java covering:
    b. Creating groups with join fees before and after feature trigger
    c. Updating group join fees before and after feature trigger
    d. Joining groups with join fees before and after feature trigger
    e. Group invites with join fees before and after feature trigger
    f. Balance transfers when joining groups with join fees
    g. Backward compatibility with block heights below feature trigger
    h. Edge cases: insufficient balance, negative join fees, updating join fees

7. Bug Fixes
    a. Fixed double transaction fee deduction during validation
    b. Fixed "Genesis asset 0 missing" error by preventing deletion of genesis assets during orphaning
    c. Fixed balance mismatches in tests by using a dedicated minter account
    d. Fixed orphanCheck issues by adding a flag to skip it for specific tests
Join Fee of 0L added to all tests with joinGroupTransactionData
# Conflicts:
#	src/main/java/org/qortal/block/BlockChain.java
#	src/main/java/org/qortal/repository/hsqldb/HSQLDBDatabaseUpdates.java
#	src/main/resources/blockchain.json
#	src/test/resources/test-chain-v2.json
Updated groupFeeHeight feature trigger value
Updated groupFeeHeight feature trigger value
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.

1 participant