Skip to content

decentralized computer #99

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

Open
wants to merge 629 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
629 commits
Select commit Hold shift + click to select a range
b88687e
fix handleUnconfirmedCalls
hundredark Apr 2, 2025
b52f136
fix releaseNonceAccounts
hundredark Apr 2, 2025
c63ae7b
slight fix
hundredark Apr 2, 2025
14d6390
fix check
hundredark Apr 2, 2025
4fdd8b5
fix network error when making tx
hundredark Apr 2, 2025
dfb3531
occupy nonce after confirmation
hundredark Apr 2, 2025
027a116
add some logs when sending tx
hundredark Apr 2, 2025
c27efb7
fix stuck call
hundredark Apr 2, 2025
29acf1c
should not check dust when processing post system call
hundredark Apr 2, 2025
d9b866b
should transfer some rent to user account
hundredark Apr 3, 2025
e2d2ea3
add some test
hundredark Apr 3, 2025
2375fc1
fix account size
hundredark Apr 3, 2025
e13532c
improve observer and add some logs
hundredark Apr 3, 2025
2489a04
observer refreshes fee on xin
hundredark Apr 4, 2025
c0134ee
improve fee of system call
hundredark Apr 4, 2025
3aab389
fix empty storage
hundredark Apr 7, 2025
16eaa50
fix balance change check
hundredark Apr 7, 2025
56c3120
slight fix
hundredark Apr 7, 2025
b13eb88
transfer fee from payer
hundredark Apr 7, 2025
2df7ac9
fix test
hundredark Apr 7, 2025
c5a95d3
fix prepare system call may not exist or not need for signature from mpc
hundredark Apr 7, 2025
582c781
fix sol asset id
hundredark Apr 7, 2025
60f081a
fix buildUserBalanceChangesFromMeta
hundredark Apr 7, 2025
c2faca4
improve solana tx sending
hundredark Apr 8, 2025
a285183
skip refund if amount is too small when processing post system call
hundredark Apr 8, 2025
12ea131
add more logs on observer
hundredark Apr 8, 2025
c5516ee
more logs
hundredark Apr 8, 2025
f213924
create session with system call
hundredark Apr 8, 2025
6527fb0
slight fix
hundredark Apr 8, 2025
5aa2211
slight improve
hundredark Apr 8, 2025
289f17d
fix processObserverRequestSign
hundredark Apr 8, 2025
fd7b04e
observer send tx with XIN
hundredark Apr 8, 2025
14cbb19
fix test
hundredark Apr 9, 2025
cdc407e
fix observer sign
hundredark Apr 9, 2025
9cbe3f7
fix memo
hundredark Apr 9, 2025
0535c8a
slight improves
hundredark Apr 9, 2025
14bf529
improve storage tx
hundredark Apr 9, 2025
32cd778
add sendSignerTransactionToGroup
hundredark Apr 9, 2025
2f0d548
fix duplicate session
hundredark Apr 9, 2025
aaa94c1
fix getPostprocessCall
hundredark Apr 9, 2025
a9543fa
fix signer
hundredark Apr 9, 2025
0f02ad2
fix test
hundredark Apr 9, 2025
270040b
fix order
hundredark Apr 9, 2025
d0693c8
confirm one or multiple calls
hundredark Apr 10, 2025
bcb5d4f
should save session with deposit call
hundredark Apr 10, 2025
06cbe7b
remove unused codes
hundredark Apr 10, 2025
f68120e
fix block scan
hundredark Apr 10, 2025
9af5ada
slight fix
hundredark Apr 10, 2025
f6f016a
add logs
hundredark Apr 10, 2025
4565785
send main system call after prepare call being finalized
hundredark Apr 10, 2025
1c2cc59
slight improves
hundredark Apr 10, 2025
a7c1894
should send main system call after all ata being checked
hundredark Apr 10, 2025
200e528
fix ata
hundredark Apr 11, 2025
c963f09
raise balance limit
hundredark Apr 11, 2025
4a7e45a
improve addTransferSolanaAssetInstruction
hundredark Apr 11, 2025
65ac2d0
update lifecycle
hundredark Apr 14, 2025
eafbd19
update readme
hundredark Apr 14, 2025
934a017
slight fixes
hundredark Apr 14, 2025
65692d1
improve CheckRetryableError
hundredark Apr 16, 2025
8567cbc
improve SendTransactionUtilConfirm
hundredark Apr 16, 2025
3661f07
fix handleSignedCallSequence
hundredark Apr 16, 2025
f94e94c
fix processFailedCall
hundredark Apr 16, 2025
fc8c8ad
slight improves
hundredark Apr 16, 2025
ed9b183
skip trash deposit
hundredark Apr 17, 2025
88fb97c
skip deposit may cause insufficient rent
hundredark Apr 17, 2025
d756563
slight improves
hundredark Apr 17, 2025
45ab2f3
set priority fee for tx created by observer
hundredark Apr 17, 2025
b1012a6
fix address table may closed when process network tx
hundredark Apr 18, 2025
61be644
try to accelerate tx sending
hundredark Apr 18, 2025
e1dd7ca
Merge remote-tracking branch 'origin/main' into feature/computer
cedricfung Apr 21, 2025
637de11
fix docs typo
cedricfung Apr 21, 2025
93acad7
slight fix
hundredark Apr 22, 2025
ef7ae98
slight fix
hundredark Apr 22, 2025
795d8d2
fix error
hundredark Apr 22, 2025
21f8b8b
mtg fix action transaction outputs check limit
cedricfung Apr 22, 2025
85cb2e4
fix some strings split zero length issues
cedricfung Apr 22, 2025
686af85
bump version to v0.18.8
cedricfung Apr 22, 2025
9d65f92
Merge remote-tracking branch 'origin/main' into feature/computer
cedricfung Apr 22, 2025
b364744
add some logs
hundredark Apr 23, 2025
ec243ce
fix getAssetMetadata
hundredark Apr 23, 2025
d27c87b
slight fix
hundredark Apr 23, 2025
add3451
may no post-process after system call failed
hundredark Apr 23, 2025
be50d6c
fix processFailedCall
hundredark Apr 23, 2025
e12f143
check nonce account when boot observer
hundredark Apr 23, 2025
4413f14
fix
hundredark Apr 23, 2025
84d3594
should release nonce account in releaseNonceAccountLoop
hundredark Apr 23, 2025
cede322
panic when user lock nonce account but hash is different
hundredark Apr 23, 2025
23e4420
check nonce hash when release
hundredark Apr 24, 2025
7e16a29
wait prepare call get finalized
hundredark Apr 24, 2025
5dd36fa
improve SendTransactionUntilSufficient
hundredark Apr 24, 2025
79355ef
improve GetAccountInfo
hundredark Apr 24, 2025
d41c220
slgiht fix
hundredark Apr 24, 2025
7eec60a
improve CheckTransactionRetryError
hundredark Apr 24, 2025
396dae9
improve solana rpc funcs
hundredark Apr 24, 2025
1c906d7
improve logs
hundredark Apr 24, 2025
a02b307
fix solana tx sending
hundredark Apr 24, 2025
fe61b36
improve error handling of recent block hash
hundredark Apr 25, 2025
3ac05f7
improve block scan
hundredark May 6, 2025
4e35355
update batch
hundredark May 6, 2025
bcabfa4
cache rpc results
hundredark May 6, 2025
668e3f2
fix SendTransactionUtilConfirm
hundredark May 6, 2025
2d94098
fix RPCGetAccountInfo
hundredark May 6, 2025
17d5235
improve processTransactionWithAddressLookups
hundredark May 6, 2025
987cd6a
fix cache
hundredark May 6, 2025
4ef4678
fix key
hundredark May 6, 2025
8a37429
fix RPCGetAccountInfo
hundredark May 6, 2025
5a11fad
fix processTransactionWithAddressLookups
hundredark May 6, 2025
c5911c7
fix WriteCache
hundredark May 6, 2025
dea5d3b
slight improve
hundredark May 6, 2025
f87d3f8
remove finalized
hundredark May 6, 2025
26572be
typo
hundredark May 6, 2025
fbef880
slight fix
hundredark May 6, 2025
5a67571
add field decimals
hundredark May 8, 2025
4a48e5c
fix test
hundredark May 8, 2025
22a1d86
slight improve
hundredark May 8, 2025
33c079d
save the error of sending solana tx
hundredark May 9, 2025
0b65552
slight fix
hundredark May 10, 2025
4cd9856
improve rpc request
hundredark May 10, 2025
d497750
slight fix
hundredark May 10, 2025
5284958
check internal addresses before requesting address lookup table
hundredark May 12, 2025
17f19d0
slight fix
hundredark May 12, 2025
4fc4a1e
slight fixes
hundredark May 12, 2025
e0ecbf4
fix dynamic accounts in transactions
hundredark May 12, 2025
1362dbc
should include fee of SOL when creating post-process call
hundredark May 13, 2025
b6e688a
build post-process transaction after checking all mints
hundredark May 13, 2025
09b9df2
fix amount
hundredark May 14, 2025
08bb74d
slight fix
hundredark May 14, 2025
bceac32
fix hash when confirm call
hundredark May 14, 2025
5e80491
save reason when nonce is invalid
hundredark May 14, 2025
9b70fab
fix test
hundredark May 15, 2025
9323fa9
fix extra amount of asset could be used in system call
hundredark May 15, 2025
05c8117
should check the deposit call with the deposit solana tx
hundredark May 16, 2025
080391f
fix tx check
hundredark May 16, 2025
872e2c4
slight improve
hundredark May 16, 2025
47ad114
get owner with cache
hundredark May 16, 2025
c762fa1
Merge remote-tracking branch 'origin/main' into feature/computer
cedricfung May 16, 2025
19454a9
fix receiver
hundredark May 16, 2025
ae555f9
remove some logs
hundredark May 16, 2025
badf680
add migration
hundredark May 16, 2025
f5b7163
fix migration
hundredark May 16, 2025
f1e2553
fix check
hundredark May 16, 2025
49fe90e
fix old format
hundredark May 16, 2025
1d3c948
remove some duplicate code
cedricfung May 16, 2025
1dcf595
remove more duplicate code
cedricfung May 16, 2025
439a107
slight fix
hundredark May 18, 2025
1716c0b
fix loop wait duration
hundredark May 19, 2025
3dc1974
fix rety
hundredark May 19, 2025
ce80d50
fix wait duration config
cedricfung May 19, 2025
6e327b3
fix mtg migrate
hundredark May 19, 2025
59cfb77
slight improve
hundredark May 19, 2025
d84d0af
fix fee calculation
hundredark May 20, 2025
e79f5a2
serialize should check uuid format
cedricfung May 20, 2025
70f9e88
fix schema typo
cedricfung May 20, 2025
6f2dce0
fix signer migrate
hundredark May 20, 2025
fff34aa
no need to migrate action results with empty transactions
cedricfung May 20, 2025
e85f2f7
fix test
hundredark May 20, 2025
9b1b5c3
fix test
hundredark May 20, 2025
b4564c6
fix test
hundredark May 20, 2025
3a48904
Merge remote-tracking branch 'origin/main' into feature/computer
cedricfung May 20, 2025
04aadc4
slight fix
hundredark May 20, 2025
6670836
should release nonce account if call uses another nonce account
hundredark May 20, 2025
f66a77d
slight fix
hundredark May 20, 2025
97af59e
slight fix
hundredark May 21, 2025
aee11f9
slight improve
hundredark May 21, 2025
54a78ff
fix some name typos
cedricfung May 22, 2025
8c83f60
remove redundant error checks
cedricfung May 22, 2025
e80a8b0
update computer bridge asset transaction trace id
cedricfung May 22, 2025
ff5547a
remove special test environment hacks
cedricfung May 22, 2025
48c16a8
remove some unused code
cedricfung May 22, 2025
eb38a37
fix some computer store read only mutex lock
cedricfung May 22, 2025
96e0963
do more system call checks in store
cedricfung May 22, 2025
7539011
should re-build tx when facing transaction locked error
hundredark May 22, 2025
a4abb97
Merge remote-tracking branch 'origin/main' into feature/computer
cedricfung May 22, 2025
5ddcdd2
solana rpc uses processed commitement level
cedricfung May 22, 2025
377253d
simplify token account error check
cedricfung May 22, 2025
df97a47
clean up some code
cedricfung May 22, 2025
97f5c90
ed25519 frost derive ensure path valid
cedricfung May 23, 2025
2c45f83
Merge remote-tracking branch 'origin/main' into feature/computer
cedricfung May 23, 2025
131bd9a
add user deposit action
hundredark May 23, 2025
0c758ee
save user deposit
hundredark May 23, 2025
0d6e69d
improve message
hundredark May 23, 2025
0e967f5
fix sql
hundredark May 23, 2025
8587c2c
fix test
hundredark May 23, 2025
4228e8e
should list outputs with user id
hundredark May 23, 2025
c065fda
slight fix
hundredark May 23, 2025
79a0ed2
should verify the utxo senders include the call user id
cedricfung May 23, 2025
ea3d7c6
fix test
hundredark May 23, 2025
1cf5f72
fix some lint warnings
cedricfung May 23, 2025
513dcdc
update call message hash field name
cedricfung May 23, 2025
b0b2c53
fix typo
cedricfung May 23, 2025
7efec5a
fix some tests
hundredark May 23, 2025
3e17984
fix test
hundredark May 23, 2025
0d9afd7
fix solana token private key
cedricfung May 23, 2025
90373b7
Merge remote-tracking branch 'origin/main' into feature/computer
cedricfung May 23, 2025
f5249a8
fix asset address map
hundredark May 23, 2025
3b6d02b
clean codes
hundredark May 23, 2025
9ffc95b
fix handleUnconfirmedCalls and check fee_id when process system call
hundredark May 24, 2025
cae5dff
fix test
hundredark May 24, 2025
604b5db
fix ambigious related assets return value
cedricfung May 24, 2025
4efdfdb
slight improves
hundredark May 24, 2025
785acf7
ensure valid asset id for refund transaction
cedricfung May 26, 2025
595ce0a
adjust batch solana blocks delay and goroutine
cedricfung May 26, 2025
d7d8239
fix some typos
cedricfung May 26, 2025
38cb87b
check and confirm withdrawals on observer
hundredark May 26, 2025
06e867c
mint external assets on observer
hundredark May 26, 2025
dcf29e7
cache getblock
hundredark May 26, 2025
2b53ebf
slight fix
hundredark May 26, 2025
d3d62ef
add some log
hundredark May 26, 2025
4d4d0ec
fix get asset
hundredark May 26, 2025
3b0e90f
slight fix
hundredark May 26, 2025
aef745e
fix processConfirmCall
hundredark May 26, 2025
89b01a5
fix FailSystemCallWithRequest
hundredark May 26, 2025
633e533
prepare call should also wait withdrawal confirmed
hundredark May 27, 2025
af7b01e
slight fix
hundredark May 27, 2025
d540a0e
slight fix
hundredark May 27, 2025
021e305
fix check
hundredark May 27, 2025
7e44ea6
fix mint asset decimals check
cedricfung May 28, 2025
e08e947
should check freeze authority
hundredark May 28, 2025
1ef83bb
skip small amount of sol when post process
hundredark May 28, 2025
eaa5df4
improve cache rent
hundredark May 28, 2025
3615f85
update procedure
hundredark May 28, 2025
5477199
fix amount check
hundredark May 28, 2025
e53d960
fix post process amount check
cedricfung May 28, 2025
c3d244d
simplify the fee logic hidden deep inside the output struct
cedricfung May 28, 2025
60bd14e
fix getSystemCallFeeFromXIN
hundredark May 28, 2025
fa27a00
fix fee amount
hundredark May 28, 2025
8662360
simplify fee ratio handling to observer only
cedricfung May 28, 2025
90dcbf5
fix write fee ratio
cedricfung May 28, 2025
563540f
fix test
hundredark May 28, 2025
39f891d
fix test
hundredark May 28, 2025
3bb7286
fix test
hundredark May 28, 2025
2b1487e
slight fix
hundredark May 29, 2025
228b7e2
fix check
hundredark May 29, 2025
062bf26
should not include fee id in system call
cedricfung May 29, 2025
71b2bbc
simplify some user id function return type
cedricfung May 29, 2025
f7211de
simplify the referenced outputs return value
cedricfung May 29, 2025
7ff13e6
remove the confirm calls loop usage
cedricfung May 29, 2025
d867206
always panic in mtg if the external rpc result unexpected
cedricfung May 29, 2025
b68a9ce
should not refund request if user input data error
cedricfung May 29, 2025
b33fc72
fix refund
hundredark May 29, 2025
a2df4b8
fix CheckUnconfirmedWithdrawals
hundredark May 29, 2025
14f2939
compare prepare tx with user outputs
hundredark May 29, 2025
23715e0
fix test
hundredark May 29, 2025
fd7a6e1
compare post call with online tx
hundredark May 30, 2025
62e9f8c
slight fix
hundredark May 30, 2025
0dc4c7e
slight improve
hundredark May 30, 2025
8f4e7a6
fix prepare call changes validation
cedricfung May 30, 2025
6cfa7e2
simplify deposit verification by comparing raw tx
cedricfung May 30, 2025
6e2cb5e
revert deposit verification
cedricfung May 30, 2025
16a5bc7
fix ata and mint account checks
cedricfung May 30, 2025
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
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ on:
branches: [ "main" ]
env:
POLYGONRPC: ${{ vars.POLYGONRPC }}
SOLANARPC: ${{ vars.SOLANARPC }}

