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

feat: Integrate WeaveVM as a secondary backend in EigenDA proxy #198

Open
wants to merge 50 commits into
base: main
Choose a base branch
from

Conversation

allnil
Copy link

@allnil allnil commented Nov 14, 2024

Hey! PR from WeaveVM team to integrate our chain as secondary backend
Awaiting for review, notes and additional requests! :)

Changes proposed

Integrates weave-vm as a secondary storage
It implements required interfaces and adds cli/env configuration

Note to reviewers

  • add directory with clients to the weave vm node and web3signer client
  • we can use web3signer to sign transactions, also tested with tis enabled
  • make e2e-test don't produce errors and a e2e test for wvm fallback works only when WVM_PRIV_KEY has been set
    so it shouldn't break the CI

https://gateway.wvm.dev/calldata/0xbc9ff1082e36595ea14f1109c817bcf35a73ad566f7a38d8dbdda2d82b50d5ab
https://explorer.wvm.dev/tx/0xbc9ff1082e36595ea14f1109c817bcf35a73ad566f7a38d8dbdda2d82b50d5ab

INFO [11-15|17:11:04.219] Using WVM backend                        role=eigenda_proxy
INFO [11-15|17:11:04.220] TLS configuration enabled for Web3Signer client role=eigenda_proxy cert_file=/Users/nilmedvedev/Projects/DLL/wvm-web3signer/config/client.crt key_file=/Users/nilmedvedev/Projects/DLL/wvm-web3signer/config/client.key ca_file=/Users/nilmedvedev/Projects/DLL/wvm-web3signer/config/server.crt
INFO [11-15|17:11:04.221] Enabling certificate verification        role=eigenda_proxy confirmation_depth=0
INFO [11-15|17:11:04.226]     Reading G1 points (16777216 bytes) takes 4.034ms role=eigenda_proxy
INFO [11-15|17:11:04.463]     Parsing takes 237.728ms              role=eigenda_proxy
numthread 16
INFO [11-15|17:11:04.467] Certificate verification with Ethereum enabled role=eigenda_proxy
INFO [11-15|17:11:04.467] Using EigenDA backend                    role=eigenda_proxy
INFO [11-15|17:11:04.467] Creating storage router                  role=eigenda_proxy "eigenda backend type"=true "s3 backend type"=false "wvm backend type"=true
INFO [11-15|17:11:04.468] Starting DA server                       role=eigenda_proxy endpoint=127.0.0.1:3100
INFO [11-15|17:11:04.479] Started EigenDA proxy server             role=eigenda_proxy
INFO [11-15|17:11:13.055] Processing POST request                  role=eigenda_proxy commitment= commitmentMeta="{Mode:simple CertVersion:0}"
INFO [11-15|17:11:13.055] Attempting to disperse blob to EigenDA   role=eigenda_proxy subsystem=eigenda-client
INFO [11-15|17:11:13.801] Blob accepted by EigenDA disperser, now polling for status updates role=eigenda_proxy subsystem=eigenda-client requestID=NGYxOTdjZDQ1NmNmYTZhMmI0NjQ4NzAwNTdjMzUwMjUzYTZkMDQ0Y2E1MTkxNmI3OTNlMTgxZTlhNzUxNmY1YS0zMTM3MzMzMTM2MzkzMDM2MzczMzM4MzMzOTMyMzkzOTM1MzUzMDJmMzEyZjMzMzMyZjMwMmYzMzMzMmZlM2IwYzQ0Mjk4ZmMxYzE0OWFmYmY0Yzg5OTZmYjkyNDI3YWU0MWU0NjQ5YjkzNGNhNDk1OTkxYjc4NTJiODU1
INFO [11-15|17:11:19.149] Blob is being processed by the EigenDA network role=eigenda_proxy subsystem=eigenda-client requestID=NGYxOTdjZDQ1NmNmYTZhMmI0NjQ4NzAwNTdjMzUwMjUzYTZkMDQ0Y2E1MTkxNmI3OTNlMTgxZTlhNzUxNmY1YS0zMTM3MzMzMTM2MzkzMDM2MzczMzM4MzMzOTMyMzkzOTM1MzUzMDJmMzEyZjMzMzMyZjMwMmYzMzMzMmZlM2IwYzQ0Mjk4ZmMxYzE0OWFmYmY0Yzg5OTZmYjkyNDI3YWU0MWU0NjQ5YjkzNGNhNDk1OTkxYjc4NTJiODU1
INFO [11-15|17:12:54.401] EigenDA blob confirmed                   role=eigenda_proxy subsystem=eigenda-client requestID=NGYxOTdjZDQ1NmNmYTZhMmI0NjQ4NzAwNTdjMzUwMjUzYTZkMDQ0Y2E1MTkxNmI3OTNlMTgxZTlhNzUxNmY1YS0zMTM3MzMzMTM2MzkzMDM2MzczMzM4MzMzOTMyMzkzOTM1MzUzMDJmMzEyZjMzMzMyZjMwMmYzMzMzMmZlM2IwYzQ0Mjk4ZmMxYzE0OWFmYmY0Yzg5OTZmYjkyNDI3YWU0MWU0NjQ5YjkzNGNhNDk1OTkxYjc4NTJiODU1 confirmationDepth=0
INFO [11-15|17:12:54.860] response commitment: 00f901d5f850f842a0189c4b53cf915e947d9c6f844d93f0d2a856ec3f48806c612e0d66a10b68aaa6a00668cf86834815b909b9c545caea10dd78b1dbad4caf93065a019f5e7651d6e004cac480213701c401213701f90180830138cc2ff873eba0d8ef2143361c6f2785f0cffd56c590ae2d7d6feb97ccc9ce1832d7ecae8283f88200018263618329e7e2a0b7e21b955b1b64111b418d245853e448d64dd40bd98d418e3a67054aacd99dcb008329e83aa0f2e836344fc06269cfa1d398b429b6b0107b0ab009e5aa03a3ee57397f0ea958b90100a8faed46607aba3a64ce4860c8324cdd0b0fa2b0e87fbd79c88eab7f5248af879855c2b791bf39f015a3cbc8f8c11be9d7ac3c2ecdcff88c0429574ad878da72615ea2726646f7461a968b85e78cad645e484da0c36f363f2e6f4fa4ae5f3e7918b5678c755e886cad4c9cabb43224f8667d75b2b2ac69fe2709778ce2c6e473bac4f8fd6a4c49f3214e217b52cd0a8ae6d5d0d0e59f27053ad775ad666da2169b90f637fd0bf1dfd95d8697522c94291ef1a4548616d5a2abafed3641051462462b886ea4d461ccf3b9c0aa4310f866309562b54d5d3ec684cddfd6b9d63cac98fe67027c722add31349d549149d45857a4a46195f5f796c286f50a6677e787820001
 role=eigenda_proxy
