Skip to content

Conversation

@leozc
Copy link
Contributor

@leozc leozc commented Apr 1, 2025

What changed? Why?

  1. This change includes a list of improvements from CipherOwl based on the original ChainStorage from Coinbase
  2. Key improvement:
    2.1 Adding LTC / Tron Support,
    2.2 Adding ZSTD support
    2.3 Making ChainStorage more friendly for opensource / k8s environment

How did you test the change?

  • [ X ] unit test
  • [ X ] integration test
  • functional test
  • adhoc test (described below)
  • running in production

ImNumber4 and others added 30 commits January 24, 2024 19:36
…replicator

# Conflicts:
#	internal/workflow/replicator.go
Signed-off-by: Henry Yang <henry.yang@cipherowl.com>
PikaZ76 and others added 30 commits November 19, 2025 21:59
retry workflow for create temporal session failure by continue as new
Support {VAR} env placeholders in endpoint URLs
Add two layers of protection against truncated/corrupted JSON responses
from Tron REST API endpoints:

1. Content-Length validation in REST API client: Detects when actual
   response bytes don't match the Content-Length header, indicating
   premature connection close. This is retried at the HTTP level.

2. JSON validation in Tron client: Validates response is valid JSON
   before attempting to unmarshal. Catches cases where Content-Length
   is not present (chunked encoding) or data is corrupted.

Both validations include logging with response preview for debugging.
Errors are marked as retryable to allow automatic retry.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…onse

fix: Add validation for truncated JSON responses in Tron client
* chore: Migrate AWS SDK from v1 to v2

This commit completes the migration from github.com/aws/aws-sdk-go (v1) to
github.com/aws/aws-sdk-go-v2 (v2) to address CVE-2020-8911 security vulnerability.

Changes:
- internal/aws/*: Rewrite config and retryer for v2, delete session.go
- internal/storage/metastorage/dynamodb/*: Migrate to v2 DynamoDB API
  - dynamodbattribute -> attributevalue
  - types.AttributeValue instead of *dynamodb.AttributeValue
- internal/s3/*: Migrate to v2 S3 API with manager package
- internal/storage/blobstorage/s3/*: Update ACL to use v2 types
- internal/dlq/sqs/*: Migrate to v2 SQS API
- cmd/admin/migrate.go: Update DynamoDB client usage
- Regenerate all mocks for v2 interfaces
- Update test files to use v2 SDK types

The v1 SDK has been removed from direct dependencies in go.mod.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* remove unused file

* chore: Upgrade Go version from 1.22 to 1.24 in Dockerfile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Use thread-safe WriteAtBuffer from AWS SDK v2 for S3 downloads

Replace custom writeAtBuffer implementation with manager.WriteAtBuffer
from AWS SDK v2. The S3 Downloader uses 5 concurrent goroutines by
default, and the custom implementation was not thread-safe, potentially
causing race conditions and data corruption.

Also fix minor formatting in migrate.go.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.