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

PE-3173: Utilize Turbo Uploads for Quick Sync #1362

Merged
merged 31 commits into from
Oct 4, 2023
Merged

PE-3173: Utilize Turbo Uploads for Quick Sync #1362

merged 31 commits into from
Oct 4, 2023

Conversation

matibat
Copy link
Contributor

@matibat matibat commented Sep 14, 2023

@matibat matibat self-assigned this Sep 14, 2023
@github-actions
Copy link

github-actions bot commented Sep 14, 2023

Visit the preview URL for this PR (updated for commit 2ab486d):

https://ardrive-web--pr1362-pe-3173-sku13v5z.web.app

(expires Wed, 11 Oct 2023 19:01:41 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a224ebaee2f0939e7665e7630e7d3d6cd7d0f8b0

Copy link
Collaborator

@thiagocarvalhodev thiagocarvalhodev left a comment

Choose a reason for hiding this comment

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

There are a few commented codes we need to remove. Besides that, it looks good to me.

One important note for this feature is that in the future we will unify all the upload actions into a single component. Upload revisions (a file, or just rename or move actions), new files, snapshots, pins, etc.

This new component will abstract the entire logic for Turbo/AR, and the logic implemented here + upload will be unified into this component.

@@ -180,7 +212,7 @@ class CreateSnapshotCubit extends Cubit<CreateSnapshotState> {

Future<void> _prepareAndSignTx(
SnapshotEntity snapshotEntity,
Uint8List data,
// Uint8List data,
Copy link
Collaborator

Choose a reason for hiding this comment

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

commented code.

@@ -191,10 +223,14 @@ class CreateSnapshotCubit extends Cubit<CreateSnapshotState> {
));

await prepareTx(isArConnectProfile);
await _pst.addCommunityTipToTx(_preparedTx);
// await _pst.addCommunityTipToTx(_preparedDataItem); // Turbo should be the one setting the tip, right?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, we don't add the community tip in the client side for Turbo

final wallet = profile.wallet;

final addr = await wallet.getAddress();
logger.d('Posting snapshot transaction with $addr');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the $addr really required in this log? If not, consider removing it

@@ -28,6 +28,7 @@ class UploadPlan {
required Map<String, FileDataItemUploadHandle> fileDataItemUploadHandles,
required Map<String, FolderDataItemUploadHandle>
folderDataItemUploadHandles,
// required Map<String, UploadHandle> snapshotUploadHandles,
Copy link
Collaborator

Choose a reason for hiding this comment

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

commented code

Copy link
Collaborator

@thiagocarvalhodev thiagocarvalhodev left a comment

Choose a reason for hiding this comment

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

LGTM.

PE-4665: Snapshot creation disabled without ARs
@matibat matibat merged commit ce155d5 into dev Oct 4, 2023
6 checks passed
@matibat matibat deleted the PE-3173 branch October 4, 2023 19:14
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.

2 participants