INFO [11-15|17:12:54.862] request                                  role=eigenda_proxy method=POST url="/put?commitment_mode=simple" duration=1m41.807238875s err="metrics middleware: error parsing version byte: version byte not found in path: /put"
INFO [11-15|17:12:55.211] addresses                                role=eigenda_proxy address=0xcb544d65739565dc9e3360c8b4090981ed36ed89
INFO [11-15|17:12:55.379] wvm: estimated tx gas price              role=eigenda_proxy price=506,006
INFO [11-15|17:12:55.432] addresses                                role=eigenda_proxy address=0xcb544d65739565dc9e3360c8b4090981ed36ed89
INFO [11-15|17:12:55.561] sign transaction using web3signer        role=eigenda_proxy
INFO [11-15|17:12:55.566] addresses                                role=eigenda_proxy address=0xcb544d65739565dc9e3360c8b4090981ed36ed89
INFO [11-15|17:12:55.652] wvm: successfully sent transaction       role=eigenda_proxy "tx hash"=0xbc9ff1082e36595ea14f1109c817bcf35a73ad566f7a38d8dbdda2d82b50d5ab
INFO [11-15|17:12:55.652] wvm: transaction receipt                 role=eigenda_proxy "tx receipt"="{\n\t\"type\": \"2\",\n\t\"chainId\": \"0x2518\",\n\t\"nonce\": \"30\",\n\t\"to\": \"0x0000000000000000000000000000000000000000\",\n\t\"gas\": \"506006\",\n\t\"maxPriorityFeePerGas\": \"0\",\n\t\"maxFeePerGas\": \"2140000000\",\n\t\"value\": \"0\",\n\t\"input\": \"0xc28fefafefefefefefefd2efbcafcfefefefefefafefefefd3efcfefafb0afbf9fcfaffb\",\n\t\"accessList\": [],\n\t\"v\": \"0x0\",\n\t\"r\": \"0xc4bb55bb3c97582a9c14e72a0f140d88216ff44ea58a4df99187d46beb783c7e\",\n\t\"s\": \"0x4db18fe3ee87064f61200bf0cf4e38a25d35db79f0532031812a6dc963188fa5\",\n\t\"yParity\": \"0x0\",\n\t\"hash\": \"0xbc9ff1082e36595ea14f1109c817bcf35a73ad566f7a38d8dbdda2d82b50d5ab\",\n\t\"transactionTime\": \"15 Nov 24 17:12 WET\",\n\t\"transactionCost\": \"1082852840000000\"\n}"
INFO [11-15|17:12:55.652] wvm backend: save wvm tx hash - batch_id:blob_index in internal storage role=eigenda_proxy "tx hash"=0xbc9ff1082e36595ea14f1109c817bcf35a73ad566f7a38d8dbdda2d82b50d5ab "provided key"="U\xf7\x81D\x18\xbd\xc2\xeb\xf8\v?U\xf6\xfa\xe1=.\xa0/\xbd\xf5\xa6\xa3u?\xf3\xc2#;\t:\xec"
INFO [11-15|17:14:24.399] Processing GET request                   role=eigenda_proxy commitment=f901d5f850f842a0189c4b53cf915e947d9c6f844d93f0d2a856ec3f48806c612e0d66a10b68aaa6a00668cf86834815b909b9c545caea10dd78b1dbad4caf93065a019f5e7651d6e004cac480213701c401213701f90180830138cc2ff873eba0d8ef2143361c6f2785f0cffd56c590ae2d7d6feb97ccc9ce1832d7ecae8283f88200018263618329e7e2a0b7e21b955b1b64111b418d245853e448d64dd40bd98d418e3a67054aacd99dcb008329e83aa0f2e836344fc06269cfa1d398b429b6b0107b0ab009e5aa03a3ee57397f0ea958b90100a8faed46607aba3a64ce4860c8324cdd0b0fa2b0e87fbd79c88eab7f5248af879855c2b791bf39f015a3cbc8f8c11be9d7ac3c2ecdcff88c0429574ad878da72615ea2726646f7461a968b85e78cad645e484da0c36f363f2e6f4fa4ae5f3e7918b5678c755e886cad4c9cabb43224f8667d75b2b2ac69fe2709778ce2c6e473bac4f8fd6a4c49f3214e217b52cd0a8ae6d5d0d0e59f27053ad775ad666da2169b90f637fd0bf1dfd95d8697522c94291ef1a4548616d5a2abafed3641051462462b886ea4d461ccf3b9c0aa4310f866309562b54d5d3ec684cddfd6b9d63cac98fe67027c722add31349d549149d45857a4a46195f5f796c286f50a6677e787820001 commitmentMeta="{Mode:simple CertVersion:0}"
INFO [11-15|17:14:25.376] request                                  role=eigenda_proxy method=GET  url="/get/0x00f901d5f850f842a0189c4b53cf915e947d9c6f844d93f0d2a856ec3f48806c612e0d66a10b68aaa6a00668cf86834815b909b9c545caea10dd78b1dbad4caf93065a019f5e7651d6e004cac480213701c401213701f90180830138cc2ff873eba0d8ef2143361c6f2785f0cffd56c590ae2d7d6feb97ccc9ce1832d7ecae8283f88200018263618329e7e2a0b7e21b955b1b64111b418d245853e448d64dd40bd98d418e3a67054aacd99dcb008329e83aa0f2e836344fc06269cfa1d398b429b6b0107b0ab009e5aa03a3ee57397f0ea958b90100a8faed46607aba3a64ce4860c8324cdd0b0fa2b0e87fbd79c88eab7f5248af879855c2b791bf39f015a3cbc8f8c11be9d7ac3c2ecdcff88c0429574ad878da72615ea2726646f7461a968b85e78cad645e484da0c36f363f2e6f4fa4ae5f3e7918b5678c755e886cad4c9cabb43224f8667d75b2b2ac69fe2709778ce2c6e473bac4f8fd6a4c49f3214e217b52cd0a8ae6d5d0d0e59f27053ad775ad666da2169b90f637fd0bf1dfd95d8697522c94291ef1a4548616d5a2abafed3641051462462b886ea4d461ccf3b9c0aa4310f866309562b54d5d3ec684cddfd6b9d63cac98fe67027c722add31349d549149d45857a4a46195f5f796c286f50a6677e787820001?commitment_mode=simple" duration=977.43475ms
^CINFO [11-15|17:14:29.714] successfully shutdown API server         role=eigenda_proxy
➜  wvm-eigenda-proxy git:(feat/eigenda-wvm-code-integration) ✗ curl -X POST "http://127.0.0.1:3100/put?commitment_mode=simple" \
      --data-binary "some data that will successfully be written to EigenDA" \
      -H "Content-Type: application/octet-stream" \
      --output response.bin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   559  100   505    0    54      4      0  0:02:06  0:01:51  0:00:15   117
