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

Upgrade local Geth version to PoS #1950

Merged
merged 111 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 105 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
8b7b07e
checkpoint
badgersrus Jun 5, 2024
6ed3b57
Merge branch 'main' of https://github.com/ten-protocol/go-ten into wi…
badgersrus Jun 5, 2024
e9ef5c0
mining config working
badgersrus Jun 5, 2024
58487d3
stashing prysm 5.0.0 attempt
badgersrus Jun 12, 2024
8c2e861
remove docker pos
badgersrus Jun 12, 2024
9ac304e
stashing withdrawal hash error
badgersrus Jun 13, 2024
5df0b66
remove decodessz file
badgersrus Jun 13, 2024
cc3fdf7
add cancun signer
badgersrus Jun 13, 2024
44e9f35
fixed withdrawal hash issue
badgersrus Jun 14, 2024
93744b1
stashing
badgersrus Jun 24, 2024
f11978a
delete old geth gen config
badgersrus Jun 24, 2024
597f2c1
blah
badgersrus Jun 24, 2024
bddaa80
update start beacon params - NEW ERROR UNLOCKED
badgersrus Jun 25, 2024
9eef43a
stashing
badgersrus Jun 27, 2024
b4a218b
merging latest
badgersrus Jun 27, 2024
815e8fa
stashing
badgersrus Jul 1, 2024
635ae66
new error unlocked
badgersrus Jul 2, 2024
04ff2d9
stashing before I lose my mind
badgersrus Jul 2, 2024
2be235e
set execution endpoint with geth.ipc
badgersrus Jul 3, 2024
fc3298e
tidy up
badgersrus Jul 3, 2024
794164f
stashing
badgersrus Jul 3, 2024
c489974
stashing
badgersrus Jul 4, 2024
9ee0b71
stashing
badgersrus Jul 4, 2024
cd10cd3
trying a script version instead
badgersrus Jul 5, 2024
e0f65fd
stashing
badgersrus Jul 8, 2024
b1a27bb
dumping
badgersrus Jul 8, 2024
8ecdfc6
delete build contents
badgersrus Jul 8, 2024
c838582
script complete ... still [Cdoesn't work though
badgersrus Jul 9, 2024
ce367a2
stashing init-geth script & start-network script. geth Forkchoice req…
badgersrus Jul 9, 2024
782e39d
script working but timeout needs to be 10 minutes
badgersrus Jul 10, 2024
1a49fd6
stashing before I start messing around with ports
badgersrus Jul 10, 2024
9da3d92
tx minted test passing
badgersrus Jul 10, 2024
41da44a
Merge branch 'main' into will/upgrade-geth
badgersrus Jul 10, 2024
7d42308
update tests
badgersrus Jul 11, 2024
5c1b644
Merge branch 'will/upgrade-geth' of https://github.com/ten-protocol/g…
badgersrus Jul 11, 2024
471a715
missed files on commit
badgersrus Jul 11, 2024
944e0cb
lint
badgersrus Jul 11, 2024
f4f27b7
lint
badgersrus Jul 11, 2024
05742da
compile fix
badgersrus Jul 11, 2024
e0c2aca
lint;
badgersrus Jul 11, 2024
9dbeb5c
stashing at working pos network test
badgersrus Jul 11, 2024
b0c4d7f
fix script
badgersrus Jul 11, 2024
5c3b859
remove intermediate file
badgersrus Jul 11, 2024
bfa061a
add chainID to cli
badgersrus Jul 12, 2024
faf370d
add wait
badgersrus Jul 12, 2024
33de61d
add sleep to code for gh actions
badgersrus Jul 12, 2024
10ae46e
add new timeout
badgersrus Jul 12, 2024
aa057b3
set block number
badgersrus Jul 12, 2024
51cb790
update pr build
badgersrus Jul 12, 2024
f3c1abb
close UDP ports
badgersrus Jul 12, 2024
5075359
close UDP ports
badgersrus Jul 12, 2024
958b05a
add new sleep
badgersrus Jul 15, 2024
d15854d
move gethdata out of timestamped build path due to character limit
badgersrus Jul 15, 2024
1327e7d
remove crud
badgersrus Jul 15, 2024
f5a07dc
shorten build path
badgersrus Jul 15, 2024
146413a
see if this works
badgersrus Jul 15, 2024
f9b7cc6
lint
badgersrus Jul 15, 2024
cd4acf9
remove geth.ipc before uploading
badgersrus Jul 15, 2024
98934e5
clean up gethdata dir
badgersrus Jul 15, 2024
c7d2249
remove cleanup
badgersrus Jul 15, 2024
fea9d9c
upload only log files
badgersrus Jul 16, 2024
7220dc6
filter out .ipc from upload
badgersrus Jul 16, 2024
5fbb101
fix filtering
badgersrus Jul 16, 2024
01fcd09
homogenise chainID
badgersrus Jul 16, 2024
9da31cd
fix build path counter thing
badgersrus Jul 16, 2024
f475dfa
add sleep after kill process
badgersrus Jul 16, 2024
4e46a1f
make sure proccesses are killed before starting next one
badgersrus Jul 16, 2024
e426224
kill processes from script by process name instead of PID
badgersrus Jul 16, 2024
5cca098
fix kill script
badgersrus Jul 16, 2024
b57775c
ugh
badgersrus Jul 16, 2024
0d777be
define process and kill it
badgersrus Jul 16, 2024
1a44026
its a mess, lets see how it plays out cotton
badgersrus Jul 16, 2024
6494083
add chain ID to prysm config
badgersrus Jul 16, 2024
f575882
signing out
badgersrus Jul 16, 2024
735bef9
stashing
badgersrus Jul 19, 2024
b094c93
capture PIDS and kill processes - need to add network start ports
badgersrus Jul 19, 2024
d7aa1cd
add port offsets for tcp & udp
badgersrus Jul 22, 2024
c9e06e9
remove bind address crap
badgersrus Jul 22, 2024
dbd59f9
add auth port
badgersrus Jul 22, 2024
2c6011d
lint:
badgersrus Jul 22, 2024
6fda7fb
fix gateway test
badgersrus Jul 23, 2024
1b9ea1b
increase wait delay on bridge xfers
badgersrus Jul 23, 2024
3c32db5
increase timeouts
badgersrus Jul 23, 2024
da3f603
increase timeouts
badgersrus Jul 23, 2024
8fa9456
add longer timeout
badgersrus Jul 23, 2024
05a865c
increase sim timeout and add logging
badgersrus Jul 23, 2024
675dda7
increase enclave client timeout ... que?
badgersrus Jul 23, 2024
aa3cfd0
increase build PR timeout
badgersrus Jul 23, 2024
a08212b
remove unnessecary timeouts, bump pr timeout for full network test
badgersrus Jul 23, 2024
66da4cf
10min timeout
badgersrus Jul 23, 2024
01159fd
improve port killing on close
badgersrus Jul 24, 2024
0a8c7b8
stashing before changing build number
badgersrus Jul 24, 2024
b23aed2
clean up
badgersrus Jul 24, 2024
2a76c77
Merge branch 'main' of https://github.com/ten-protocol/go-ten into wi…
badgersrus Jul 24, 2024
ecc54df
bail on enclave config refactor
badgersrus Jul 24, 2024
19058c0
increase build limit and add overwrite logic
badgersrus Jul 24, 2024
f105827
remove unwanted file
badgersrus Jul 24, 2024
9d6c1a4
stashing
badgersrus Jul 25, 2024
e5c4822
docker host config
badgersrus Jul 25, 2024
4f7e98b
change ports back
badgersrus Jul 25, 2024
ff5bb08
add virtual hosts and cors to geth
badgersrus Jul 25, 2024
efb08bb
lint
badgersrus Jul 25, 2024
5d5d9f0
fix geth port
badgersrus Jul 26, 2024
9c06990
Merge branch 'main' of https://github.com/ten-protocol/go-ten into wi…
badgersrus Jul 29, 2024
ddf13a0
fix tengateway test
badgersrus Jul 29, 2024
ff52e8f
add legeacy peer deps to hh build
badgersrus Jul 30, 2024
f016a3a
try adding --force
badgersrus Jul 30, 2024
e9bb537
remove old name
badgersrus Jul 30, 2024
ac30842
remove force install on hhdeployer
badgersrus Jul 30, 2024
402ef86
merge in stefans fix
badgersrus Jul 31, 2024
4cb1129
Merge branch 'main' of https://github.com/ten-protocol/go-ten into wi…
badgersrus Aug 7, 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
21 changes: 16 additions & 5 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
with:
go-version: 1.21.8

# Set the initial build number environment variable
- name: Set Build Number
run: |
echo "BUILD_NUMBER=1" >> $GITHUB_ENV

# Makes sure the artifacts are built correctly
- name: Build
run: go build -v ./...
Expand All @@ -31,19 +36,25 @@ jobs:
# Close specified ports using lsof before testing / local port list compiled from ./integration/constants.go
- name: Close Integration Test Ports
run: |
killall -9 geth-v1.12.2 || true
killall -9 beacon-chain-v4.0.6 || true
killall -9 validator-v4.0.6 || true
killall -9 geth || true
killall -9 beacon || true
killall -9 validator || true

lowest_port=8000 # Lowest starting port
highest_port=58000 # Highest port considering the offset
additional_ports=(80 81 99) # Additional specific ports

# Find processes listening on ports within the range and kill them
for pid in $(lsof -iTCP:$lowest_port-$highest_port -sTCP:LISTEN -t); do
echo "Killing process $pid on one of the ports from $lowest_port to $highest_port"
kill $pid || true
done

# Find processes listening on ports within the range and kill them
for pid in $(lsof -iUDP:$lowest_port-$highest_port -t); do
echo "Killing process $pid on one of the ports from $lowest_port to $highest_port"
kill $pid || true
done

# Close additional specific ports
for port in "${additional_ports[@]}"; do
Expand All @@ -54,7 +65,7 @@ jobs:
done

- name: Test
run: go test --failfast -v ./... -count=1 -timeout 5m
run: go test --failfast -v ./... -count=1 -timeout 10m

- name: Store simulation logs
uses: actions/upload-artifact@v4
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/manual-deploy-testnet-l1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,5 @@ jobs:
&& docker run -d \
-p 8025:8025 -p 8026:8026 -p 9000:9000 -p 9001:9001 \
--entrypoint /home/obscuro/go-obscuro/integration/eth2network/main/main ${{ vars.DOCKER_BUILD_TAG_ETH2NETWORK }} \
--blockTimeSecs=15 --slotsPerEpoch=2 --slotsPerSecond=15 \
--numNodes=1 --gethHTTPStartPort=8025 --gethWSStartPort=9000 \
--logToFile=false \
--gethHTTPStartPort=8025 --gethWSStartPort=9000 \
--prefundedAddrs="${{ vars.ACCOUNT_ADDR_WORKER }},${{ vars.ACCOUNT_ADDR_NODE_0 }},${{ vars.ACCOUNT_ADDR_NODE_1 }},${{ vars.ACCOUNT_ADDR_NODE_2 }},${{ vars.ACCOUNT_ADDR_L1_BRIDGE_TEST }}"'
4 changes: 2 additions & 2 deletions go/common/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type Host interface {
// HealthCheck returns the health status of the host + enclave + db
HealthCheck(context.Context) (*HealthCheck, error)

// ObscuroConfig returns the info of the Obscuro network
ObscuroConfig() (*common.ObscuroNetworkInfo, error)
// TenConfig returns the info of the Obscuro network
TenConfig() (*common.TenNetworkInfo, error)

// NewHeadsChan returns live batch headers
// Note - do not use directly. This is meant only for the NewHeadsManager, which multiplexes the headers
Expand Down
2 changes: 1 addition & 1 deletion go/common/query_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (p *QueryPagination) UnmarshalJSON(data []byte) error {
return nil
}

type ObscuroNetworkInfo struct {
type TenNetworkInfo struct {
ManagementContractAddress common.Address
L1StartHash common.Hash
MessageBusAddress common.Address
Expand Down
6 changes: 3 additions & 3 deletions go/config/enclave_cli_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const (
ProfilerEnabledFlag = "profilerEnabled"
MinGasPriceFlag = "minGasPrice"
MessageBusAddressFlag = "messageBusAddress"
ObscuroGenesisFlag = "obscuroGenesis"
TenGenesisFlag = "tenGenesis"
DebugNamespaceEnabledFlag = "debugNamespaceEnabled"
MaxBatchSizeFlag = "maxBatchSize"
MaxRollupSizeFlag = "maxRollupSize"
Expand Down Expand Up @@ -55,7 +55,7 @@ var EnclaveFlags = map[string]*flag.TenFlag{
L2BaseFeeFlag: flag.NewUint64Flag(L2BaseFeeFlag, params.InitialBaseFee, ""),
L2CoinbaseFlag: flag.NewStringFlag(L2CoinbaseFlag, "0xd6C9230053f45F873Cb66D8A02439380a37A4fbF", ""),
GasBatchExecutionLimit: flag.NewUint64Flag(GasBatchExecutionLimit, 3_000_000_000, "Max gas that can be executed in a single batch"),
ObscuroGenesisFlag: flag.NewStringFlag(ObscuroGenesisFlag, "", "The json string with the obscuro genesis"),
TenGenesisFlag: flag.NewStringFlag(TenGenesisFlag, "", "The json string with the obscuro genesis"),
L1ChainIDFlag: flag.NewInt64Flag(L1ChainIDFlag, 1337, "An integer representing the unique chain id of the Ethereum chain used as an L1 (default 1337)"),
ObscuroChainIDFlag: flag.NewInt64Flag(ObscuroChainIDFlag, 443, "An integer representing the unique chain id of the Obscuro chain (default 443)"),
UseInMemoryDBFlag: flag.NewBoolFlag(UseInMemoryDBFlag, true, "Whether the enclave will use an in-memory DB rather than persist data"),
Expand All @@ -68,7 +68,7 @@ var EnclaveFlags = map[string]*flag.TenFlag{
var enclaveRestrictedFlags = []string{
L1ChainIDFlag,
ObscuroChainIDFlag,
ObscuroGenesisFlag,
TenGenesisFlag,
UseInMemoryDBFlag,
ProfilerEnabledFlag,
DebugNamespaceEnabledFlag,
Expand Down
6 changes: 3 additions & 3 deletions go/config/enclave_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ type EnclaveConfig struct {
MessageBusAddress gethcommon.Address
// P2P address for validators to connect to the sequencer for live batch data
SequencerP2PAddress string
// A json string that specifies the prefunded addresses at the genesis of the Obscuro network
ObscuroGenesis string
// A json string that specifies the prefunded addresses at the genesis of the Ten network
TenGenesis string
// Whether debug calls are available
DebugNamespaceEnabled bool
// Maximum bytes a batch can be uncompressed.
Expand Down Expand Up @@ -186,7 +186,7 @@ func newConfig(flags map[string]*flag.TenFlag) (*EnclaveConfig, error) {
cfg.ProfilerEnabled = flags[ProfilerEnabledFlag].Bool()
cfg.MinGasPrice = big.NewInt(flags[MinGasPriceFlag].Int64())
cfg.MessageBusAddress = gethcommon.HexToAddress(flags[MessageBusAddressFlag].String())
cfg.ObscuroGenesis = flags[ObscuroGenesisFlag].String()
cfg.TenGenesis = flags[TenGenesisFlag].String()
cfg.DebugNamespaceEnabled = flags[DebugNamespaceEnabledFlag].Bool()
cfg.MaxBatchSize = flags[MaxBatchSizeFlag].Uint64()
cfg.MaxRollupSize = flags[MaxRollupSizeFlag].Uint64()
Expand Down
4 changes: 2 additions & 2 deletions go/config/enclave_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestRestrictedMode(t *testing.T) {
t.Setenv("EDG_TESTMODE", "false")
t.Setenv("EDG_"+strings.ToUpper(L1ChainIDFlag), "4444")
t.Setenv("EDG_"+strings.ToUpper(ObscuroChainIDFlag), "1243")
t.Setenv("EDG_"+strings.ToUpper(ObscuroGenesisFlag), "{}")
t.Setenv("EDG_"+strings.ToUpper(TenGenesisFlag), "{}")
t.Setenv("EDG_"+strings.ToUpper(UseInMemoryDBFlag), "true")
t.Setenv("EDG_"+strings.ToUpper(ProfilerEnabledFlag), "true")
t.Setenv("EDG_"+strings.ToUpper(DebugNamespaceEnabledFlag), "true")
Expand Down Expand Up @@ -115,7 +115,7 @@ func TestRestrictedModeNoCLIDuplication(t *testing.T) {
t.Setenv("EDG_TESTMODE", "false")
t.Setenv("EDG_"+strings.ToUpper(L1ChainIDFlag), "4444")
t.Setenv("EDG_"+strings.ToUpper(ObscuroChainIDFlag), "1243")
t.Setenv("EDG_"+strings.ToUpper(ObscuroGenesisFlag), "{}")
t.Setenv("EDG_"+strings.ToUpper(TenGenesisFlag), "{}")
t.Setenv("EDG_"+strings.ToUpper(UseInMemoryDBFlag), "true")
t.Setenv("EDG_"+strings.ToUpper(ProfilerEnabledFlag), "true")
t.Setenv("EDG_"+strings.ToUpper(DebugNamespaceEnabledFlag), "true")
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/container/enclave_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func NewEnclaveContainerWithLogger(config *config.EnclaveConfig, logger gethlog.
config.GenesisJSON = []byte(hardcodedGenesisJSON)
}

genesis, err := obscuroGenesis.New(config.ObscuroGenesis)
genesis, err := obscuroGenesis.New(config.TenGenesis)
if err != nil {
logger.Crit("unable to parse obscuro genesis", log.ErrKey, err)
}
Expand Down
2 changes: 1 addition & 1 deletion go/host/container/host_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func NewHostContainer(cfg *config.HostConfig, services *host.ServicesRegistry, p
rpcServer.RegisterAPIs([]rpc.API{
{
Namespace: APINamespaceObscuro,
Service: clientapi.NewObscuroAPI(h),
Service: clientapi.NewTenAPI(h),
},
{
Namespace: APINamespaceEth,
Expand Down
4 changes: 2 additions & 2 deletions go/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,15 @@ func (h *host) HealthCheck(ctx context.Context) (*hostcommon.HealthCheck, error)
}

// ObscuroConfig returns info on the Obscuro network
func (h *host) ObscuroConfig() (*common.ObscuroNetworkInfo, error) {
func (h *host) TenConfig() (*common.TenNetworkInfo, error) {
if h.l2MessageBusAddress == nil {
publicCfg, err := h.EnclaveClient().EnclavePublicConfig(context.Background())
if err != nil {
return nil, responses.ToInternalError(fmt.Errorf("unable to get L2 message bus address - %w", err))
}
h.l2MessageBusAddress = &publicCfg.L2MessageBusAddress
}
return &common.ObscuroNetworkInfo{
return &common.TenNetworkInfo{
ManagementContractAddress: h.config.ManagementContractAddress,
L1StartHash: h.config.L1StartHash,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,46 @@ import (
"github.com/ten-protocol/go-ten/go/common/host"
)

// ObscuroAPI implements Obscuro-specific JSON RPC operations.
type ObscuroAPI struct {
// TenAPI implements Ten-specific JSON RPC operations.
type TenAPI struct {
host host.Host
}

func NewObscuroAPI(host host.Host) *ObscuroAPI {
return &ObscuroAPI{
func NewTenAPI(host host.Host) *TenAPI {
return &TenAPI{
host: host,
}
}

// Health returns the health status of obscuro host + enclave + db
func (api *ObscuroAPI) Health(ctx context.Context) (*host.HealthCheck, error) {
// Health returns the health status of Ten host + enclave + db
func (api *TenAPI) Health(ctx context.Context) (*host.HealthCheck, error) {
return api.host.HealthCheck(ctx)
}

// Config returns the config status of obscuro host + enclave + db
func (api *ObscuroAPI) Config() (*ChecksumFormattedObscuroNetworkConfig, error) {
config, err := api.host.ObscuroConfig()
// Config returns the config status of Ten host + enclave + db
func (api *TenAPI) Config() (*ChecksumFormattedTenNetworkConfig, error) {
config, err := api.host.TenConfig()
if err != nil {
return nil, err
}
return checksumFormatted(config), nil
}

// ChecksumFormattedObscuroNetworkConfig serialises the addresses as EIP55 checksum addresses.
type ChecksumFormattedObscuroNetworkConfig struct {
// ChecksumFormattedTenNetworkConfig serialises the addresses as EIP55 checksum addresses.
type ChecksumFormattedTenNetworkConfig struct {
ManagementContractAddress gethcommon.AddressEIP55
L1StartHash gethcommon.Hash
MessageBusAddress gethcommon.AddressEIP55
L2MessageBusAddress gethcommon.AddressEIP55
ImportantContracts map[string]gethcommon.AddressEIP55 // map of contract name to address
}

func checksumFormatted(info *common.ObscuroNetworkInfo) *ChecksumFormattedObscuroNetworkConfig {
func checksumFormatted(info *common.TenNetworkInfo) *ChecksumFormattedTenNetworkConfig {
importantContracts := make(map[string]gethcommon.AddressEIP55)
for name, addr := range info.ImportantContracts {
importantContracts[name] = gethcommon.AddressEIP55(addr)
}
return &ChecksumFormattedObscuroNetworkConfig{
return &ChecksumFormattedTenNetworkConfig{
ManagementContractAddress: gethcommon.AddressEIP55(info.ManagementContractAddress),
L1StartHash: info.L1StartHash,
MessageBusAddress: gethcommon.AddressEIP55(info.MessageBusAddress),
Expand Down
10 changes: 5 additions & 5 deletions go/node/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type Config struct {
maxBatchInterval string
rollupInterval string
l1ChainID int
obscuroGenesis string
tenGenesis string
}

func NewNodeConfig(opts ...Option) *Config {
Expand All @@ -64,7 +64,7 @@ func NewNodeConfig(opts ...Option) *Config {
maxBatchInterval: "1s",
rollupInterval: "3s",
l1ChainID: 1337,
obscuroGenesis: "{}",
tenGenesis: "{}",
}

for _, opt := range opts {
Expand All @@ -90,7 +90,7 @@ func (c *Config) ToEnclaveConfig() *config.EnclaveConfig {
cfg.LogLevel = c.logLevel
cfg.Address = fmt.Sprintf("%s:%d", _localhost, c.enclaveWSPort)
cfg.DebugNamespaceEnabled = c.debugNamespaceEnabled
cfg.ObscuroGenesis = c.obscuroGenesis
cfg.TenGenesis = c.tenGenesis

if c.nodeType == "sequencer" && c.coinbaseAddress != "" {
cfg.GasPaymentAddress = gethcommon.HexToAddress(c.coinbaseAddress)
Expand Down Expand Up @@ -338,9 +338,9 @@ func WithL1ChainID(i int) Option {
}
}

func WithObscuroGenesis(g string) Option {
func WithTenGenesis(g string) Option {
return func(c *Config) {
c.obscuroGenesis = g
c.tenGenesis = g
}
}

Expand Down
4 changes: 2 additions & 2 deletions go/obsclient/obsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ func (oc *ObsClient) GetBatchTransactions(hash gethcommon.Hash) (*common.Transac
}

// GetConfig returns the network config for obscuro
func (oc *ObsClient) GetConfig() (*common.ObscuroNetworkInfo, error) {
var result common.ObscuroNetworkInfo
func (oc *ObsClient) GetConfig() (*common.TenNetworkInfo, error) {
var result common.TenNetworkInfo
err := oc.rpcClient.Call(&result, rpc.Config)
if err != nil {
return nil, err
Expand Down
6 changes: 0 additions & 6 deletions go/wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ type Wallet interface {
Address() common.Address
// SignTransaction returns a signed transaction
SignTransaction(tx types.TxData) (*types.Transaction, error)
SignTransactionForChainID(tx types.TxData, chainID *big.Int) (*types.Transaction, error)

// SetNonce overrides the current nonce
// The GetTransactionCount is expected to be the next nonce to use in a transaction, not the current account GetTransactionCount
SetNonce(nonce uint64)
Expand Down Expand Up @@ -72,10 +70,6 @@ func (m *inMemoryWallet) SignTransaction(tx types.TxData) (*types.Transaction, e
return types.SignNewTx(m.prvKey, types.NewCancunSigner(m.chainID), tx)
}

func (m *inMemoryWallet) SignTransactionForChainID(tx types.TxData, chainID *big.Int) (*types.Transaction, error) {
return types.SignNewTx(m.prvKey, types.NewLondonSigner(chainID), tx)
}

// Address returns the current wallet address
func (m *inMemoryWallet) Address() common.Address {
return m.pubKeyAddr
Expand Down
2 changes: 1 addition & 1 deletion integration/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func DefaultEnclaveConfig() *config.EnclaveConfig {
SqliteDBPath: "",
ProfilerEnabled: false,
MinGasPrice: big.NewInt(params.InitialBaseFee),
ObscuroGenesis: "",
TenGenesis: "",
DebugNamespaceEnabled: false,
MaxBatchSize: 1024 * 55,
MaxRollupSize: 1024 * 64,
Expand Down
8 changes: 7 additions & 1 deletion integration/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ const (
DefaultGethWSPortOffset = 100
DefaultGethAUTHPortOffset = 200
DefaultGethNetworkPortOffset = 300
DefaultPrysmHTTPPortOffset = 400
DefaultGethHTTPPortOffset = 400
DefaultPrysmP2PPortOffset = 500
DefaultPrysmRPCPortOffset = 550
DefaultHostP2pOffset = 600 // The default offset for the host P2p
DefaultEnclaveOffset = 700 // The default offset between a Geth nodes port and the enclave ports. Used in Socket Simulations.
DefaultHostRPCHTTPOffset = 800 // The default offset for the host's RPC HTTP port
Expand All @@ -36,3 +37,8 @@ const (
EthereumChainID = 1337
TenChainID = 443
)

const (
GethNodeAddress = "0x123463a4b065722e99115d6c222f267d9cabb524"
GethNodePK = "2e0834786285daccd064ca17f1654f67b4aef298acbb82cef9ec422fb4975622"
)
12 changes: 6 additions & 6 deletions integration/contractdeployer/contract_deployer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func init() { //nolint:gochecknoinits
func TestCanDeployLayer2ERC20Contract(t *testing.T) {
startPort := integration.StartPortContractDeployerTest1
hostWSPort := startPort + integration.DefaultHostRPCWSOffset
createObscuroNetwork(t, startPort)
creatTenNetwork(t, startPort)
// This sleep is required to ensure the initial rollup exists, and thus contract deployer can check its balance.
time.Sleep(2 * time.Second)

Expand Down Expand Up @@ -83,7 +83,7 @@ func TestCanDeployLayer2ERC20Contract(t *testing.T) {
func TestFaucetSendsFundsOnlyIfNeeded(t *testing.T) {
startPort := integration.StartPortContractDeployerTest2
hostWSPort := startPort + integration.DefaultHostRPCWSOffset
createObscuroNetwork(t, startPort)
creatTenNetwork(t, startPort)

faucetWallet := wallet.NewInMemoryWalletFromConfig(genesis.TestnetPrefundedPK, integration.TenChainID, testlog.Logger())
faucetClient := getClient(hostWSPort, faucetWallet)
Expand Down Expand Up @@ -130,7 +130,7 @@ func TestFaucetSendsFundsOnlyIfNeeded(t *testing.T) {
}

// Creates a single-node Obscuro network for testing.
func createObscuroNetwork(t *testing.T, startPort int) {
func creatTenNetwork(t *testing.T, startPort int) {
// Create the Obscuro network.
numberOfNodes := 1
wallets := params.NewSimWallets(1, numberOfNodes, integration.EthereumChainID, integration.TenChainID)
Expand All @@ -144,9 +144,9 @@ func createObscuroNetwork(t *testing.T, startPort int) {
WithPrefunding: true,
}
simStats := stats.NewStats(simParams.NumberOfNodes)
obscuroNetwork := network.NewNetworkOfSocketNodes(wallets)
t.Cleanup(obscuroNetwork.TearDown)
_, err := obscuroNetwork.Create(&simParams, simStats)
tenNetwork := network.NewNetworkOfSocketNodes(wallets)
t.Cleanup(tenNetwork.TearDown)
_, err := tenNetwork.Create(&simParams, simStats)
if err != nil {
panic(fmt.Sprintf("failed to create test Obscuro network. Cause: %s", err))
}
Expand Down
Loading
Loading