Skip to content

Commit ee51a98

Browse files
committed
Merge branch 'master' into feature/partkey
2 parents 0b371a3 + a957519 commit ee51a98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+683
-619
lines changed

.travis.yml

-47
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ stages:
2020
jobs:
2121
allow_failures:
2222
- name: External ARM64 Deploy
23-
- name: External ARM64 Integration Test
2423
- name: External ARM Build
2524
- name: External ARM Deploy
2625
- name: Test Release Builds
@@ -35,11 +34,6 @@ jobs:
3534
name: Ubuntu AMD64 Build
3635
script:
3736
- scripts/travis/build_test.sh
38-
- # same stage, parallel job
39-
os: linux
40-
name: Ubuntu AMD64 Integration Test
41-
script:
42-
- ./scripts/travis/integration_test.sh
4337
- # same stage, parallel job
4438
name: External ARM64 Build
4539
os: linux
@@ -52,30 +46,12 @@ jobs:
5246
- awscli
5347
script:
5448
- scripts/travis/external_build.sh ./scripts/travis/build_test.sh
55-
- # same stage, parallel job
56-
name: External ARM64 Integration Test
57-
os: linux
58-
env:
59-
- BUILD_TYPE: "external_build"
60-
- TARGET_PLATFORM: "linux-arm64"
61-
addons:
62-
apt:
63-
packages:
64-
- awscli
65-
script:
66-
- scripts/travis/external_build.sh ./scripts/travis/integration_test.sh
6749
- # same stage, parallel job
6850
os: osx
6951
osx_image: xcode11
7052
name: MacOS AMD64 Build
7153
script:
7254
- scripts/travis/build_test.sh
73-
- # same stage, parallel job
74-
os: osx
75-
osx_image: xcode11
76-
name: MacOS AMD64 Integration Test
77-
script:
78-
- ./scripts/travis/integration_test.sh
7955
- # same stage, parallel job
8056
os: windows
8157
name: Windows x64 Build
@@ -91,11 +67,6 @@ jobs:
9167
name: Ubuntu AMD64 Build
9268
script:
9369
- ./scripts/travis/build_test.sh
94-
- # same stage, parallel job
95-
os: linux
96-
name: Ubuntu AMD64 Integration Test
97-
script:
98-
- ./scripts/travis/integration_test.sh
9970
- # same stage, parallel job
10071
name: External ARM64 Build
10172
os: linux
@@ -108,30 +79,12 @@ jobs:
10879
- awscli
10980
script:
11081
- scripts/travis/external_build.sh ./scripts/travis/build_test.sh
111-
- # same stage, parallel job
112-
name: External ARM64 Integration Test
113-
os: linux
114-
env:
115-
- BUILD_TYPE: "external_build"
116-
- TARGET_PLATFORM: "linux-arm64"
117-
addons:
118-
apt:
119-
packages:
120-
- awscli
121-
script:
122-
- scripts/travis/external_build.sh ./scripts/travis/integration_test.sh
12382
- # same stage, parallel job
12483
os: osx
12584
osx_image: xcode11
12685
name: MacOS AMD64 Build
12786
script:
12887
- scripts/travis/build_test.sh
129-
- # same stage, parallel job
130-
os: osx
131-
osx_image: xcode11
132-
name: MacOS AMD64 Integration Test
133-
script:
134-
- ./scripts/travis/integration_test.sh
13588
- # same stage, parallel job
13689
os: windows
13790
name: Windows x64 Build