➜  wvm-eigenda-proxy git:(feat/eigenda-wvm-code-integration) ✗ COMMITMENT=$(xxd -p response.bin | tr -d '\n' | tr -d ' ')
➜  wvm-eigenda-proxy git:(feat/eigenda-wvm-code-integration) ✗  curl -X GET "http:/127.0.0.1:3100/get/0x$COMMITMENT?commitment_mode=simple" \
     -H "Content-Type: application/octet-stream"
some data that will successfully be written to EigenDA%

https://explorer.wvm.dev/tx/0x7bdd17fdfee0190499c78a78586aa82366d52d5636e939e7e35eb5df2c630195

@allnil allnil changed the title [WIP] feat: eigenda wvm code integration [WIP] feat: Integrate WeaveVM as a secondary backend in EigenDA proxy Nov 14, 2024
@allnil allnil force-pushed the feat/eigenda-wvm-code-integration branch from 158053a to bee623c Compare November 15, 2024 17:42
@allnil allnil changed the title [WIP] feat: Integrate WeaveVM as a secondary backend in EigenDA proxy feat: Integrate WeaveVM as a secondary backend in EigenDA proxy Nov 15, 2024
@allnil allnil marked this pull request as ready for review November 15, 2024 17:51
@epociask epociask self-requested a review November 18, 2024 13:22
require.NoError(t, err)
require.Equal(t, expectedBlob, actualBlob)