jobs:
test:
@@ -42,3 +43,6 @@ jobs:

- name: TestSigner
run: go test -v ./signer/...

- name: TestComputer
run: go test -v ./computer/...
Loading

Unchanged files with check annotations Beta

sum := h.Sum(nil)
sum[6] = (sum[6] & 0x0f) | 0x30
sum[8] = (sum[8] & 0x3f) | 0x80
id, err := uuid.FromBytes(sum)

Check failure on line 119 in apps/ethereum/common.go

GitHub Actions / lint

undefined: uuid (typecheck)
if err != nil {
panic(hex.EncodeToString(sum))
}
}
func packSafeArguments(address string) []byte {
addressTy, err := ga.NewType("address", "", nil)

Check failure on line 360 in apps/ethereum/common.go

GitHub Actions / lint

addressTy declared and not used (typecheck)
if err != nil {
panic(err)
}
arguments := ga.Arguments{
{

Check failure on line 366 in apps/ethereum/common.go

GitHub Actions / lint

missing type in composite literal (typecheck)
Type: addressTy,
},
}
}
func packSaltArguments(salt *big.Int) []byte {
uint256Ty, err := ga.NewType("uint256", "", nil)

Check failure on line 381 in apps/ethereum/common.go

GitHub Actions / lint

uint256Ty declared and not used (typecheck)
if err != nil {
panic(err)
}
arguments := ga.Arguments{
{

Check failure on line 387 in apps/ethereum/common.go

GitHub Actions / lint

missing type in composite literal (typecheck)
Type: uint256Ty,
},
}
}
func packSafeTransactionArguments(tx *SafeTransaction) []byte {
bytes32Ty, err := ga.NewType("bytes32", "", nil)

Check failure on line 402 in apps/ethereum/common.go

GitHub Actions / lint

bytes32Ty declared and not used (typecheck)
if err != nil {
panic(err)
}
addressTy, err := ga.NewType("address", "", nil)

Check failure on line 406 in apps/ethereum/common.go

GitHub Actions / lint

addressTy declared and not used (typecheck)
if err != nil {
panic(err)
}
uint256Ty, err := ga.NewType("uint256", "", nil)

Check failure on line 410 in apps/ethereum/common.go

GitHub Actions / lint

uint256Ty declared and not used (typecheck)
if err != nil {
panic(err)
}
arguments := ga.Arguments{
{

Check failure on line 415 in apps/ethereum/common.go

GitHub Actions / lint

missing type in composite literal (typecheck)
Type: bytes32Ty,
},
{
}
func packDomainSeparatorArguments(chainID int64, safeAddress string) []byte {
bytes32Ty, err := ga.NewType("bytes32", "", nil)

Check failure on line 474 in apps/ethereum/common.go

GitHub Actions / lint

bytes32Ty declared and not used (typecheck)
if err != nil {
panic(err)
}