agreement/abstractions.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ type LedgerReader interface {
128128
// protocol may lose liveness.
129129
Seed(basics.Round) (committee.Seed, error)
130130

131-
// Lookup returns the AccountData associated with some Address
132-
// at the conclusion of a given round.
131+
// LookupAgreement returns the AccountData associated with some Address
132+
// needed by agreement at the conclusion of a given round.
133133
//
134134
// This method returns an error if the given Round has not yet been
135135
// confirmed. It may also return an error if the given Round is
136136
// unavailable by the storage device. In that case, the agreement
137137
// protocol may lose liveness.
138-
Lookup(basics.Round, basics.Address) (basics.AccountData, error)
138+
LookupAgreement(basics.Round, basics.Address) (basics.OnlineAccountData, error)
139139

140140
// Circulation returns the total amount of money in circulation at the
141141
// conclusion of a given round.

agreement/agreementtest/simulate_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,15 @@ func (l *testLedger) LookupDigest(r basics.Round) (crypto.Digest, error) {
203203
return l.entries[r].Digest(), nil
204204
}
205205

206-
func (l *testLedger) Lookup(r basics.Round, a basics.Address) (basics.AccountData, error) {
206+
func (l *testLedger) LookupAgreement(r basics.Round, a basics.Address) (basics.OnlineAccountData, error) {
207207
l.mu.Lock()
208208
defer l.mu.Unlock()
209209

210210
if r >= l.nextRound {
211211
err := fmt.Errorf("Lookup called on future round: %v > %v! (this is probably a bug)", r, l.nextRound)
212212
panic(err)
213213
}
214-
return l.state[a], nil
214+
return l.state[a].OnlineAccountData(), nil
215215
}
216216

217217
func (l *testLedger) Circulation(r basics.Round) (basics.MicroAlgos, error) {
@@ -226,7 +226,7 @@ func (l *testLedger) Circulation(r basics.Round) (basics.MicroAlgos, error) {
226226
var sum basics.MicroAlgos
227227
var overflowed bool
228228
for _, rec := range l.state {
229-
sum, overflowed = basics.OAddA(sum, rec.VotingStake())
229+
sum, overflowed = basics.OAddA(sum, rec.OnlineAccountData().VotingStake())
230230
if overflowed {
231231
panic("circulation computation overflowed")
232232
}

agreement/common_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ func (l *testLedger) LookupDigest(r basics.Round) (crypto.Digest, error) {
320320
return l.entries[r].Digest(), nil
321321
}
322322

323-
func (l *testLedger) Lookup(r basics.Round, a basics.Address) (basics.AccountData, error) {
323+
func (l *testLedger) LookupAgreement(r basics.Round, a basics.Address) (basics.OnlineAccountData, error) {
324324
l.mu.Lock()
325325
defer l.mu.Unlock()
326326

@@ -330,10 +330,10 @@ func (l *testLedger) Lookup(r basics.Round, a basics.Address) (basics.AccountDat
330330
}
331331

332332
if l.maxNumBlocks != 0 && r+round(l.maxNumBlocks) < l.nextRound {
333-
return basics.AccountData{}, &LedgerDroppedRoundError{}
333+
return basics.OnlineAccountData{}, &LedgerDroppedRoundError{}
334334
}
335335

336-
return l.state[a], nil
336+
return l.state[a].OnlineAccountData(), nil
337337
}
338338

339339
func (l *testLedger) Circulation(r basics.Round) (basics.MicroAlgos, error) {
@@ -348,7 +348,7 @@ func (l *testLedger) Circulation(r basics.Round) (basics.MicroAlgos, error) {
348348
var sum basics.MicroAlgos
349349
var overflowed bool
350350
for _, rec := range l.state {
351-
sum, overflowed = basics.OAddA(sum, rec.VotingStake())
351+
sum, overflowed = basics.OAddA(sum, rec.OnlineAccountData().VotingStake())
352352
if overflowed {
353353
panic("circulation computation overflowed")
354354
}

agreement/demux_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,9 @@ func (t *demuxTester) LookupDigest(basics.Round) (crypto.Digest, error) {
484484
}
485485

486486
// implement Ledger
487-
func (t *demuxTester) Lookup(basics.Round, basics.Address) (basics.AccountData, error) {
487+
func (t *demuxTester) LookupAgreement(basics.Round, basics.Address) (basics.OnlineAccountData, error) {
488488
// we don't care about this function in this test.
489-
return basics.AccountData{}, nil
489+
return basics.OnlineAccountData{}, nil
490490
}
491491

492492
// implement Ledger

agreement/fuzzer/ledger_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,15 @@ func (l *testLedger) LookupDigest(r basics.Round) (crypto.Digest, error) {
226226
return l.entries[r].Digest(), nil
227227
}
228228

229-
func (l *testLedger) Lookup(r basics.Round, a basics.Address) (basics.AccountData, error) {
229+
func (l *testLedger) LookupAgreement(r basics.Round, a basics.Address) (basics.OnlineAccountData, error) {
230230
l.mu.Lock()
231231
defer l.mu.Unlock()
232232

233233
if r >= l.nextRound {
234234
err := fmt.Errorf("Lookup called on future round: %d >= %d! (this is probably a bug)", r, l.nextRound)
235235
panic(err)
236236
}
237-
return l.state[a], nil
237+
return l.state[a].OnlineAccountData(), nil
238238
}
239239

240240
func (l *testLedger) Circulation(r basics.Round) (basics.MicroAlgos, error) {
@@ -249,7 +249,7 @@ func (l *testLedger) Circulation(r basics.Round) (basics.MicroAlgos, error) {
249249
var sum basics.MicroAlgos
250250
var overflowed bool
251251
for _, rec := range l.state {
252-
sum, overflowed = basics.OAddA(sum, rec.VotingStake())
252+
sum, overflowed = basics.OAddA(sum, rec.OnlineAccountData().VotingStake())
253253
if overflowed {
254254
panic("circulation computation overflowed")
255255
}

agreement/proposal.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func verifyNewSeed(p unauthenticatedProposal, ledger LedgerReader) error {
184184
}
185185

186186
balanceRound := balanceRound(rnd, cparams)
187-
proposerRecord, err := ledger.Lookup(balanceRound, value.OriginalProposer)
187+
proposerRecord, err := ledger.LookupAgreement(balanceRound, value.OriginalProposer)
188188
if err != nil {
189189
return fmt.Errorf("failed to obtain balance record for address %v in round %d: %v", value.OriginalProposer, balanceRound, err)
190190
}

agreement/selector.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func membership(l LedgerReader, addr basics.Address, r basics.Round, p period, s
6464
balanceRound := balanceRound(r, cparams)
6565
seedRound := seedRound(r, cparams)
6666

67-
record, err := l.Lookup(balanceRound, addr)
67+
record, err := l.LookupAgreement(balanceRound, addr)
6868
if err != nil {
6969
err = fmt.Errorf("Service.initializeVote (r=%d): Failed to obtain balance record for address %v in round %d: %w", r, addr, balanceRound, err)
7070
return
@@ -82,7 +82,7 @@ func membership(l LedgerReader, addr basics.Address, r basics.Round, p period, s
8282
return
8383
}
8484

85-
m.Record = committee.BalanceRecord{AccountData: record, Addr: addr}
85+
m.Record = committee.BalanceRecord{OnlineAccountData: record, Addr: addr}
8686
m.Selector = selector{Seed: seed, Round: r, Period: p, Step: s}
8787
m.TotalMoney = total
8888
return m, nil

catchup/service_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,10 @@ func (m *mockedLedger) LookupDigest(basics.Round) (crypto.Digest, error) {
722722
return crypto.Digest{}, errors.New("not needed for mockedLedger")
723723
}
724724

725+
func (m *mockedLedger) LookupAgreement(basics.Round, basics.Address) (basics.OnlineAccountData, error) {
726+
return basics.OnlineAccountData{}, errors.New("not needed for mockedLedger")
727+
}
728+
725729
func (m *mockedLedger) IsWritingCatchpointFile() bool {
726730
return false
727731
}

daemon/algod/api/algod.oas2.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,7 @@
17561756
],
17571757
"properties": {
17581758
"type": {
1759-
"description": "\\[tt\\] value type.",
1759+
"description": "\\[tt\\] value type. Value `1` refers to **bytes**, value `2` refers to **uint**",
17601760
"type": "integer"
17611761
},
17621762
"bytes": {
@@ -1884,7 +1884,7 @@
18841884
"$ref": "#/definitions/ApplicationStateSchema"
18851885
},
18861886
"global-state-schema": {
1887-
"description": "[\\lsch\\] global schema",
1887+
"description": "[\\gsch\\] global schema",
18881888
"$ref": "#/definitions/ApplicationStateSchema"
18891889
},
18901890
"global-state": {

daemon/algod/api/algod.oas3.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1445,7 +1445,7 @@
14451445
"type": "string"
14461446
},
14471447
"type": {
1448-
"description": "\\[tt\\] value type.",
1448+
"description": "\\[tt\\] value type. Value `1` refers to **bytes**, value `2` refers to **uint**",
14491449
"type": "integer"
14501450
},
14511451
"uint": {

0 commit comments

Comments
 (0)