requireSimpleClientSetGet(t, ts, e2e.RandBytes(1_000_000))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iiuc you're doing the same assertion logic twice

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm
frankly speaking I took test which was made for S3 and prepared weave vm config+backend type
so the core logic of the test suit is the same as it was

@@ -19,6 +19,7 @@ Features:
* Performs DA certificate verification during retrieval to ensure that data represented by bad DA certificates do not become part of the canonical chain.
* Compatibility with Optimism's alt-da commitment type with eigenda backend.
* Compatibility with Optimism's keccak-256 commitment type with S3 storage.
* Blobs permanent backup storage option via [WeaveVM](./store/precomputed_key/wvm).

In order to disperse to the EigenDA network in production, or at high throughput on testnet, please register your authentication ethereum address through [this form](https://forms.gle/3QRNTYhSMacVFNcU8). Your EigenDA authentication keypair address should not be associated with any funds anywhere.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please update the table to also reflect the WeaveVM cfg params?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 174 to 177
privateKey := os.Getenv("WVM_PRIV_KEY")
if privateKey == "" {
t.Skip("Skipping test as WVM_PRIV_KEY has not been set")
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this private key channeled to the server config?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep..I didn't supply it through cli package
I'll add it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

flags/flags.go Outdated
@@ -24,6 +25,7 @@ const (
S3Category = "S3 Cache/Fallback"
VerifierCategory = "KZG and Cert Verifier"
VerifierDeprecatedCategory = "DEPRECATED VERIFIER FLAGS -- THESE WILL BE REMOVED IN V2.0.0"
WVMCategory = "WVM Fallback/Perm Storage option"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we explicitly prefix "weave"? most users won't know the term wvm

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -210,6 +210,7 @@ require (
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/opencontainers/runtime-spec v1.2.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice only one new dependency

)

var (
EnabledFlagName = withFlagPrefix("enabled")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there no env var for the wvm account private key?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

signer Signer
}

func NewWvmRPCClient(log log.Logger, cfg *wvmtypes.Config, signer Signer) (*RPCClient, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this shadowing an existing client implementation or is it written from scratch?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm,
to make standard calls this package utilizes go-ethereum/ethclient and types
cause our node is a fork of ethereum client(in this case - reth) we are free from rewriting this part from scratch

everything else written around it

return ethRPCClient, nil
}

func (rpc *RPCClient) SendTransaction(ctx context.Context, to string, data []byte) (string, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to verify - is there a maximum data size that can be submitted per tx?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, mentioned

msg := ethereum.CallMsg{
From: fromAddress,
To: &toAddr,
Gas: 0x00,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why provide 0 gas?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm, in this case just makes things explicit
as CallMsg says:

Gas       uint64          // if 0, the call executes with near-infinite gas

Comment on lines 114 to 130
func (rpc *RPCClient) createRawTransaction(ctx context.Context, to string, data string, gasLimit uint64) (string, error) {
baseFee, err := rpc.client.SuggestGasPrice(ctx)
if err != nil {
return "", err
}

fromAddress, err := rpc.signer.GetAccount(ctx)
if err != nil {
return "", fmt.Errorf("failed to get an account from signer: %w", err)
}
nonce, err := rpc.client.PendingNonceAt(ctx, fromAddress)
if err != nil {
return "", err
}

signData := wvmtypes.SignData{To: to, Data: data, GasLimit: gasLimit, GasFeeCap: baseFee, Nonce: nonce}
return rpc.signer.SignTransaction(ctx, &signData)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there async collisions that can occur if this function is called twice in parallel? e.g, incorrect nonce mgmt

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked,
nonce from ethclient.PendingNonceAt call should be pretty reliable cause considers 'pending' transactions too
and if there will be any error during "send" the retry mechanism can repeat and resolve it
iiuc daproxy shouldn't have load of hundreds/thousands blobs which will transform in hundreds/thousands txs for the particular address

TransactionTime string `json:"transactionTime,omitempty"`
TransactionCost string `json:"transactionCost,omitempty"`
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we please change the package name to snake-case weave_vm to ensure compatibility with existing module naming schema?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed package weavevm => weave_vm

Comment on lines 79 to 82
fromAddress, err := rpc.signer.GetAccount(ctx)
if err != nil {
return 0, fmt.Errorf("failed to estimate gas, no signer")
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the underlying error also be wrapped here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, wrapped


// Store...wraps weaveVM client, ethclient and concurrent internal cache
type Store struct {
weaveVMClient WeaveVM
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just call this client?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

type Store struct {
weaveVMClient WeaveVM
log log.Logger
txCache *cache.Cache
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the purpose of this cache? Does it change hardware requirements and could it lead to OOM exceptions with high usage?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now we use it to store a mapping between commitment key and weave vm transaction hash
it's only temporary solution and should be changed alongside with arbitrary blob sizes
with rough estimations of 1 commitment per second and 15 days TTL + some overhead this cache shouldn't be more than 145MB
I tried to pick the most simple and "essentials" implementation which is thread-safety, has ttl expiry ,tested

store/store.go Outdated
@@ -52,6 +55,18 @@ func (cfg *Config) Check() error {
return fmt.Errorf("redis password is set, but endpoint is not")
}

// NOTE: we take the MaxBlobLengthBytes from verify package as it is done in memstore
// 8Mb in bytes is 8_388_608
if cfg.WeaveVMConfig.Enabled && verify.MaxBlobLengthBytes > 8_388_608 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

knit - let's add a constant var for 8_388_608

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

store/store.go Outdated
// NOTE: we take the MaxBlobLengthBytes from verify package as it is done in memstore
// 8Mb in bytes is 8_388_608
if cfg.WeaveVMConfig.Enabled && verify.MaxBlobLengthBytes > 8_388_608 {
return fmt.Errorf("current max blob size with weavevm secondary backend enabled is 8Mb")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 mb or 8 MiB?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made explicit, Mib

@@ -52,6 +55,18 @@ func (cfg *Config) Check() error {
return fmt.Errorf("redis password is set, but endpoint is not")
}

// NOTE: we take the MaxBlobLengthBytes from verify package as it is done in memstore
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the case where the user specifies both a private key and a remote signer config?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case we will create a client which will use web3signer
Are you suggesting to fail check and explicitly tell a user to pass params for only one of them?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a check
if there will be explicitly allowed to have multiple different signers at the same time it will be another story

return "", fmt.Errorf("weaveVM backend: tx hash for provided commitment not found")
}

weaveVM.log.Info("weaveVM backned: tx hash using provided commitment FOUND", "provided key", string(key))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this warrant an info log?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants