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

Refactor with common sdk integration #1730

Open
wants to merge 135 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
f9eb675
add version marker and block hasher
Hitenjain14 Jul 21, 2024
02e203d
add repair info in commit worker
Hitenjain14 Jul 21, 2024
c981f06
add check for repair marker
Hitenjain14 Jul 23, 2024
b5cbb79
add allocation version and check for directory
Hitenjain14 Jul 24, 2024
526a117
prefix delete
Hitenjain14 Jul 25, 2024
6486442
fix consensus in delete
Hitenjain14 Jul 25, 2024
f9f8237
fix consensus thresh check
Hitenjain14 Jul 26, 2024
e015027
fix path level in delete
Hitenjain14 Jul 26, 2024
a8bf8bb
remove vt from downloadworker
Hitenjain14 Jul 26, 2024
b91b592
rm vt in reader
Hitenjain14 Jul 27, 2024
9beaccc
Merge branch 'feat/enterprise-blobber' of https://github.com/0chain/g…
Hitenjain14 Jul 27, 2024
f5b51c0
remove single blobber for single client mode
Hitenjain14 Jul 27, 2024
4d33f27
add check for nil ref
Hitenjain14 Jul 27, 2024
796de38
remove mask reset
Hitenjain14 Jul 27, 2024
da1aa55
check change count
Hitenjain14 Jul 27, 2024
a9814df
chane ref check
Hitenjain14 Jul 27, 2024
08de511
remove validation root from Ref
Hitenjain14 Jul 29, 2024
e7df719
add list logs
Hitenjain14 Jul 31, 2024
3f00405
Merge branch 'feat/enterprise-blobber' of https://github.com/0chain/g…
Hitenjain14 Jul 31, 2024
c2e8b89
add response
Hitenjain14 Jul 31, 2024
4496ab6
add debug logs
Hitenjain14 Jul 31, 2024
daa353d
add log for selected file ref
Hitenjain14 Jul 31, 2024
974959f
add check for rate limit
Hitenjain14 Jul 31, 2024
ec1a470
remove get ref log
Hitenjain14 Jul 31, 2024
facdb4f
add repair for enterprise blobbers
Hitenjain14 Aug 5, 2024
d15f3ce
add delete for dir remotepath in move
Hitenjain14 Aug 7, 2024
f2bb064
fix no change check
Hitenjain14 Aug 7, 2024
b0e385f
fix consensus and add check for no change err
Hitenjain14 Aug 7, 2024
a2081f3
fix list completed repair
Hitenjain14 Aug 7, 2024
af515ba
use dir as destpath
Hitenjain14 Aug 8, 2024
e973828
base of dest name
Hitenjain14 Aug 8, 2024
f4ba999
fix copy op
Hitenjain14 Aug 8, 2024
94ef0df
check copy destpath
Hitenjain14 Aug 8, 2024
dbbc11b
join base and dest path
Hitenjain14 Aug 8, 2024
8390f11
set path hash
Hitenjain14 Aug 9, 2024
c552f97
add size for root dir
Hitenjain14 Aug 10, 2024
c14befd
Merge branch 'feat/enterprise-blobber' of https://github.com/0chain/g…
Hitenjain14 Aug 10, 2024
5af4afa
Merge pull request #1 from 0chain/feat/enterprise-blobber
dabasov Aug 11, 2024
645ded9
check vm
Hitenjain14 Aug 13, 2024
007b982
move upload success to debug
Hitenjain14 Aug 14, 2024
d9d8cd7
Merge pull request #3 from 0chain/feat/enterprise-blobber
dabasov Aug 14, 2024
b293286
Merge branch 'sprint-1.17' into feat/enterprise-blobber
Hitenjain14 Aug 16, 2024
a9a39a9
Merge branch 'sprint-1.17' of https://github.com/0chain/gosdk into fe…
Hitenjain14 Aug 16, 2024
56c4c70
Merge pull request #4 from 0chain/feat/enterprise-blobber
dabasov Aug 16, 2024
2119c4a
fix nested move and rename
Hitenjain14 Aug 22, 2024
da3469b
Merge pull request #5 from 0chain/feat/enterprise-blobber
dabasov Aug 22, 2024
6648ada
fix nested rename
Hitenjain14 Aug 23, 2024
acf47eb
rmv log for invalid path
Hitenjain14 Aug 23, 2024
2ddc42d
Merge pull request #6 from 0chain/feat/enterprise-blobber
dabasov Aug 23, 2024
970cd10
Merge branch 'sprint-1.17' of https://github.com/0chain/gosdk into fe…
Hitenjain14 Aug 25, 2024
c0ae8c0
Merge pull request #7 from 0chain/feat/enterprise-blobber
dabasov Aug 25, 2024
50adab4
Merge remote-tracking branch 'origin' into feat/enterprise-blobber
Hitenjain14 Aug 27, 2024
75bab85
Merge remote-tracking branch 'origin' into feat/enterprise-blobber
Hitenjain14 Sep 3, 2024
c027015
Merge pull request #8 from 0chain/feat/enterprise-blobber
dabasov Sep 3, 2024
f71928d
Merge branch 'staging' into feat/enterprise-blobber
Hitenjain14 Sep 23, 2024
c8f84a9
Merge branch 'staging' into feat/enterprise-blobber
Hitenjain14 Sep 24, 2024
aaf11db
Merge branch 'staging' into feat/enterprise-blobber
Jayashsatolia403 Sep 24, 2024
18f5e77
Merge branch '0chain:staging' into staging
dabasov Oct 11, 2024
7c90bfb
commented test
dabasov Oct 11, 2024
271ccc6
Merge remote-tracking branch 'origin' into feat/enterprise-blobber
Hitenjain14 Oct 12, 2024
237970b
comment test
Hitenjain14 Oct 12, 2024
43dcb10
Merge branch 'feat/enterprise-blobber' of https://github.com/0chain/g…
Hitenjain14 Oct 12, 2024
d4d99f5
fix release of buffer
Hitenjain14 Oct 23, 2024
4bcafe0
feat: kms logic related to usgae of roles
harsh4723 Nov 1, 2024
1d99a2d
fix: roles management
harsh4723 Nov 1, 2024
2d328b5
revert: zauth changes
harsh4723 Nov 1, 2024
9d17c71
fix: zauth file
harsh4723 Nov 1, 2024
918f6ef
Merge branch 'staging' into feat/enterprise-blobber
Hitenjain14 Nov 8, 2024
655bacd
change cdn and wasm path
Hitenjain14 Nov 8, 2024
2b8606c
Merge branch '0chain:feat/enterprise-blobber' into feat/enterprise-bl…
Hitenjain14 Nov 8, 2024
f967f8a
update go version in make wasm
Hitenjain14 Nov 8, 2024
4b712fd
Merge branch '0chain:feat/enterprise-blobber' into feat/enterprise-bl…
Hitenjain14 Nov 8, 2024
d961a05
Merge pull request #13 from 0chain/feat/enterprise-blobber
dabasov Nov 12, 2024
2f06303
add method for wasm type
Hitenjain14 Nov 14, 2024
3a31050
Merge branch '0chain:feat/enterprise-blobber' into feat/enterprise-bl…
Hitenjain14 Nov 14, 2024
d8f100c
set wasm type in window object
Hitenjain14 Nov 14, 2024
b7ee494
Merge branch '0chain:feat/enterprise-blobber' into feat/enterprise-bl…
Hitenjain14 Nov 14, 2024
3b828e1
Merge pull request #14 from 0chain/feat/enterprise-blobber
dabasov Nov 24, 2024
2f3d040
merge file write and callback changes
Hitenjain14 Nov 25, 2024
7d6a1cc
Merge branch '0chain:feat/enterprise-blobber' into feat/enterprise-bl…
Hitenjain14 Nov 25, 2024
10382bb
Merge pull request #15 from 0chain/feat/enterprise-blobber
Hitenjain14 Nov 25, 2024
0fe81ae
fix build
Hitenjain14 Nov 25, 2024
80748bc
Merge branch '0chain:feat/enterprise-blobber' into feat/enterprise-bl…
Hitenjain14 Nov 25, 2024
98608f8
Merge pull request #16 from 0chain/feat/enterprise-blobber
Hitenjain14 Nov 25, 2024
e8671f9
Merge pull request #10 from 0chain/kms-egosdk
dabasov Nov 30, 2024
ed9fbc8
merge changes
Hitenjain14 Dec 3, 2024
d236c4a
Merge branch '0chain:feat/enterprise-blobber' into feat/enterprise-bl…
Hitenjain14 Dec 3, 2024
6682df7
Merge pull request #17 from 0chain/feat/enterprise-blobber
dabasov Dec 3, 2024
3952a35
change init signature
Hitenjain14 Dec 21, 2024
e04c844
Merge branch '0chain:feat/enterprise-blobber' into feat/enterprise-bl…
Hitenjain14 Dec 21, 2024
d9e880d
fix windows build
Hitenjain14 Dec 22, 2024
ab3829a
Merge branch '0chain:feat/enterprise-blobber' into feat/enterprise-bl…
Hitenjain14 Dec 22, 2024
a9e5b9a
add check for wallet id
Hitenjain14 Dec 25, 2024
fed6df1
Merge branch '0chain:feat/enterprise-blobber' into feat/enterprise-bl…
Hitenjain14 Dec 25, 2024
0a39195
Sign update alloc auth ticket
Jayashsatolia403 Jan 6, 2025
32952c3
Merge remote-tracking branch 'origin/feat/enterprise-blobber' into fe…
Jayashsatolia403 Jan 7, 2025
e9c2f87
added workflow to deploy ewasm binary
shahnawaz-creator Jan 8, 2025
166461e
Merge pull request #20 from 0chain/add/wasm-release
shahnawaz-creator Jan 8, 2025
7e3674e
Merge branch 'staging' into feat/enterprise-blobber
Jayashsatolia403 Jan 14, 2025
c4f88a6
Update with staging
Jayashsatolia403 Jan 14, 2025
54ce087
Merge branch 'feat/enterprise-blobber' into feature/sign-update-alloc…
Jayashsatolia403 Jan 14, 2025
2f090e3
Merge pull request #18 from 0chain/feat/enterprise-blobber
Jayashsatolia403 Jan 14, 2025
c1d221f
Merge pull request #19 from 0chain/feature/sign-update-alloc-ticket
Jayashsatolia403 Jan 14, 2025
fe75c8b
refactoring
smaulik13 Jan 8, 2025
dacfe33
refactoring 2
smaulik13 Jan 8, 2025
f7ec7e6
fix
smaulik13 Jan 8, 2025
295d20d
fix 2
smaulik13 Jan 8, 2025
e07625b
refactor
smaulik13 Jan 16, 2025
8102de5
refactor 2
smaulik13 Jan 16, 2025
d649bba
wasm refactor
smaulik13 Jan 16, 2025
b59dcf4
refactor 2
smaulik13 Jan 16, 2025
fcca97e
refactor 3
smaulik13 Jan 16, 2025
f01b993
fix
smaulik13 Jan 17, 2025
a0ce8cc
added version
smaulik13 Jan 17, 2025
cd7b1e1
wasm fix
smaulik13 Jan 17, 2025
bdbf983
revert some changes
smaulik13 Jan 17, 2025
3fb79d2
revert changes
smaulik13 Jan 17, 2025
2ee8e28
fix
smaulik13 Jan 17, 2025
bae7a6e
revert
smaulik13 Jan 17, 2025
0f7477d
lint fix
smaulik13 Jan 17, 2025
e49091c
version update
smaulik13 Jan 17, 2025
59f3dd8
gosdk to common
smaulik13 Jan 17, 2025
eb3184b
common update
smaulik13 Jan 17, 2025
088847b
dumy
smaulik13 Jan 17, 2025
f2d815f
dummy
smaulik13 Jan 17, 2025
9b4ae2c
core changes
smaulik13 Jan 21, 2025
7775b2f
updated changes
smaulik13 Jan 21, 2025
acb0596
windows build fix
smaulik13 Jan 22, 2025
8bd0f07
revert changes
smaulik13 Jan 22, 2025
92fabe3
common sdk update version
smaulik13 Jan 22, 2025
f83199a
refactor
smaulik13 Jan 23, 2025
f467a95
added v2 enpoint
smaulik13 Jan 23, 2025
816f388
delete file
smaulik13 Jan 23, 2025
6545972
updates
smaulik13 Jan 24, 2025
29a8e71
updates
smaulik13 Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
60 changes: 60 additions & 0 deletions .github/workflows/build-&-push-enterprise-wasm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build & Push Enterprise Wasm

concurrency:
group: "build-release-ewasm-${{ github.ref }}"
cancel-in-progress: true

on:
push:
# branches: [ master, staging, qa ]
tags:
- 'v*.*.*'
# pull_request:
workflow_dispatch:

jobs:
build-wasm:
name: Build-wasm
runs-on: [self-hosted, arc-runner]
outputs:
build_version: ${{ steps.wasm_build.outputs.BUILD_TAG }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build wasm binary using go version 1.22.5
id: wasm_build
run: |
docker run --rm -v $PWD:/gosdk -w /gosdk golang:1.22.5 sh -c "git config --global --add safe.directory /gosdk; make wasm-build"
BUILD_TAG=zcn-$(git describe --tags --exact-match)-enterprise.wasm
BUILD_TAG="${BUILD_TAG:0:4}${BUILD_TAG:5}"
mv zcn.wasm $BUILD_TAG
echo "BUILD_TAG=$BUILD_TAG" >>$GITHUB_OUTPUT

- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: ${{ steps.wasm_build.outputs.BUILD_TAG }}
path: ${{ steps.wasm_build.outputs.BUILD_TAG }}

- name: Install AWS cli
run: |
sudo apt update -y
sudo apt install awscli -y

- name: Copy the wasm binary to aws s3.
run: |
export AWS_ACCESS_KEY_ID=${{ secrets.WEBAPP_STATIC_ACCESS_KEY }}
export AWS_SECRET_ACCESS_KEY=${{ secrets.WEBAPP_STATIC_SECRET_ACCESS_KEY }}
export AWS_DEFAULT_REGION=${{ secrets.WEBAPP_STATIC_REGION }}
gzip -9 ${{ steps.wasm_build.outputs.BUILD_TAG }} && mv ${{ steps.wasm_build.outputs.BUILD_TAG }}.gz ${{ steps.wasm_build.outputs.BUILD_TAG }}
aws s3 cp ${{ steps.wasm_build.outputs.BUILD_TAG }} s3://${{ secrets.WEBAPP_STATIC_BUCKET }}/wasm/${{ steps.wasm_build.outputs.BUILD_TAG }} --content-encoding gzip

- name: Invalidate wasm binary
run: |
export AWS_ACCESS_KEY_ID=${{ secrets.WEBAPP_STATIC_ACCESS_KEY }}
export AWS_SECRET_ACCESS_KEY=${{ secrets.WEBAPP_STATIC_SECRET_ACCESS_KEY }}
export AWS_DEFAULT_REGION=${{ secrets.WEBAPP_STATIC_REGION }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.WEBAPP_STATIC_DISTRIBUTION_ID }} --paths '/wasm/*'
24 changes: 12 additions & 12 deletions .github/workflows/build-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go 1.22
- name: Set up Go 1.23
uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.23

- name: Clean build
run: make clean-mobilesdk
Expand Down Expand Up @@ -96,10 +96,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go 1.22
- name: Set up Go 1.23
uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.23

- name: Install deps
run: |
Expand Down Expand Up @@ -199,10 +199,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go 1.22
- name: Set up Go 1.23
uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.23

- name: Clean build
run: make clean-mobilesdk
Expand Down Expand Up @@ -271,10 +271,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go 1.22
- name: Set up Go 1.23
uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.23

- name: Install deps
run: |
Expand Down Expand Up @@ -335,21 +335,21 @@ jobs:
name: Build-wasm
runs-on: [self-hosted, arc-runner]
steps:
- name: Set up Go 1.x
- name: Set up Go 1.23
uses: actions/setup-go@v3
with:
go-version: 1.21.5
go-version: 1.23

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev wget

- name: Build
run: docker run --rm -v $PWD:/gosdk -w /gosdk golang:1.21.5 make wasm-build
run: docker run --rm -v $PWD:/gosdk -w /gosdk golang:1.23 make wasm-build

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.21.5
go-version: 1.22.5

- uses: actions/checkout@v3

Expand All @@ -51,7 +51,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.21.5
go-version: 1.22.5

- name: Install deps
run: |
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.21.5
go-version: 1.22.5

