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

Fix/refactor zboxcore and zcncore #1583

Open
wants to merge 119 commits into
base: sprint-1.18
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
4e40285
provide central init function, global config, global container
Feb 1, 2024
2c66649
refactor zcncore package to use states in core package
storybehind Feb 8, 2024
2adec95
fix issues after tests run
storybehind Feb 8, 2024
ef95a97
fix sdk builds
storybehind Feb 10, 2024
958fa49
Merge remote-tracking branch 'origin/staging' into refactor-zcncore
storybehind Feb 10, 2024
346e37b
resolve merge conflicts
storybehind Feb 10, 2024
d86f0c6
fix lint and system test issues
storybehind Feb 10, 2024
8681bef
fix system test failures
storybehind Feb 11, 2024
4e1e9f8
fix issues and provide godocs
storybehind Feb 11, 2024
d92282f
call InitCache function
storybehind Feb 11, 2024
3ae9191
revert InitClientConfig() changes
storybehind Feb 11, 2024
fc9dca3
fix InitSignatureScheme() function
storybehind Feb 12, 2024
2e7b9c1
Deprecate InitSignatureScheme function
storybehind Feb 12, 2024
487e83c
fix InitSignatureScheme
storybehind Feb 12, 2024
d197fe1
create signature scheme var
storybehind Feb 13, 2024
5e013f3
refactor zboxcore to use states defined in core/client package
storybehind Feb 20, 2024
7a5633c
Merge branch 'refs/heads/sprint-1.17' into refactor-zboxcore
Jayashsatolia403 Aug 22, 2024
cdcd98e
Cleanup
Jayashsatolia403 Aug 22, 2024
3be769c
Cleanup
Jayashsatolia403 Aug 22, 2024
4fae16e
Fix
Jayashsatolia403 Aug 23, 2024
4f53f05
Fix
Jayashsatolia403 Aug 23, 2024
044abac
Debug
Jayashsatolia403 Aug 23, 2024
2841ef7
Fix
Jayashsatolia403 Aug 23, 2024
405b0cf
Fix
Jayashsatolia403 Aug 23, 2024
8549136
Fix
Jayashsatolia403 Aug 23, 2024
91a68aa
Fix
Jayashsatolia403 Aug 23, 2024
c84685a
Fix unit tests
Jayashsatolia403 Aug 23, 2024
69bb78c
Fix unit tests
Jayashsatolia403 Aug 24, 2024
be9fcce
Fix
Jayashsatolia403 Aug 24, 2024
2512e2c
Fix wallet base
Jayashsatolia403 Aug 24, 2024
572cf09
Fix sdk build
Jayashsatolia403 Aug 24, 2024
3575b7c
Fix wasm build
Jayashsatolia403 Aug 24, 2024
75009fe
Fix mobile build
Jayashsatolia403 Aug 24, 2024
96c7a58
Fix zwallet build
Jayashsatolia403 Aug 24, 2024
aadc083
Repo snapshots
Jayashsatolia403 Aug 24, 2024
6718317
Revert version update
Jayashsatolia403 Aug 25, 2024
a9fc89c
Merge branch 'sprint-1.17' into fix/refactor-zboxcore
Jayashsatolia403 Aug 25, 2024
0a5a5e2
Merge branch 'sprint-1.17' into fix/refactor-zboxcore
Jayashsatolia403 Aug 31, 2024
df4f9b8
Fix/refactor zboxcore merge sprint 1.18 (#1605)
Jayashsatolia403 Sep 8, 2024
17a9fbe
Merge branch 'sprint-1.18' into fix/refactor-zboxcore
Jayashsatolia403 Sep 8, 2024
f283e4c
Fix set wallet
Jayashsatolia403 Sep 8, 2024
73f77e4
Fix version
Jayashsatolia403 Sep 8, 2024
5a3358c
Fix
Jayashsatolia403 Sep 8, 2024
e92116b
Fix lint
Jayashsatolia403 Sep 8, 2024
1d59ebd
Debug
Jayashsatolia403 Sep 8, 2024
ef8a452
Debug
Jayashsatolia403 Sep 8, 2024
52c1223
Replace transactions with functions
Jayashsatolia403 Sep 10, 2024
7f42b48
Remove vesting
Jayashsatolia403 Sep 10, 2024
1a00969
Remove multi sig
Jayashsatolia403 Sep 10, 2024
67737ef
Add more functions
Jayashsatolia403 Sep 10, 2024
d8efc3d
Return all values
Jayashsatolia403 Sep 10, 2024
383b590
Return all values
Jayashsatolia403 Sep 10, 2024
24db157
Fix
Jayashsatolia403 Sep 10, 2024
1c713bf
Fix
Jayashsatolia403 Sep 10, 2024
0adf432
Remove delete miner and sharder
Jayashsatolia403 Sep 10, 2024
3a18f9e
Fix
Jayashsatolia403 Sep 10, 2024
2f0771c
Fix bridge burn zcn
Jayashsatolia403 Sep 10, 2024
e7c4e4a
Fix signature schemee
Jayashsatolia403 Sep 10, 2024
ac890d1
Fix
Jayashsatolia403 Sep 10, 2024
af35418
Fix
Jayashsatolia403 Sep 10, 2024
d9c35e2
Fix
Jayashsatolia403 Sep 10, 2024
08b4d99
Fix
Jayashsatolia403 Sep 10, 2024
d83cf18
Cleanup
Jayashsatolia403 Sep 11, 2024
c9dfb86
Fix make sc rest api call
Jayashsatolia403 Sep 11, 2024
f9ac977
Fix
Jayashsatolia403 Sep 11, 2024
0b717ce
Fix unit tests
Jayashsatolia403 Sep 11, 2024
2247bb3
Fix
Jayashsatolia403 Sep 11, 2024
4a33b6b
Fix
Jayashsatolia403 Sep 11, 2024
c1c10ab
Fix
Jayashsatolia403 Sep 11, 2024
3bd80b5
Fix wasm
Jayashsatolia403 Sep 11, 2024
94431da
Fix wasm
Jayashsatolia403 Sep 11, 2024
c9723ae
Fix
Jayashsatolia403 Sep 12, 2024
4785265
Fix
Jayashsatolia403 Sep 12, 2024
042f96b
Fix
Jayashsatolia403 Sep 13, 2024
aa521ff
Fix
Jayashsatolia403 Sep 13, 2024
e71c555
Fix
Jayashsatolia403 Sep 13, 2024
2d0ff4f
Fix
Jayashsatolia403 Sep 14, 2024
85cb823
Fix
Jayashsatolia403 Sep 15, 2024
ed19f05
Fix
Jayashsatolia403 Sep 15, 2024
d6b8675
Fix
Jayashsatolia403 Sep 15, 2024
b8ef8b7
Fix
Jayashsatolia403 Sep 15, 2024
d27b0cf
Fix
Jayashsatolia403 Sep 15, 2024
8655961
Fix
Jayashsatolia403 Sep 15, 2024
b96e59e
Fix
Jayashsatolia403 Sep 15, 2024
03ae614
Fix
Jayashsatolia403 Sep 15, 2024
5e19f7a
Fix sc rest api call
Jayashsatolia403 Sep 17, 2024
fa5e1ce
Fix
Jayashsatolia403 Sep 19, 2024
d82518f
Fix/refactor zboxcore burn zcn (#1622)
yash10019coder Sep 21, 2024
4768e9c
Fix get mint nonce
Jayashsatolia403 Sep 21, 2024
664c4ab
Merge remote-tracking branch 'origin/fix/refactor-zboxcore' into fix/…
Jayashsatolia403 Sep 21, 2024
bf0ab98
Fix
Jayashsatolia403 Sep 21, 2024
6557b5e
Fix
Jayashsatolia403 Sep 21, 2024
aaac517
Debug
Jayashsatolia403 Sep 22, 2024
6f32838
Merge remote-tracking branch 'origin/fix/refactor-zboxcore' into fix/…
Jayashsatolia403 Sep 22, 2024
c649c27
Fix
Jayashsatolia403 Sep 22, 2024
bab6ab9
Fix sdk builds
Jayashsatolia403 Sep 22, 2024
0145dea
Remove readpool and add blobber_operations.go
Jayashsatolia403 Sep 22, 2024
4a1fa0f
Merge remote-tracking branch 'origin/sprint-1.18' into fix/refactor-z…
Jayashsatolia403 Sep 22, 2024
502c0e6
Remove readpool
Jayashsatolia403 Sep 22, 2024
69b386f
Merge branch 'sprint-1.18' into fix/refactor-zboxcore
Jayashsatolia403 Sep 22, 2024
bdbd749
Fix
Jayashsatolia403 Sep 22, 2024
af418a7
Fix mobilesdk build for refactor zboxcore (#1621)
yash10019coder Sep 23, 2024
b2d955f
Fix/refactor zboxcore lint. (#1627)
yash10019coder Sep 23, 2024
255d39c
Merge branch 'sprint-1.18' into fix/refactor-zboxcore
Jayashsatolia403 Sep 24, 2024
3fcf005
Fix
Jayashsatolia403 Sep 24, 2024
7034f12
Fix wasm initialisation
Jayashsatolia403 Sep 25, 2024
0277b7b
Fix
Jayashsatolia403 Sep 25, 2024
f945a84
Merge branch 'sprint-1.18' into fix/refactor-zboxcore
Jayashsatolia403 Sep 27, 2024
b513b97
Fix
Jayashsatolia403 Sep 27, 2024
4561413
Fix
Jayashsatolia403 Sep 27, 2024
fe4aad2
Fix wasm
Jayashsatolia403 Sep 27, 2024
777f666
Cleanup
Jayashsatolia403 Sep 28, 2024
5ed4b78
Debug wasm
Jayashsatolia403 Sep 28, 2024
59de519
Debug wasm
Jayashsatolia403 Sep 28, 2024
da57d8a
Debug wasm
Jayashsatolia403 Sep 28, 2024
0434428
Debug wasm
Jayashsatolia403 Sep 28, 2024
b3a20c1
Debug wasm
Jayashsatolia403 Sep 28, 2024
657fd73
Debug wasm
Jayashsatolia403 Sep 28, 2024
4703a00
Debug
Jayashsatolia403 Sep 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,24 +335,24 @@ jobs:
name: Build-wasm
runs-on: [self-hosted, arc-runner]
steps:
- name: Set up Go 1.x
- name: Set up Go 1.22
uses: actions/setup-go@v3
with:
go-version: 1.21.5
go-version: 1.22

- 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.22 make wasm-build

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: zcn.wasm
path: zcn.wasm
path: zcn.wasm
2 changes: 1 addition & 1 deletion .github/workflows/system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: 0chain/actions/.github/workflows/manual_system_tests.yml@master
with:
gosdk_branch: ${{ github.ref_name }}
repo_snapshots_branch: ${{ github.event.inputs.repo_snapshots_branch }}
repo_snapshots_branch: fix/refactor-zboxcore
test_file_filter: ${{ github.event.inputs.test_file_filter }}
skip_tests: ${{ github.event.inputs.skip_tests }}
run_smoke_tests: ${{ github.event.inputs.run_smoke_tests }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Go 1.x
uses: actions/setup-go@v3
- name: Set up Go 1.22
uses: actions/setup-go@v2
with:
go-version: 1.21.5
go-version: 1.22

- uses: actions/setup-node@v2
with:
Expand Down
13 changes: 13 additions & 0 deletions constants/signscheme.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package constants

type SignScheme string

const (
ED25519 SignScheme = "ed25519"
BLS0CHAIN SignScheme = "bls0chain"
)

func (s SignScheme) String() string {
return string(s)
}

3 changes: 2 additions & 1 deletion core/block/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ package block

import (
"fmt"

"github.com/0chain/gosdk/core/common"
"github.com/0chain/gosdk/core/encryption"
"github.com/0chain/gosdk/core/transaction"
)

const GET_BLOCK_INFO = `/v1/block/get?`

type Key []byte

type Header struct {
Expand Down
11 changes: 6 additions & 5 deletions core/node/cache.go → core/client/cache.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package node
package client

import (
"sync"
Expand Down Expand Up @@ -29,11 +29,12 @@ func (nc *NonceCache) GetNextNonce(clientId string) int64 {
nc.guard.Lock()
defer nc.guard.Unlock()
if _, ok := nc.cache[clientId]; !ok {
nonce, _, err := nc.sharders.GetNonceFromSharders(clientId)
if err != nil {
nonce = 0
bal, err := GetBalance(clientId)
if err != nil || bal == nil {
nc.cache[clientId] = 0
} else {
nc.cache[clientId] = bal.Nonce
}
nc.cache[clientId] = nonce
}

nc.cache[clientId] += 1
Expand Down
Loading
Loading