Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jimjbrettj committed Sep 19, 2024
1 parent c9fdff3 commit a16d6df
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/adrg/xdg v0.5.0
github.com/btcsuite/btcd/btcutil v1.1.6
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce
github.com/centrifuge/go-substrate-rpc-client/v4 v4.1.0
github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1
github.com/cockroachdb/pebble v1.1.2
github.com/cosmos/go-bip39 v1.0.0
github.com/dgraph-io/badger/v2 v2.2007.4
Expand Down Expand Up @@ -46,6 +46,7 @@ require (
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/term v0.24.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v3 v3.0.1
)

require (
Expand Down Expand Up @@ -195,7 +196,7 @@ require (
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce // indirect
github.com/vedhavyas/go-subkey v1.0.4-0.20220708014838-349cf3021f51 // indirect
github.com/vedhavyas/go-subkey/v2 v2.0.0 // indirect
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
github.com/wlynxg/anet v0.0.3 // indirect
go.opencensus.io v0.24.0 // indirect
Expand All @@ -215,12 +216,11 @@ require (
gonum.org/v1/gonum v0.15.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
)

go 1.21

replace github.com/tetratelabs/wazero => github.com/ChainSafe/wazero v0.0.0-20240319130522-78b21a59bd5f

replace github.com/centrifuge/go-substrate-rpc-client/v4 => github.com/timwu20/go-substrate-rpc-client/v4 v4.0.0-20231110032757-3d8e441b7303
//replace github.com/centrifuge/go-substrate-rpc-client/v4 => github.com/timwu20/go-substrate-rpc-client/v4 v4.0.0-20231110032757-3d8e441b7303
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1 h1:io49TJ8IOIlzipioJc9pJlrjgdJvqktpUWYxVY5AUjE=
github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1/go.mod h1:k61SBXqYmnZO4frAJyH3iuqjolYrYsq79r8EstmklDY=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
Expand Down Expand Up @@ -657,8 +659,6 @@ github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI=
github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
github.com/timwu20/go-substrate-rpc-client/v4 v4.0.0-20231110032757-3d8e441b7303 h1:FX7wMjDD0sWGWsC9k+stJaYwThbaq6BDT7ArlInU0KI=
github.com/timwu20/go-substrate-rpc-client/v4 v4.0.0-20231110032757-3d8e441b7303/go.mod h1:1p5145LS4BacYYKFstnHScydK9MLjZ15l72v8mbngPQ=
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
Expand All @@ -670,8 +670,8 @@ github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3C
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/vedhavyas/go-subkey v1.0.4-0.20220708014838-349cf3021f51 h1:AxcEnJDD4X2pDWsE/vEHcLnd1408m2rfO8aGuk2dBOI=
github.com/vedhavyas/go-subkey v1.0.4-0.20220708014838-349cf3021f51/go.mod h1:aOIil/KS9hJlnr9ZSQKSoXdu/MbnkCxG4x9IOlLsMtI=
github.com/vedhavyas/go-subkey/v2 v2.0.0 h1:LemDIsrVtRSOkp0FA8HxP6ynfKjeOj3BY2U9UNfeDMA=
github.com/vedhavyas/go-subkey/v2 v2.0.0/go.mod h1:95aZ+XDCWAUUynjlmi7BtPExjXgXxByE0WfBwbmIRH4=
github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ=
Expand Down
5 changes: 5 additions & 0 deletions lib/runtime/wazero/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -2186,6 +2186,11 @@ func ext_storage_get_version_1(ctx context.Context, m api.Module, keySpan uint64
value := storage.Get(key)
logger.Debugf("value: 0x%x", value)

if bytes.Equal(common.MustHexToBytes("0x26aa394eea5630e07c48ae0c9558cef734abf5cb34d6244378cddbf18e849d96"), key) {
//fmt.Println("performing storage get on our key")
fmt.Printf("get on our key, with value: %v\n", common.BytesToHex(value))
}

var encodedOption []byte
if value != nil {
encodedOption = scale.MustMarshal(&value)
Expand Down
1 change: 1 addition & 0 deletions lib/runtime/wazero/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,7 @@ func TestInstance_ExecuteBlock_PaseoRuntime_PaseoBlock1789153(t *testing.T) {

instance, err := NewInstanceFromTrie(paseoTrie, cfg)
require.NoError(t, err)
instance.GetCodeHash()

blockResponse := &messages.BlockResponseMessage{}
err = blockResponse.Decode(common.MustHexToBytes("0x0a980f0a2000ab8c6e55a9951698052d9d999eb0c440c525af05867df39cb55863632b4ad912c702dacf47ace27c5ea78dc8dd9b3e22b02fef70865663511c8dc625c682adb92e7b86336d00c29a9d4465400c980cca388963461755040f2ba4c5ed722afc204014426e9080804403dad405e595bdca5f068ae91a75d455c90f3e7672a2ee62d3b506a93c210c0642414245b501012d00000080411411000000004cdbdb6fad62ab658029ea5891097221601991b27937b7d5d5631977e6eed1403aca4e0969fca166cd9442090a19800960743275ccde702ceb2380ca03a1410c4cbcb30f76e438b4f373f4d11f0e962717d993f8d5875f704bb62b1833b86b0a04424545468403e27785a60c1caf697109d8e173e3885432223ae08cc3a7736cb47578672228800542414245010174ee1ef2749cf4c906e7451df6f4c437e1c28cf43cde73e1ea0b20fa2e6b253559991104b5cb0ee7e89878bbf266c41a79609c9bb342d0ecd66b5cabd8abbb821a0b280403000b0028bf4a90011a9c0c69180436001c404082040000003c1c2072fc87375e6fb060fa2c4d2e2bb5e49655a4085ce81e9f38b4f8fc0c27b38aed1a2b14ce90ae52f299659b7e05d8e7a36f502b8b4e6b0b51bdee39b8864040820a00000046b4b8d09b32f8733851d3c52e1755baf47cdf94178d6d41f1046e7b27d24d20e5bd457dc11779174693cdca461ef5a554ab5aebc7b240f7e7dabb63db81eb8c4040821200000034780d63fe628c9ed70cfe4bf9bccab95885f7ad7dc8c9ef5c8bbf4c0ed4c7737e66975f5e36863a37847449a9bdd265c33473dd01c66d2eb6df56e2b54aee8c404082200000002c5e506d505990ef37036887292fea85e545f45c477512699fb209ce07f0085536b57a0b9eba6dc265134a2fc9548b72c2ed762c0d0e749cc40f4bb6fbf83a8d40408221000000f03f3ee19ecc74666b6733a57799ab73b50c1ede5df201e11849284b20b21a269bc18454d5b715e5a6bfbd454b37d39626db1bcb33bac1c78ab793680d42c3824040823200000024038d3803c9bfce4221c59913037affe5f7f67e2c85da9ae22a7de1a2b84315cc842618492e1157fa344b350840d3b451f1a17b863037c4f7f963c3c136158d40408233000000c2a2489e88287315fb5660ac8d614c90acb161acaa027f02640bfd647a4bcb01a33ca7efab99da38e12121f10294edf2f203a6d3c23b40b9bfb64215c2b0bb8204df070000dacf47ace27c5ea78dc8dd9b3e22b02fef70865663511c8dc625c682adb92e7b1421bbd8065689fbffd0015ec824862c247c74efb81d7097c8916ce538d1000a6da866424c6851d32a2dec2a17af4895b439f48bcbd15e8bd29cb90dc36881b1cadb7a887993a9d0389947e10fe20354e3e4bcd288589d5227b4882414f11c73414a850a6eea37caa076d56c409108f259982204b35471ccdc77d15343afd8ae661d3dd5391a9939cd36c2b50a174a4639ae726e27a39555892e401b84341754b6d8e34c5047efeb00080de9223931f3806f09642aae5765317d76103907898e3dfd7cc6839082ac61c25874fd304aa9f04c9c6ab22669007b9779d018f754fded4acef6aaa37f3d19eb3318fa5a9b62188ea2e488b2cb9a0af895ef496703c80000009103530676dcbb08f5a82b835bd38ab0fe7da0644dee97dd315291ad75b55a340261e652220076cf83e15e80a19af5bcaea0785d4e48d229cdf5dd153864350478f15087f57d04f99b61a2da580b7a37ca571fc01082ce68442eeb908b379f07ae44b9046fcc0c066175726120bf208a0800000000045250535290f74a4a94758ac505a0bacdd52d7739d62b616eb03840d24d4a2df42df295c31d82336d0005617572610101da85d66ac9895ad47f17997a74dc59b702b508eabdb102df271937688041d842f1c824c1cbc7e5ae703d761043b472c383e4712f7cac6b401dadf7530c5a3c8000000000e04c1b000c01fe7447034f72f3147c7f8f597acc64e9a451976dccc44222e9bf4490980d7b546f4341e563634c0e121bf2520381c35ed28746afc8904904fce2fba1551a4d8001364d7f7c48ae3e22d558a0b940ae51225dacc714950d322ed03733adb6c4be442a946caff686b716b605acf529ff7353f279efb104960a8fbf8433851b8ec88902844ccafbb3dae450f7c9bb870167d69b5d76a44ac975539da3b8d9ff908a6e2489d61daf3f2db5e188a235db74ea5d65eea9c9fbfd06e6c068f2abef52781e8610070089dbf7d702484000b3b22f06e497e4b1babeebdebffd34104e7becda11f77ada82336d00f74a4a94758ac505a0bacdd52d7739d62b616eb03840d24d4a2df42df295c31d6a489ada4a1a7e60a4418b0e7e9c037f21096d55e71dd479fa06c2fcc2893ed3100642414245b50103140000007f41141100000000a61518d94943fdb3099b7152ae8853406b43181d4323902010619ce327c8241a7bac1d6623d1bcf08c1579db3ea6a192ddafd0177c936808eccdec4892f47007d2b4c93b9ee38019acf47b272474ab31ee2f9e905fe6d52a43cb4de1018a4a00044245454684039b9b32499e519a43c1242be468073cce8a7b70604bd1766706bea09cd66889d70805424142450101b83da521999ad8d04448cf4aea523f4ecd32e9ad568daf47d9e02811408b8817f85e7865018512510f6da3fe0cce92a173622b3411fcff81802e3d7316cbd58e")) //nolint:lll
Expand Down

0 comments on commit a16d6df

Please sign in to comment.