- uses: actions/setup-node@v2
with:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This repository currently supports the following platforms:
import (
"fmt"

"github.com/0chain/gosdk/zcncore"
"github.com/0chain/gosdk_common/zcncore"
)

func main() {
Expand Down Expand Up @@ -177,9 +177,9 @@ To run all the unit tests in `gosdk`: `go test github.com/0chain/gosdk/zboxcore/
$ go test ./...
```

To run all the unit tests in `bls0chain_test.go`, run this command from $TOP: `go test github.com/0chain/gosdk/core/zcncrypto -v`
To run all the unit tests in `bls0chain_test.go`, run this command from $TOP: `go test github.com/0chain/gosdk_common/core/zcncrypto -v`

To run a specific unit test in `bls0chain_test.go`, such as `TestSignatureScheme`, run: `go test github.com/0chain/gosdk/core/zcncrypto -v -run TestSignatureScheme`
To run a specific unit test in `bls0chain_test.go`, such as `TestSignatureScheme`, run: `go test github.com/0chain/gosdk_common/core/zcncrypto -v -run TestSignatureScheme`

To run the coverage test in `gosdk`:

Expand Down
27 changes: 0 additions & 27 deletions constants/context_key.go

This file was deleted.

37 changes: 0 additions & 37 deletions constants/errors.go

This file was deleted.

24 changes: 0 additions & 24 deletions constants/files.go

This file was deleted.

94 changes: 0 additions & 94 deletions core/block/block.go

This file was deleted.

Loading