Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement pending state for airdrop purposes #13566

Conversation

ibankov
Copy link
Contributor

@ibankov ibankov commented May 29, 2024

Description:
Defining Readable and Writable stores for accessing and manipulating the pending airdrops state

Related issue(s):

Fixes #13938
Fixes #13939
Fixes #13940

Notes for reviewer:

Merge after hashgraph/hedera-protobufs#371 is merged and protobuf updated.

Note: Currently, the schema is added to V0500TokenSchema file but when it's time to merge the story we will move it to the correct version

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@ibankov ibankov self-assigned this May 29, 2024
@ibankov ibankov force-pushed the 13113-read-write-airdrop-store branch from 0955fc8 to 2de6a7f Compare May 29, 2024 12:27
@@ -39,6 +43,8 @@
public class V0500TokenSchema extends Schema {
private static final Logger log = LogManager.getLogger(V0500TokenSchema.class);
private static final String SHARED_VALUES_KEY = "V0500_FIRST_STORAGE_KEYS";
private static final long MAX_PENDING_AIRDROPS = 1_000_000_000L;
Copy link
Contributor

Choose a reason for hiding this comment

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

A question for the PR reviewer: do you think this is accurate?

Copy link
Member

Choose a reason for hiding this comment

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

I am not sure what is the decided value for this. @Nana-EC @netopyr Do you know if this is correct ?

Comment on lines +50 to +51
@ConfigProperty(value = "maxAllowedAirdrops", defaultValue = "1000000") @NetworkProperty
long maxAllowedAirdorps,
Copy link
Contributor

Choose a reason for hiding this comment

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

Waiting for @netopyr to give us the exact value here.

@ibankov ibankov marked this pull request as ready for review June 3, 2024 13:07
@ibankov ibankov requested a review from a team June 3, 2024 13:07
@ibankov ibankov requested a review from a team as a code owner June 3, 2024 13:07
@ibankov ibankov requested review from jasperpotts and iwsimon June 3, 2024 13:07
vtronkov
vtronkov previously approved these changes Jun 4, 2024
Copy link
Contributor

@vtronkov vtronkov left a comment

Choose a reason for hiding this comment

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

LGTM

@vtronkov vtronkov changed the title feat: 13113 read write airdrop store feat: read write airdrop store Jun 4, 2024
@mustafauzunn mustafauzunn added the Limechain Work planned for the LimeChain team label Jun 4, 2024
@ibankov ibankov requested review from a team, tinker-michaelj and rbair23 as code owners June 4, 2024 07:58
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 82.00000% with 9 lines in your changes missing coverage. Please review.

Please upload report for BASE (airdrop-store-and-tokenAirdropTransaction-implementation@676c12f). Learn more about missing BASE report.

Current head 07c914d differs from pull request most recent head 072812b

Please upload reports for the commit 072812b to get more accurate results.

Files Patch % Lines
...edera/node/app/hapi/utils/CommonPbjConverters.java 0.00% 5 Missing ⚠️
.../src/main/java/com/hedera/hapi/util/HapiUtils.java 0.00% 2 Missing ⚠️
...dera/node/app/metrics/StoreMetricsServiceImpl.java 0.00% 1 Missing ⚠️
...a/node/app/service/token/ReadableAirdropStore.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                                     Coverage Diff                                     @@
##             airdrop-store-and-tokenAirdropTransaction-implementation   #13566   +/-   ##
===========================================================================================
  Coverage                                                            ?   58.32%           
  Complexity                                                          ?    22112           
===========================================================================================
  Files                                                               ?     2890           
  Lines                                                               ?   109789           
  Branches                                                            ?    11169           
===========================================================================================
  Hits                                                                ?    64034           
  Misses                                                              ?    42214           
  Partials                                                            ?     3541           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…plementation' into 13113-read-write-airdrop-store

# Conflicts:
#	hedera-node/hedera-mono-service/src/main/java/com/hedera/node/app/service/mono/pbj/PbjConverter.java
Copy link
Member

@Neeharika-Sompalli Neeharika-Sompalli left a comment

Choose a reason for hiding this comment

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

LGTM! But, I had one question for @Nana-EC and @netopyr on the configuration value

…plementation' into 13113-read-write-airdrop-store

# Conflicts:
#	hapi/build.gradle.kts
#	hedera-node/hedera-config/src/main/java/com/hedera/node/config/data/ApiPermissionConfig.java
@vtronkov vtronkov requested a review from a team as a code owner June 28, 2024 03:27
@vtronkov vtronkov requested a review from dalvizu June 28, 2024 03:27
@ibankov ibankov merged commit 8204322 into airdrop-store-and-tokenAirdropTransaction-implementation Jul 2, 2024
40 of 41 checks passed
@ibankov ibankov deleted the 13113-read-write-airdrop-store branch July 2, 2024 12:45
JivkoKelchev pushed a commit that referenced this pull request Jul 17, 2024
ibankov added a commit that referenced this pull request Jul 17, 2024
Signed-off-by: ibankov <[email protected]>
Co-authored-by: Valentin Tronkov <[email protected]>
Signed-off-by: ibankov <[email protected]>
@github-staff github-staff deleted a comment from ibankov Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Limechain Work planned for the LimeChain team
Projects
None yet
4 participants